tximport query for un-normalized and TPM data
1
0
Entering edit mode
HKS • 0
@hks-19681
Last seen 4.6 years ago

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 • 1.1k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

yes, I solved it, Thank you..

ADD REPLY

Login before adding your answer.

Traffic: 777 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6