Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sc and spatial count Matrix are correctly formatted but createCARDObject function returns error #69

Open
krigia opened this issue Mar 8, 2024 · 2 comments

Comments

@krigia
Copy link

krigia commented Mar 8, 2024

@YingMa0107 @YMalab I have exported tha RNA counts for both scRNA-seq and spatial data as dgCMatrix.

str(scRNA_seq_counts)
Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
..@ i : int [1:37279034] 29 30 45 170 294 606 774 846 858 920 ...
..@ p : int [1:24475] 0 433 822 1857 2599 3661 4614 4820 5038 5707 ...
..@ Dim : int [1:2] 36601 24474
..@ Dimnames:List of 2
.. ..$ : chr [1:36601] "MIR1302-2HG" "FAM138A" "OR4F5" "AL627309.1" ...
.. ..$ : chr [1:24474] "TCa001_AAACCTGAGAAGAAGC-1" "TCa001_AAACCTGAGAAGATTC-1" "TCa001_AAACCTGAGAGTACCG-1" "TCa001_AAACCTGAGCTACCTA-1" ...
..@ x : num [1:37279034] 0.995 0.985 0.997 1.981 0.995 ...
..@ factors : list()

str(spatial_counts_dgCMatrix)
Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
..@ i : int [1:2804500] 1 3 8 11 14 15 18 20 22 24 ...
..@ p : int [1:2024] 0 1801 3559 5395 6542 7439 8601 9431 10073 11552 ...
..@ Dim : int [1:2] 8417 2023
..@ Dimnames:List of 2
.. ..$ : chr [1:8417] "SAMD11" "NOC2L" "KLHL17" "HES4" ...
.. ..$ : chr [1:2023] "CGGCTGAAGGTTACGC-1_1" "CACCTCTACGAGTGTG-1_1" "ATACGACAGATGGGTA-1_1" "ACTTCCTGTCGTGCGA-1_1" ...
..@ x : num [1:2804500] 1 1 1 1 1 3 1 2 1 1 ...
..@ factors : list()

However although the two dgCMatrix are properly formatted and they have overlapped genes, when I run createCARDObject function, I get the following error:
**_## QC on scRNASeq dataset! ...

QC on spatially-resolved dataset! ...

Error: There are no common gene names in spatial count data and single cell RNAseq count data_**

Your advice is highly appreciated. Thank you!

@YMalab
Copy link
Collaborator

YMalab commented Apr 1, 2024

Hi @krigia,

Have you checked and printed the rownames(spatial_counts_dgCMatrix) the rownames(scRNA_seq_counts) out? Also have you checked the colSums(spatial_counts_dgCMatrix) to see if they are all very small? If they are all very small, maybe you can set the minCountGene to a smaller number.

Best,
Ying

@krigia
Copy link
Author

krigia commented Apr 16, 2024

@YMalab rownames(spatial_counts_dgCMatrix) is NULL. The object has NULL values for both cells (spots) and features. Also, I do not understand what you mean to check colSums(spatial_counts_dgCMatrix) to see if they are all very small. How small? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants