[BioC] hierarchial clustering

Thomas Girke thomas.girke at ucr.edu
Tue Dec 21 02:37:10 CET 2010

For binary data you could use the hamming/edit distance (implemented in
the e1071 library) and then cluster with hclust. Other distance measures
can be found/constructed in R with ?dist, ?corr, the bioDist library or
search other libraries for more.

# Here is an example for hierarchical clustering and plotting of binary 

# import your binary data with read.table or read.delim; the following 
# example uses random data
y <- matrix(sample(c(0,1), 100, replace=TRUE), 10, 10, dimnames=list(paste("g", 1:10, sep=""), paste("t", 1:10, sep="")))
disma <- hamming.distance(y)
hr <- hclust(as.dist(disma))
plot(as.dendrogram(hr), edgePar=list(col=3, lwd=4), horiz=T)


On Sun, Dec 19, 2010 at 01:17:35AM +0530, Swati Sinha wrote:
> I want to do hierarchial clustering of a binary matrix having 13702 rows and
> 1345 columns?
> How can i do it in R  using bioconductor or using R libraries.
> *Regards*
> *Swati Sinha*
> Ph.D Student
> *C*enter* *for* C*omputational* B*iology and* B*ioinformatics,
> *S*chool of* C*omputational* &* *I*ntegrative* S*ciences
> *J*awaharlal* **N*ehru *U*niversity,
> New Delhi-110067
> 	[[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

More information about the Bioconductor mailing list