Hi everyone,
I have two RNA-seq experiments that I have done separately with different tissues (tissue 1-4) and different conditions (treatment 1 and treatment 2).
Initially, I want to compare the tissue types within each experiment (eg, tissue 1 vs tissue 2, etc, all under treatment 1 or treatment 2).
But now I was thinking is it possible to compare the same tissue type between experiments (eg. treatment 1 vs treatment 2 of tissue 1 etc.).
I had a look at other people's posts, some were talking about combing and how to remove the batch effect, etc. But I want to know how to combine two RNA-seq data or DESeq objects (i have the dds from both expts). Is there a function in DESeq2 that can do that? Or shall i combine the normalized counts from both expts, then use the DataFromMatrix function?
thanks
Hello Luke,
Since DESeq2 takes raw counts, and provided that you only have the DESeq objects, you can extract raw counts with
After making sure that both of your dataset have the same genes in the same order, you can then use cbind() to combine the two count_tables. For coldata, you can add a new variable "experiment" like this:
Then you can test if experiment has any effect on gene expression with:
Please get used to use dedicated setter and getter functions rather than accessing slots manually. The structure of a data object might change so code might break while getters and setters are preserved.
Counts should be ontained by
counts(dds, normalized=TRUE/FALSE)
, then there are other getters likesizeFactors()
, and pretty much everything as in a SummarizedExperiment as the DESeqDataSet format builds on top of that.As for the question at hand, if the experimental design allows combination of data (so batch effect is not nested by experiment) then just cbind the data together and include the batch factor into the design.
thanks ATpoint
thanks Tzu