How to merge two tximport object into one dataset for DESeqDataSetFromTximport
1
0
Entering edit mode
rensanhao • 0
@rensanhao-21464
Last seen 4.7 years ago

Hi,

I created two the tximport object (untreated vs treated) from salmon,which is a S4 object has four cols name as abundance, counts, length, and countsfromabundance.My question is how to merge these two dataset into one so I could import them with using DESeqDataSetFromTximport?

Thanks.

deseq2 tximport • 1.9k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

I'd recommend this approach:

files <- c(files1, files2)
txi <- tximport(files)

Otherwise, if you had used tximeta you could simply cbind the SummarizedExperiment objects.

For the list output of tximport, you just need to cbind each of the matrix elements.

ADD COMMENT
0
Entering edit mode

Thanks for this quick reply. So following this merged dataset, how to label which group is my control group or treated group? or should I add a column to label the salmon-quant.sf files before this integration?

ADD REPLY
0
Entering edit mode

Add it in the dds construction step (eg DESeqDataSetFromTximport) as colData.

ADD REPLY
0
Entering edit mode

I'm sorry but I didn't get it. According to vignette,I think the code

files <- file.path(dir,"salmon", samples$run, "quant.sf.gz")
names(files) <- samples$run

is essential for labeling the group info, but I didn't fully understand how it works and moreover, it also led me to confuse that

> dsTxi <- DESeqDataSetFromTximport(txi,
>                                    colData = samples,
>                                    design = ~ condition)

the design arguments should also work for specifying the group information? I just started learning R and RNA-seq so I'll very appreciate if you feel necessary to explain some basic knowledge regarding this issue.

Thanks a lot.

ADD REPLY
0
Entering edit mode

Maybe you can partner with a person who has experience with R. On the support site I try to assist users who have questions about the software, but you probably need to have some R background to get started. You want to have a table of sample information so that you can import all the samples at once with one call to tximport().

ADD REPLY
0
Entering edit mode

Thanks. I have some clues about this now.

ADD REPLY
0
Entering edit mode

Thanks for this quick reply. So following this merged dataset, how to label which group is my control group or treated group? or should I add a column to label the salmon-quant.sf files before this integration?

ADD REPLY

Login before adding your answer.

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