Question: GSEA /enrichment plot with heat map
0
gravatar for IrK
3.4 years ago by
IrK20
Australia
IrK20 wrote:

Hi guys, 

 I am wondering if its possible to build GSEA enrichment plots and heat maps of the same scale, exactly as it's done on the paper  (Fig 1. Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles./Subramanian A    http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1239896/figure/fig1/)

I produced  enrichment plots with javaGSEA Desktop Application, but I would like to have a  heat map scaled to gene set.  (Fig2 at http://www.jbc.org/content/285/18/13742.full)

 

Thank you

rna-seq • 2.8k views
ADD COMMENTlink modified 3.3 years ago • written 3.4 years ago by IrK20
0
gravatar for Benn
3.4 years ago by
Benn6.7k
Netherlands
Benn6.7k wrote:

You can use heatmap.2 in R from library(gplots), it has a RowSideColors option for sidebars.

ADD COMMENTlink written 3.4 years ago by Benn6.7k
0
gravatar for IrK
3.4 years ago by
IrK20
Australia
IrK20 wrote:

Thank you,

may be I am asking a nonsense question.... ;)

 but I would like to show visually a correlation of gene sets (I have three of them) to a heat map. So I would have a heat map and then three gene sets beside. I thought may be there is a R function which will help me to make it correctly and at the right scale.However, more I search for this, more I think that it is just an image editing work without any functions ;). Probably guys from mentioned above publications, just took a heat map, than transposed enrichment plot (may be made it bigger or smaller) and  presented together. ;)

and I am breaking my head how I can do it in R ;))))))  

 

 

 
ADD COMMENTlink modified 3.4 years ago • written 3.4 years ago by IrK20
1

Correct me if I am wrong... You want to make a heatmap and present next to it three bars, where you indicate if a gene is in a certain gene set or not?

Like I said before, you can use heatmap.2 in R. You'll have to label all the genes for each gene set (present or not), so 3 separate labels (vectors) and use them for RowSideColors.

ADD REPLYlink written 3.4 years ago by Benn6.7k

yeah, you understood me correctly.

So you are suggesting the following (just a dummy small example):

heat_map_matrix=replicate(10,rnorm(10))    # basically its my Gen.Expr values

# According to heatmap.2 documentation:
# Create a character vector of length nrow(x) containing the color names for a vertical side bar
# Let's say I color present genes from my gene set in "Green" color, and absent genes in "Red" color

labeled_gene_set=c('red','green','red','red','red','green','red','green','red','red')

heatmap.2(heat_map_matrix, RowSideCol=labeled_gene_set, Rowv=F, Colv=T)

SO I will get a heat map and beside a colored line whether a green color indicates a presence of the gene (from gene list)
and red - absence.

Its not exactly what I was looking for, but its a good solution as well.It was a perfect solution in case the RowSideCol would be just a vector of values.

 However I am wondering how would you plot three gene sets beside each other, I managed only one (labeled_gene_set).

ADD REPLYlink written 3.3 years ago by IrK20

I think there's an older post about putting more bars next to the heatmap: How Do I Draw A Heatmap In R With Both A Color Key And Multiple Color Side Bars?

It's not easy, but the end results may look very nice! Good luck!

ADD REPLYlink written 3.3 years ago by Benn6.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1622 users visited in the last hour