confusion with tximport options and resulting matrix
1
0
Entering edit mode
arubio • 0
@arubio-12877
Last seen 22 months ago

Hi all,

I'm trying to import my samples RSEM "genes.results" to R using tximport for later differential expression analysis with limma. I've followed the limma-voom example here

The first part of my question is regarding the actual tutorial as it supposedly imports length scaled TPMs but then uses the txi$counts matrix as input for voom instead of txi$abundance as I would have expected. Am I interpreting wrong the content of these matrixes?

The second part of my question comes from trying to import my actual samples. As recommended, I've tried importing scaled counts from abundances (lengthScaledTPM) instead of estimated counts. The tximport function seems to ignore the "countsFromAbundance" parameter. Here is my code:

txi <- tximport(file.path(paste(s2c$path,"/",s2c$sample,".genes.results", sep=""))
, type = "rsem"
, tx2gene = t2g
, countsFromAbundance = "lengthScaledTPM"
)

It's really out of the box stuff, as I've verified the file paths and tx2gene matrix are ok. However txi$countsFromAbundance is always no and txi$abundance always contains the fpkm values. Nothing I do seems to make a difference; I've set countsFromAbundance to lengthScaledTPM and scaledTPM (just to check if that one worked); and I've added the abundanceCol parameter with the number of the tpm column in the genes.results file.

I'm relatively new to RNAseq analysis using RSEM+Voom+Limma, until now I was using kallisto+sleuth, so I apologize if this is a noobie issue, but after reading the vignette and documentation there is nothing else that comes to mind. I appreciate any input!

tximport rnaseq rsem limma voom • 1.1k views
0
Entering edit mode
@mikelove
Last seen 4 hours ago
United States
The tximport package is designed to enable count based analysis, so it uses all three matrices: counts, TPM and effective length. See the reference for details. For your second question, as RSEM has already summarized the counts in its own way in 'genes.results', tximport doesn't replace them. You could instead use the transcript level files from RSEM to perform countsFromAbundance normalization.