This is a test version of Biostars. For the public version, visit https://www.biostars.org.
colnames problem in read10xCounts

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

colnames snrna scrna read10xcounts

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, or data.table::fread. The matrix can be loaded with Matrix::readMM.

0 answers

No answers yet.

Log in to answer this question.