How to subset the output of tximport in DE analysis using DEseq2
1
1
Entering edit mode
3.9 years ago
tianshenbio ▴ 170

I have a dataset of 32 samples quantified using salmon. I used tximport to import the data:

txi=tximport(c(a vector of file names),type="salmon",tx2gene=tx2gene)

I have created the colData and used DESeqDataSetFromTximport to construct the Deseq2 data set:

dds <- DESeqDataSetFromTximport(txi = txi,colData = col_data,design = ~ Form)

In this case, all 32 samples are used, now I only want to use a subset of txi by choosing specific samples. Is there a way to subset my current txi rather than constructing a new txi using only the samples that I want?

DEseq2 tximport rna-seq r • 2.7k views
ADD COMMENT
0
Entering edit mode

Does this means after the subset, you should reset the design to the situation of the subset? Thanks!

ADD REPLY
0
Entering edit mode

If the filter changed the design (like removing an entire group), then probably yes.

ADD REPLY
4
Entering edit mode
3.9 years ago
ATpoint 81k

The DESeq2 object is basically a SummarizedExperiment so you can subset this prior to running DESeq using standard operations such as dds_use <- dds[,c(columns_to_keep] where columns_to_keep is a numeric vector with the columns (samples) you want to use.

ADD COMMENT
0
Entering edit mode

That is clear! Thank you for your explanation.

ADD REPLY

Login before adding your answer.

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