Hello, I am working with a bulk RNA-seq dataset that I am analyzing using DESeq2. This dataset has 3 treatment groups (I, II, III), and 2 genotypes (A, B). I'm mainly looking at the differences between the 2 genotypes under each treatment (eg using 3 contrasts for I_A vs I_B, II_A vs II_B, and III_A vs III_B).
I would like to use plotCounts()
to plot the gene counts of a single gene, comparing the counts between the 2 genotypes, but for one contrast. Is there a way to do this without making a separate dds
object?
I know I can use the following code to plot the gene counts between genotypes, but it would include samples from all treatments:
plotCounts(dds, gene="gene", intgroup="genotype")
I know I can look at gene counts of a single contrast by making a separate dds object with just the samples from one contrast (eg one with samples just looking at treatment I), but I wanted to know if there was a way to do that without making separate dds objects. I wasn't sure since when making contrasts, it produces a DESeqResults
object rather than DESeqDataSet
. Thank you!
Yes, from ?plotCounts: