cluster analysis - Get specific elements from clustered data in R -
i generate image using hclust
function. wand id of elements highlighted squares.
http://i59.tinypic.com/117u2ro.jpg
is there way id , related value clusted datasets? thanks
edit
i used r script
library(gplots) library(geneplotter) # read data in url bots <- read.table("expression.txt") # alpha data abot <- bots[,c(1:9)] rownames(abot) <- bots[,1] abot[1:7,] # rid of nas abot[is.na(abot)] <- 0 # need find way of reducing data. can't anova there no # replicates. sort on max difference , take first 1000 min <-apply(abot, 1, min) max <- apply(abot, 1, max) sabot <- abot[order(max - min, decreasing=true),][1:1000,] # cluster on correlation cdist <- as.dist(1 - cor(t(sabot))) hc <- hclust(cdist, "average") # draw heatmap x11() heatmap.2(as.matrix(sabot), rowv=as.dendrogram(hc), colv=false, cexrow=1, cexcol=1, dendrogram="row", scale="row", trace="none", density.info="none", key=false, col=greenred.colors(80))
and data
yf mf sf yl ml sl stem root sule 1 31.64075611 32.2728151 38.81790359 252.8901009 269.7599455 138.5011042 16.58308894 10.47935935 3.364295997 2 6.484902171 9.141084197 5.748798541 3.637332586 4.762966989 4.149302282 7.194971046 9.932508868 1.600027931 3 14.15218386 8.784155316 9.740794214 6.566584262 6.130503033 7.747728536 12.57014531 15.75181203 9.22907038 4 15.72881736 19.95755802 10.13050089 10.31313758 9.838844457 14.24864327 13.00442008 23.85404067 12.17251862 5 30.45475953 15.57131432 17.15277867 8.884751572 8.78786964 12.4745649 11.90176123 35.9844343 6.904763942 6 15.87149807 19.05523246 13.12846166 12.99750491 15.3775883 19.0044086 21.66051467 20.38501538 39.58478032 7 16.58935728 18.63990933 17.20955634 13.04423927 29.98424087 18.02165996 22.22403582 32.38377369 10.90832984 8 29.91118855 19.65844846 23.45958109 62.56338088 55.3926187 39.85296152 31.4832543 14.8484163 1.326553777 9 4.09192129 15.52499475 12.14321788 1.680854758 3.448485979 5.245481483 15.14443161 28.85873063 1.073855381 10 7.02768911 4.267210165 3.383501945 3.53716686 3.105614581 3.493791292 3.806360251 6.713067543 3.338740245 11 17.61821596 18.03607855 12.939663 8.951935241 15.45268577 15.53817186 20.5098186 23.42760284 27.97680418 12 66.35291651 40.41837702 37.7239447 32.42998176 30.09696289 27.81089554 33.27197681 46.5393928 4.141505618 13 15.45804403 15.98469202 17.21176468 9.105208867 11.76140929 13.9751105 14.72159466 25.68388472 7.493988128
Comments
Post a Comment