satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.26k stars 905 forks source link

Unable to load of sparse data matrices provided by 10X genomics #9041

Closed HEyuanhang111 closed 3 months ago

HEyuanhang111 commented 3 months ago

I'm trying to read an 10X genomics from a published data set (available on GEO accession GSM7937395), using the Read10X function, but keep getting the following error.The file naming convention is correct.

# > CT=Read10X('./CT/')
Error in fixupDN.if.valid(value, x@Dim) : 
  length of Dimnames[[2]] (4340) is not equal to Dim[2] (14569)

My foundation in R programming is not strong enough. Any insight into what might be going on would be hugely helpful!

Thanks so much, He

zskylarli commented 3 months ago

Hi - the difference in the dimensions seems to suggest that something is wrong with the file's formatting (inconsistency with 10X's documentation and therefore is not compatible with Read10X. Alternatively, you can read the matrix using Matrix::readMM() and read the gene names and cell name information into R using read.table(), assign the rownames and colnames accordingly, and then construct a Seurat object with that counts matrix using CreateSeuratObject. Please feel free to reopen if this solution does not work!