Confused about tximport-DESeq2 setup
Entering edit mode
Dunois • 0
Last seen 21 days ago

The Downstream DGE in Bioconductor section in the tximport vignette has two Notes in it and nothing else, and the way things are explained there is confusing.

Which of the two code snippets below is the correct approach for importing (and subsequently passing on to DESeq2) expression levels quantified using Salmon with the transcript-gene relationship given by a two column data.frame named tx2gene?


txi <- tximport::tximport(files = flist, type = "salmon", tx2gene = tx2gene, countsFromAbundance="lengthScaledTPM")
dds <- DESeqDataSetFromTximport(txi, sampleTable, ~cond)


txi <- tximport::tximport(files = flist, type = "salmon", tx2gene = tx2gene)
dds <- DESeqDataSetFromTximport(txi, sampleTable, ~cond)
DESeq2 tximport salmon • 117 views
Entering edit mode
ATpoint ★ 2.1k
Last seen 2 hours ago

They’re almost identical in what they effectively do for the user, which is making sure that differences in average transcript length per gene and sample does not bias the counts. The first one modifies the counts to correct for average tx length so you get a single matrix of raw counts ready for downstream analysis. The second one produces an offset matrix of average lengths per gene and sample which DESeq2 then can use to incorporate into its model. Both are valid, the first one is more generic since some tools/approaches (like limma-voom) do not support a length offset matrix. I prefer the generic one but choice is yours.

See also the vignette:


Login before adding your answer.

Traffic: 524 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6