I'm trying to make a heatmap of the most significantly differentially expressed genes from some RNA-seq data. I have several different conditions and a control condition with triplicate repeats for each condition. I want to plot the log fold change for the different samples to visualise how they differ from the control rather than how they differ from the average across all samples (which is what I believe heatmaps normally show and I have been able to generate) - so as the control is no change it wouldn't necessarily be included in the plot.
So far I have done:
ddsObj.raw<- DESeqDataSetFromMatrix(countData=data, colData=sampleinfo, design=~Condition) ddsObj<-DESeq(ddsObj.raw)
I know I can use
res<- results(ddsObj, contrast=c("Condition","Treatment1","Control") log2_changes<-res[,"log2FoldChange"]
to extract the log2 fold changes for a specified pair wise comparison.
Is there a way I can extend this to include the other conditions as well, i.e. to also have treatment2 v control, treatment3 v control, etc and to use this to plot a heatmap of the most significantly differentially expressed genes. Is there a way to do this that is easier than going through all the pairwise comparisons individually and merging them together into one data frame?
I'm relatively new to bioinformatics so I hope this is ok to ask, if anyone can help or point me in the direction of a good tutorial it would be really, really appreciated!