Question: tximport query for un-normalized and TPM data
0
9 weeks ago by
HKS0
HKS0 wrote:

I am using .ctab files and type = "stringtie" to calculate txi$abundance, txi$counts, and since the .ctab file contains FPKM values, txi$abundance is giving FPKM matrix. But I want txi$abundance to contain TPM values, and also un-normalised raw counts.

I want two types of matrices txi$abundance to contain un-normalised or raw counts and another txi.tpm$abundance to contain TPM values, because I want to use the raw count matrix for DESeq analysis and TPM matrix for machine learning.

Is it possible with tximport?

tximport • 106 views
modified 9 weeks ago by Michael Love25k • written 9 weeks ago by HKS0
Answer: tximport query for un-normalized and TPM data
0
9 weeks ago by
Michael Love25k
United States
Michael Love25k wrote:

tximport doesn’t convert Stringtie’s FPKM output to TPM but you can very easily using simple R. Just divide each column by its sum and multiply the matrix by 1e6.

Is this correct: TPMfromFPKM <- as.numeric(exp(log(txi$abundance) - log(sum(txi$abundance)) + log(1e6)))

But this is not giving the output in matrix form, rather the output has long column with values in just one coloumn for all samples.. I want it in matrix form..

You can try to work it out yourself. This is out of scope of tximport.