tximport lose transcript names with Salmon bootstrap
1
0
Entering edit mode
Cindy • 0
@cindy-23087
Last seen 2.8 years ago
United States

Hello! I was using the following command to import salmon quantification with bootstraps

txi <- tximport(files, type="salmon", txOut=TRUE, dropInfReps=FALSE, varReduce=FALSE)

problem is the output lost the transcript names, just 1,2,3...for row names. It was fine when I use the following command, without bootstraps

txi <- tximport(files, type="salmon", txOut=TRUE, dropInfReps=TRUE)

Has anyone had similar issue?

salmon tximport bootstrap • 1.1k views
ADD COMMENT
0
Entering edit mode

I do not exactly the answer but I am interested to know the answer of this question.

ADD REPLY
0
Entering edit mode

Were you able to try the code I posted?

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 4 minutes ago
United States

I can't replicate this yet on my end. Maybe you can try this on your end and see if you can find a reproducible example. Perhaps it is a version issue (always note your software versions when posting to support site). Below I'm using the devel version of tximport v1.15.8, but I believe this will be performing the same as release (v1.14), as the 8 version bumps were mostly documentation and modifications of warning messages.

Setup:

dir <- system.file("extdata", package="tximportData")
samples <- read.table(file.path(dir,"samples.txt"), header=TRUE)
files <- file.path(dir,"salmon_gibbs", samples$run, "quant.sf.gz")
names(files) <- paste0("sample",1:6)

With inferential replicates:

> txi <- tximport(files, type="salmon", txOut=TRUE)
> head(txi$counts)
                   sample1 sample2 sample3 sample4 sample5 sample6
 ENST00000448914.1       0       0       0       0       0       0
 ENST00000631435.1       0       0       0       0       0       0
 ENST00000632684.1       0       0       0       0       0       0
 ENST00000434970.2       0       0       0       0       0       0
 ENST00000415118.1       0       0       0       0       0       0
 ENST00000633010.1       0       0       0       0       0       0

Without inferential replicates:

txi <- tximport(files, type="salmon", txOut=TRUE, dropInfReps=TRUE)
> head(txi$counts)
                   sample1 sample2 sample3 sample4 sample5 sample6
 ENST00000448914.1       0       0       0       0       0       0
 ENST00000631435.1       0       0       0       0       0       0
 ENST00000632684.1       0       0       0       0       0       0
 ENST00000434970.2       0       0       0       0       0       0
 ENST00000415118.1       0       0       0       0       0       0
 ENST00000633010.1       0       0       0       0       0       0
ADD COMMENT
0
Entering edit mode

Thank you for your reply! I'm using version 1.14.2

This happens not for txi$counts, but for txi$infReps. I tested with tximportData with the following command: txi.inf.rep <- tximport(files, type = "salmon", txOut = TRUE, dropInfReps=FALSE, varReduce=FALSE)

For txi.inf.rep$counts, it's fine

sample1 sample2 sample3 sample4 sample5 sample6 ENST00000448914.1 0 0 0 0 0 0 ENST00000631435.1 0 0 0 0 0 0 ENST00000632684.1 0 0 0 0 0 0

But for txi.inf.rep$infReps, there's no tx name, only 1, 2, 3... as row names

sample1.1 sample1.2 sample1.3 sample1.4 sample1.5
1 0 0 0 0 0
2 0 0 0 0 0
3 0 0 0 0 0

ADD REPLY
0
Entering edit mode

The inferential bootstraps don't have rownames in storage, and for efficiency they are not named when imported with tximport, but kept as simple unnamed matrices (one per sample). The rows correspond to rownames(txi$counts).

The inferential information will be named in two cases though: (1) if you use varReduce=TRUE in tximport, the variance matrix is named, or otherwise, (2) you can use tximeta which will return the inferential replicate matrices as assays (one per inferential replicate).

The sample names on the matrices come directly from names(files), so you can fix it there.

ADD REPLY
0
Entering edit mode

Got it, thank you very much!

ADD REPLY

Login before adding your answer.

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