Hi there,
I am running into this issue of pulling pairwise comparison from more than two conditions. In my metadata file, I have 4 conditions (control, treatment A, treatment B, treatment C). I run DESeq() using these all in the experiment design. Now, I like to pull only pairwise comparison between control vs treatment A, control vs treatment B, control vs treatment C. I used the R script to obtain results from dds object:
results(dds, contrast = c("Condition", "control", "treatment A"))
results(dds, contrast = c("Condition", "control", "treatment B"))
results(dds, contrast = c("Condition", "control", "treatment C"))
Unfortunately, this showing me the same log2 fold change results in all conditions. I am not sure what I am missing to pull the specific results.
Any thoughts apart from splitting the condition into separate files and later run DESeq?
Best:
Imran
Please read about
Contrasts
in DESeq2: http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#contrastsIt would also help to see your full code, especially the design matrix.
This is what I did.
dds<-DESeqDataSetFromMatrix(countData=countData, colData=metaData, design=~Condition, tidy=TRUE)
dds_res2<-DESeq(dds)
results(dds_res2, contrast = c("Condition", "control", "treatment A")) results(dds_res2, contrast = c("Condition", "control", "treatment B")) results(dds_res2, contrast = c("Condition", "control", "treatment C"))
A1BG 157.39191 0.8297996 0.147513 5.625258 1.85231e-08 6.18794e-08 A1CF 1.67040 0.0294139 0.199701 0.147289 8.82904e-01 9.11316e-01 A2BP1 52.16153 4.1836383 0.351342 11.907600 1.08042e-32 2.60123e-31 A2LD1 102.03092 0.1000050 0.062534 1.599209 1.09774e-01 1.49459e-01 A2ML1 2.79658 -0.1559784 0.203047 -0.768188 4.42375e-01 5.18189e-01 ... ... ... ... ... ... ... ZYX 3293.91652 0.42727856 0.0971345 4.3988351 1.08833e-05 2.66548e-05 ZZEF1 1282.99635 -0.40347250 0.0518192 -7.7861584 6.90773e-15 4.23169e-14 ZZZ3 878.40774 -0.27809665 0.0529993 -5.2471732 1.54451e-07 4.70318e-07 psiTPTE22 309.35599 -0.35879000 0.1498057 -2.3950358 1.66187e-02 2.63847e-02 tAKR 1.66077 0.00708931 0.1998572 0.0354718 9.71703e-01 9.80386e-01
A1BG 157.39191 -0.2854052 0.371324 -0.76861404 0.4421225 0.807200 A1CF 1.67040 0.0663138 0.513970 0.12902278 0.8973396 0.989695 A2BP1 52.16153 -1.6888653 0.844896 -1.99890440 0.0456187 0.368484 A2LD1 102.03092 0.0015500 0.157749 0.00982574 0.9921603 0.998789 A2ML1 2.79658 -0.1205759 0.516024 -0.23366311 0.8152465 0.982951 ... ... ... ... ... ... ... ZYX 3293.91652 -0.129132 0.245672 -0.525626 0.599148 0.897379 ZZEF1 1282.99635 0.119083 0.131342 0.906670 0.364581 0.754840 ZZZ3 878.40774 0.189783 0.134421 1.411857 0.157992 0.552120 psiTPTE22 309.35599 -0.106312 0.379135 -0.280405 0.779167 0.975233 tAKR 1.66077 -0.415441 0.439627 -0.944985 0.344666 0.740627