Question: tximport query for un-normalized and TPM data
0
gravatar for HKS
4 months 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 • 153 views
ADD COMMENTlink modified 4 months ago by Michael Love26k • written 4 months ago by HKS0
Answer: tximport query for un-normalized and TPM data
0
gravatar for Michael Love
4 months ago by
Michael Love26k
United States
Michael Love26k 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.

ADD COMMENTlink written 4 months ago by Michael Love26k

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..

ADD REPLYlink written 4 months ago by HKS0

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

ADD REPLYlink written 4 months ago by Michael Love26k

yes, I solved it, Thank you..

ADD REPLYlink written 4 months ago by HKS0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 238 users visited in the last hour