Question: Using RSEM with tximport and DESeq2
0
2.4 years ago by
falkohofmann0 wrote:

I came across an issue when trying to import RSEM files into DESeq2 according the online tutorial.

Running the following code on my data:

txi.rsem <- tximport(files, type = "rsem")
sampleTable <- data.frame(condition = factor(rep(c('A', 'B','C','D'), each = 3)))
dds <- DESeqDataSetFromTximport(txi.rsem, sampleTable, ~condition)



gives me the error: using counts and average transcript lengths from tximport Error: all(lengths > 0) is not TRUE

After looking at the data I think this is happening when a gene is not expressed in any of the samples.
The gene will have an effective transcript length of 0 for all samples which seems to cause the issue.

Is there a quick fix for his problem?

modified 2.4 years ago • written 2.4 years ago by falkohofmann0
Answer: Using RSEM with tximport and DESeq2
4
2.4 years ago by
Michael Love24k
United States
Michael Love24k wrote:
You can edit the 0 lengths to be 1, by editing the length matrix in txi, before starting with DESeq2 We're just taking the gene effective lengths as reported by RSEM, whereas for summarizing from transcript level, tximport ensures the lengths are nonzero.
Answer: Using RSEM with tximport and DESeq2
0
2.4 years ago by
falkohofmann0 wrote:

Works fine, thanks!