To get all pairwise comparisons, it should be as easy as:
BC <- results(dds, contrast=c("condition", "B", "C"),
independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
BC <- lfcShrink(dds, contrast=c("condition", "B", "C"), res=BC)
BD <- results(dds, contrast=c("condition", "B", "D"),
independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
BD <- lfcShrink(dds, contrast=c("condition", "B", "D"), res=BD)
BE <- results(dds, contrast=c("condition", "B", "E"),
independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
BE <- lfcShrink(dds, contrast=c("condition", "B", "E"), res=BE)
CD <- results(dds, contrast=c("condition", "C", "D"),
independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
CD <- lfcShrink(dds, contrast=c("condition", "C", "D"), res=CD)
CE <- results(dds, contrast=c("condition", "C", "E"),
independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
CE <- lfcShrink(dds, contrast=c("condition", "C", "E"), res=CE)
DE <- results(dds, contrast=c("condition", "D", "E"),
independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)
DE <- lfcShrink(dds, contrast=c("condition", "D", "E"), res=DE)
Note that I use lfcShrink
, which you should also use if you had previously used the function DESeq()
with betaPrior=FALSE
You can also do a LRT (likelihood ratio test if you want to compare all levels simultaneously).
What you can do after this is then concatenate all of the statistically significant genes into a unique list and cluster your samples using these, which should bring out good separation in a sample dendrogram (using the regularised log or variance-stabilised counts).
Kevin
Hi Kevin,
I am using your following code but getting error. I don't no why it is showing. Any help will be appreciated.
Hi friend,
Can you run either of these commands on their own to see what is produced?
or, even:
What is the output of
head(res1)
,head(res2)
, andhead(res3)
?Hi Kevin,
The output of
head (res1)
,res2
, andres3
are the comparison that I have taken for analysis, but when I put this all together and assigned to one variable like same in your code i.esigGenes
and it's giving an error.This is my comparison:
output example of
head(res1)
:I want to generate heatmap of all significantly expressed genes from all the above comparisons but can not proceed because of the error.
Can you please use
ADD REPLY
to keep this thread organized rather than the answer field which is for, well, answers.