i'm using deseq2 for my RNASeq analysis.
i have 2 factors, each has 2 levels:
1. genotype : col (wildtype), M6_5 (mutant)
2. treatment: Nacl, control
my design is: ~ genotype + treatment + treatment:genotype.
to get the effect of the treatment for each genotype i used:
results(dds, contrast = c("treatment","Nacl","control")
results(dds,list(c("treatment_Nacl_vs_control","genotypeM6_5.treatmentNacl"))
and to test differences between genotype on the same treatment conditions i used:
results(dds, contrast = c("genotype","M6_5","col")
results(dds, list(c("genotype_M6_5_vs_col","genotypeM6_5.treatmentNacl" ))
now, i'm looking for the comparison : M6_5 Nacl vs col control and M6_5 control vs col Nacl
is that possible using my design?
thanks a lot
hey Erin,
it seems that it answers the pairwise comparisons of the effect of the treatment for each genotype, or the genotype gene expression on the same treatment.
what i'm trying to do is to mix between different levels of each factor. so if i have genotype I,II and treatment A,B i'm looking for the comparison: II A / I B and II B / I A.
Hi hamaor, I think this would still work for you--see the section of the vignette Michael referenced for more info.
To explain, after creating the a "group" factor (
dds$treatment
anddds$genotype
are concatenated to make 1 factor with 4 levels), you can tell the contrasts to run whatever combination of levels you prefer(colcontrol, colNaCl, M6_5control, M6_5NaCl)
. In this case, your design is~ group
and you'd generate the contrasts you want by running: