I performed a differential gene expression analysis for the red vs. blue group as shown in this image below (RNA-seq data) using TCGAbiolinks which uses the EdgeR package. Clearly, there is a difference between the groups however the difference is due to under-expression in some samples in the blue group than overall difference uniformly across the groups. How do we generate a heatmap that shows differential expression for situations like these? I could average each group for each gene separately and plot, but is that legitimate? Thanks.