difference between txi$counts and txi$abundance when countsFromAbundance is true
1
0
Entering edit mode
snowmattin • 0
@69358726
Last seen 4 days ago
Germany

Dear,

May I know the difference between the txi$counts and txi$abundance when the countFromAbundance is set to true(scaledTPM or lengthScaledTPM or dtuScaledTPM)? If set to xxxTPM, the txi$counts is still the raw counts value, right? As it's so close to the value when countFromAbundance is set to no. Thanks a lot! RNAseq tximport • 145 views ADD COMMENT 1 Entering edit mode @james-w-macdonald-5106 Last seen 6 hours ago United States Have you read the vignette? Or the help page? Here's what the help page for tximport says. countsFromAbundance: character, either "no" (default), "scaledTPM", "lengthScaledTPM", or "dtuScaledTPM". Whether to generate estimated counts using abundance estimates: * scaled up to library size (scaledTPM), * scaled using the average transcript length over samples and then the library size (lengthScaledTPM), or * scaled using the median transcript length among isoforms of a gene, and then the library size (dtuScaledTPM). dtuScaledTPM is designed for DTU analysis in combination with 'txOut=TRUE', and it requires specifing a 'tx2gene' data.frame. dtuScaledTPM works such that within a gene, values from all samples and all transcripts get scaled by the same fixed median transcript length. If using scaledTPM, lengthScaledTPM, or geneLengthScaledTPM, the counts are no longer correlated across samples with transcript length, and so the length offset matrix should not be used.  That seems pretty clear to me, but perhaps you have a particular question about something that isn't clear to you? 0 Entering edit mode Thank you very much! After you use one of the xxxTPM, if you check the txi$counts and txi$abundance, you can find relatively big difference. Then would you choose txi$counts or txi$abundance to export as xxxTPM value/matrix? Best, ADD REPLY 1 Entering edit mode I cannot find any suggestion (like anywhere) that you should use txi$abundance 'to export as xxxTPM value/matrix'. Can you point to any documentation that says you should use anything but the counts list item?

In other words, the different countsFrom methods are intended to provide counts that are adjusted using the abundance measurements, in order to account for length biases and whatnot. There is no reason for you to do anything directly with the abundance values.

1
Entering edit mode

Make it easy on yourself, use the counts assay together with the length assay and calculate your TPMs as suggested: DESeq2: Is it possible to convert read counts to expression values via TPM and return these values?