tximport to dseq2 error
0
0
Entering edit mode
4.1 years ago
evelyn ▴ 230

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 • 734 views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Thank you,

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

Login before adding your answer.

Traffic: 2618 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