colnames problem in read10xCounts
0
0
Entering edit mode
2.3 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

colnames snRNA scRNA read10xCounts • 775 views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 3030 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6