This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in running DESeqDataSetFromTximport

Hello,

I am facing an error while running DESeqDatasetFromTximort after StringTie quantification step

> library(DESeq2)
> sampleTable <- data.frame(condition = factor(rep(c("mock", "mock"), each = 1)))
> rownames(sampleTable) <- colnames(txi$counts)
> dds <- DESeqDataSetFromTximport(txi = txi, sampleTable ,design = ~ Condition + Time)
Error in DESeqDataSet(se, design = design, ignoreRank) : 
  all variables in design formula must be columns in colData

My sample contains:

Sample_ids  Condition   Time
t_data_9.ctab   Mock    6hpi
t_data_10.ctab  Mock    6hpi

Am I supposed to add any argument?

tximport r rna-seq stringtie deseq2

1 answer

You need to redo how sampleTable is made. Firstly, it needs to have Condition rather than condition (or you need to change that in your design) and secondly it needs to contain Time, which it currently doesn't. Fixing that will remove the error.

Log in to answer this question.