Question: Heatmap for RNA-Seq data
gravatar for chetana
3.1 years ago by
San Diego
chetana40 wrote:

I'm trying to generate a heatmap for almost 15,000 genes expression data across different samples. But they are grouped into clusters based on their similar expression across samples and I wanna represent the clusters vs samples rather than the genes vs samples (since they're like 15,000 genes) in the heatmap. Is there a way to do it? I know the melt function in R would help me plot the heat map in the way I want but I'm not sure how to implement it. I expect the heatmap to look something like this []. Thanks in advance.

rna-seq bioinformatics • 2.0k views
ADD COMMENTlink modified 3.1 years ago by Jake Warner810 • written 3.1 years ago by chetana40

Why not use the tool that produced that plot? I mean the figure itself is from the paper describing that tool.

ADD REPLYlink written 3.1 years ago by Devon Ryan96k

I'm sorry if I was not clear, I already have my data grouped into clusters in an another column in the text file. So my input data would be Genes, Clusters, Sample1, Sample2, Sample3, I want clusters vs samples on the heatmap. The paper doesn't mentioned about the data which has already been clustered.

ADD REPLYlink written 3.1 years ago by chetana40

Can you provide me details of how you grouped them into clusters, because I wish to group my genes into cluster and also extract the gene set for each differentially bound clusters.

ADD REPLYlink written 3.1 years ago by macmath140

Provide your link. It's not there

ADD REPLYlink written 3.1 years ago by Chirag Parsania1.8k

Sorry about that, here is the link:

ADD REPLYlink written 3.1 years ago by chetana40
gravatar for Jake Warner
3.1 years ago by
Jake Warner810
Jake Warner810 wrote:

Hi. You can achieve this by calculating the cluster core/ medoid and using those as input into heatmap2 or whatever your preferred heatmap function would be.

I had this function from Michael Dunrop bookmarked to calculate the cores:

clust.core = function(i, data, clusters) {
  ind = (clusters == i)

clusters <-cutree(hr, h=1.5)
cores <- sapply(unique(clusters), clust.core, scaledata, clusters)

In the above, cutree generates clusters by cutting the gene dendrogram at 1.5. Replace clusters with whatever vector contains your cluster assignments.

ADD COMMENTlink written 3.1 years ago by Jake Warner810
Please log in to add an answer.


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