Question: How to merge two tximport object into one dataset for DESeqDataSetFromTximport
0
gravatar for rensanhao
7 weeks ago by
rensanhao0
rensanhao0 wrote:

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 • 132 views
ADD COMMENTlink modified 7 weeks ago by Michael Love25k • written 7 weeks ago by rensanhao0
Answer: How to merge two txmiport object into one dataset for DESeqDataSetFromTximport
1
gravatar for Michael Love
7 weeks ago by
Michael Love25k
United States
Michael Love25k wrote:

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 COMMENTlink written 7 weeks ago by Michael Love25k

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 REPLYlink written 7 weeks ago by rensanhao0

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

ADD REPLYlink written 7 weeks ago by Michael Love25k

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 REPLYlink written 7 weeks ago by rensanhao0

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 REPLYlink written 7 weeks ago by Michael Love25k

Thanks. I have some clues about this now.

ADD REPLYlink written 7 weeks ago by rensanhao0

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 REPLYlink written 7 weeks ago by rensanhao0
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: 271 users visited in the last hour