Heatmap for RNA-Seq data
1
0
Entering edit mode
3.9 years ago
chetana ▴ 40

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 [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4489295/figure/F2/]. Thanks in advance.

RNA-Seq Bioinformatics • 2.5k views
ADD COMMENT
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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,...so I want clusters vs samples on the heatmap. The paper doesn't mentioned about the data which has already been clustered.

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Provide your link. It's not there

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode
3.9 years ago
Jake Warner ▴ 810

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)
  colMeans(dat[ind,])
  }

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 COMMENT

Login before adding your answer.

Traffic: 2938 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6