Entering edit mode
2.9 years ago
Kim
▴
20
Hello
I'm trying to analyze the snRNA dataset GSE168704 and having a problem with loading data. I downloaded matrix, barcodes and genes files and keep them in the same directory raw_matrix_dir. Then I run this command:
snRNA_dev_sce <- DropletUtils::read10xCounts(raw_matrix_dir)
But I got this error message:
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [1]
3.`colnames<-`(`*tmp*`, value = c("ID", "Symbol"))
2..read_from_sparse(run, version = version, compressed = compressed)
1.DropletUtils::read10xCounts(raw_matrix_dir, col.names = TRUE)
Could someone please help me with this?
Thank you very much
The barcodes and features should have no column names, and be the same length as the matrix columns and rows respectively. The matrix should be in market matrix format too. You might want to import them separately and check these conditions. The barcodes and features can be read with
read.table
,readr::read_table
, ordata.table::fread
. The matrix can be loaded withMatrix::readMM
.