Question: Extracting ids of a cluster in heatmap
0
gravatar for pbigbig
3.0 years ago by
pbigbig200
United States
pbigbig200 wrote:

Hi everyone,

Sorry for a quite basic question regarding RNAseq analysis.

For the log-transformed FPKM values which made from Cuffdiff output, I have created a gene expression heatmap by pheatmap package in R. Those genes in rows are hierarchical clustered by pheatmap (clustering_distance_rows = "euclidean") to form a dendrogram structure. I wonder that how could I get hundreds of gene ids belonged to an interested branch (that is too many to be possibly read from row names) ? Does pheatmap offer this feature or should I use another R package to get those ids? Please give me suggestion and detail explanation if possible.

Thank you very much.

heatmap pheatmap rnaseq • 3.3k views
ADD COMMENTlink modified 3.0 years ago by igor8.2k • written 3.0 years ago by pbigbig200
2
gravatar for igor
3.0 years ago by
igor8.2k
United States
igor8.2k wrote:

You can extract the genes in the clustered order if you save the pheatmap object.

map = pheatmap(x, ... )
x[map$tree_row$order,]
ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by igor8.2k

thanks a lot, however if I cluster with kmean, does it still work?

map <- pheatmap(x, kmean-k= 50, ... )

ADD REPLYlink written 3.0 years ago by pbigbig200
0
gravatar for vivekbhr
3.0 years ago by
vivekbhr530
Germany
vivekbhr530 wrote:

You can create your own dendrograms, using the hclust function, give this output to pheatmap to make heatmap (cluster_rows option ) . Then cut the clusters of your dendrogram using the cutree function in R to get a vector that tells you which entry belongs to which cluster.

ADD COMMENTlink written 3.0 years ago by vivekbhr530

thank you for your suggestion!

ADD REPLYlink written 3.0 years ago by pbigbig200
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: 633 users visited in the last hour