This is a test version of Biostars. For the public version, visit https://www.biostars.org.
tximport to dseq2 error

Hello,

I am doing:

ddsTxi <- DESeqDataSetFromTximport(txi, colData = samples, design = ~ condition)

But I get this error:

Error in DESeqDataSetFromMatrix(countData = counts, colData = colData,  : 
  ncol(countData) == nrow(colData) is not TRUE

I checked if the row names for samples is same as column names for txi. Column names are longer with additional prefixes and suffixes. samples have row names as automatic counting. Even if I do not exclude that, it is still complaining the same. Thank you!

sequencing

IIRC, you should have one column per sample in txi and one row per sample in samples. Expression matrix is usually a gene (rows) by samples (column) matrix, and sample data is one row of metadata per sample.

Please show us the output to:

rownames(samples)
colnames(txi)

If they are not the same, try correcting that first and then running the import again.

Thank you,

> rownames(samples)
[1] "1" "2" "3" "4" "5" "6"
> colnames(txi)
NULL

0 answers

No answers yet.

Log in to answer this question.