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?