difference between txi$counts and txi$abundance when countsFromAbundance is true
Entering edit mode
snowmattin • 0
Last seen 14 months ago


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 • 1.0k views
Entering edit mode
Last seen 16 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?

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?


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.

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?


Login before adding your answer.

Traffic: 795 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