Entering edit mode
4.5 years ago
David_emir
▴
500
Hi All,
I am working on Single-cell dataset, I wanted to extract raw counts of clusters (Say cluster num 4,6,8) and save it as a csv file. but I am not able to do the same, I have used the following codes,
alldata_epi <- subset(alldata, idents = c(1,23,5,18,22,15))
counts <- alldata_epi@assays$RNA@counts
but when I check the counts, it is not showing anything,
> counts
[,1]
[1,] NA
>
Please let me know where I am going wrong.
Thanks and regards,
Dave
Ok, I just checked that it should have worked. Did you check the subsetted object to see if there are some errors?
This will show you if number of cells are same in selected clusters after subsetting.
Then, when you get the counts object, check its dimension?
Could you post these outputs?
Thanks a lot for the reply, i just checked its shows the following
Ok, it seems you have NA in your original data also, so it is not coming from subsetting.
check your counts in the sparse matrix.
my sparse matrix looks like this