Hello,

I'm just a beginner and probably there is a better way to do it but here it
goes:

#cluster analysis

Euclidean_Distance <- dist(mydata, method="euclidean", diag=FALSE
, upper=FALSE, p=2)
data <- hclust(Euclidean_Distance, method="ward", members=NULL)
plot(data,hang=-1)


#K=4  # i chose to divide my data in 4 clusters)

X <- rect.hclust(data, k=4, border="red")
summary(X)

#to isolate each cluster
#identify samples in each cluster

cluster_1 <- as.vector(X[[1]])
cluster_2 <- as.vector(X[[2]])
cluster_3 <- as.vector(X[[3]])
cluster_4 <- as.vector(X[[4]])

hope that helps.

Best regards,

Catarina Maia

2013/4/21 Sudhir Singh <sudhir.thakurela@gmail.com>

>  Hi,
>
> I have created a heatmap using heatmap.2 having 7 clusters.  I would like
> to extract the list of genes that are in these 7 clusters.
>
>  Is there any function that can be used to extract genes for each cluster?
>
> Cheers,
>
> Sudhir
>
> --
> __________________________________________________________
>
> SAVE PAPER - Please do not print this e-mail unless absolutely necessary
> Being happy doesn't mean everything's perfect.
> It means you've decided to see beyond  imperfections.
> __________________________________________________________
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

