Hi all,
I have 2 batches of RNA-seq experiments with two conditions: genotype (wt, mut) and age (P2, P10 and P30). I would like to use DESeq2 to compare genotypes at each of the different ages. How can I make this comparison while accounting for the batch effect?
dds <- DESeqDataSetFromMatrix(countData = all, colData=annot, design= ~ Batch + Age + Genotype)
dds <- DESeq(dds, test="Wald")
resultsNames(dds)
If I run resultsNames(dds), I have the following tests:
resultsNames(dds)
[1] "Intercept"
[2] "group_Batch1P2wt_vs_Batch1P2mut"
[3] "group_Batch1P10mut_vs_Batch1P2mut"
[4] "group_Batch1P10wt_vs_Batch1P2mut"
[5] "group_Batch2P30mut_vs_Batch1P2mut"
[6] "group_Batch2P30wt_vs_Batch1P2mut"
[7] "group_Batch2P2mut_vs_Batch1P2mut"
[8] "group_Batch2P2wt_vs_Batch1P2mut"
[9] "group_Batch2P10mut_vs_Batch1P2mut"
[10] "group_Batch2P10wt_vs_Batch1P2mut"
I would like to compare e.g. P10wt to P10mut regardless of the batch; how can I do this?
I know the following code is incorrect, but in essence something like this:
res_test <- results(dds, contrast=c("group", c("Batch2P2mut", "Batch1P2mut"), c("Batch2P2wt", "Batch1P2wt")))
Thank you!