I would like to create a heatmap (in R) to cluster/visualize differentially expressed genes (determined via edgeR) from paired-sample data, in which the data within the pair have greater correlation than within a condition. More specifically, I have 3 pairs of samples. The 2 samples in each pair are biological replicates, with one transfected with a mutant gene and the second with a WT/control gene. Correlation is stronger within the pair than within a condition (mutant vs WT). I've inferred differentially expressed genes using edgeR, which accounts for pairwise correlation. I would now like to display the results (e.g., just plotting the differentially expressed genes) in a heatmap. Unfortunately, the inter-condition differences are masked by the inter-pair differences.
Is there an obvious way to get paired sample correlation-corrected data out of edgeR? My impression is that edgeR's philosophy is not to correct data. I understand that DEseq will provide variance stabilizing transformed data. This might help, but DEseq doesn't handle paired samples, as far as I can see.
I'm not wed to edgeR. e.g., an obvious approach seems to be to visualize the DE genes output by edgeR after subtracting the intra-pair mean of the expression for gene g from each of the two expression values for g in the pair (where expression is counts / effective library size). i.e., if e_g,wt and e_g,mt are the expression for gene g in the wt and mutant, respectively, then do e_g,wt = e_g,wt - (1/2) * ( e_g,wt + e_g,mt ) and similarly for e_g,mt. That seems a bit simplistic though.
Thank you, Brian