search for: hclustfun

Displaying 20 results from an estimated 23 matches for "hclustfun".

2007 Jul 19
3
Error: evaluation nested too deeply when doing heatmap with binary distfunction
Hi netters, I have a matrix X of the size (1000,100). The values are from -3 to +3. When I tried heatmap(X, distfun=function(c),dist(c,method="bin"),hclustfun=function(m),hclust(m,method="average")) I got the error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? However, if I used default parameters for distfunction: heatmap(X, hclustfun=function(m),hclust(m,method="average")) there is no...
2004 Dec 15
1
hclust and heatmap - slightly different dendrograms?
...the two functions (but all individual columns were grouped correctly). Looking through the code for heatmap as a most definite nonexpert, it seems to me that hclust is also invoked by heatmap. > heatmap function (x, Rowv = NULL, Colv = if (symm) "Rowv" else NULL, distfun = dist, hclustfun = hclust, add.expr, symm = FALSE, ... hcr <- hclustfun(distfun(x)) ddr <- as.dendrogram(hcr) .... hcc <- hclustfun(distfun(if (symm) x else t(x))) ddc <- as.dendrogram(hcc) I understand it is possible to add Rowv=NA and order the...
2013 Oct 21
3
Error in heatmap
Hi, Could you please help? Heatmap doesn't work with: > heatmap(as.matrix(SPIV2),na.rm = T) Error in hclustfun(distfun(x)) : NA/NaN/Inf in foreign function call (arg 11) There are no 0 data rows or column Thanks a lot Regards --------------------------------------- David
2009 Apr 07
2
heatmap.2 no reordering of the columns and rows
...pointsize=9) library(gplots) library(RColorBrewer) data <- read.table(inputfile) matrix <- as.matrix(data) cp <- colorRampPalette(c("red","yellow","darkgreen"),space="Lab", bias=1.5) heatmap.2(matrix, Colv=1:ncol(matrix), dendogram="row", hclustfun=function(m) hclust(m,method="complete"),col=cp(25),scale="none",trace="none",keysize=1,margins=c(5,12), cexCol=1, cexRow=1) q() dev.off() The alternative that i tried to avoid the reordering was heatmap.2(matrix, Rowv=NULL, Colv=NULL, col=cp(25), scale="none&qu...
2003 Aug 13
0
re: two dimentional hierarchical clustering algorithm
Dear Dr. Liaw Andy: I have a few more questions about your heatmap function. actually heatmap is what I am looking for. heatmap(x, Rowv, Colv, distfun = dist, hclustfun = hclust, add.expr, scale=c("row", "column", "none"), na.rm = TRUE, ...) my data is a XNEW, > dim(XNEW) [1] 554 335 554 genes, 335 samples. now I want to use 1-CORR as a distance measure and hclust(method="ward") as hclustfun. is there any...
2003 Sep 24
1
heatmap and hclust
Hi all, The function heatmap uses the functions dist and hclust with default parameters. How to change these parameters? For example, i want to use the ward criterion for hierarchical clustering with binary distance. Best regards, Olivier.
2003 Nov 03
0
mva Hclust, heatmap and plotting functions
...etc) I.e. is X coming from the results of dist, hclust or the original data ? If so do you then need to covert it into a numeric matrix ? I've thus far tried the data.matrix function on the output from all of the above only to get: `x' must be a numeric matrix heatmap(DIF123distmatrix, hclustfun=hclust) This command works nicely but obviously plots the same thing on both axes. I've tried something along the lines of: heatmap(DIF123datamat, DIF123clustFLIPasdendro, DIF123clustHCmcquittyasdendro, hclustfun=hclust) but this returns row dendrogram ordering gave index of wrong length whic...
2007 Jan 19
1
Error in heatmap()
Hi, I run into following error when using heatmap() for data matrix "xx". Any help is appreciated? "xx" contains many "NA"s. > hv <- heatmap(data.matrix(xx)) Error in hclustfun(distfun(if (symm) x else t(x))) : NA/NaN/Inf in foreign function call (arg 11) Thanks a lot. Yuhong ********************************************************* THIS ELECTRONIC MAIL MESSAGE AND ANY ATTACHMENT IS CONFIDENTIAL AND MAY CONTAIN LEGALLY PRIVILEGED INFORMATION INTENDE...
2011 Jul 27
0
Inversions in hierarchical clustering were they shouldn't be
...p4") rownames(test) <- c("Gene1","Gene2","Gene3", "Gene4") test <- as.table(test) mat = data.matrix(test) heatmap.2(mat, dendrogram="row", Rowv=TRUE, Colv=FALSE, distfun = function(x) dist(x,method = ''maximum''), hclustfun = function(x) hclust(x,method = ''centroid''), xlab = NULL, ylab = NULL, key=TRUE, keysize=1, trace="none", density.info=c("none"), margins=c(6, 12), col=bluered ) This gives a heatmap with inversions in the cluster tree, which is inherent to the cen...
2007 Nov 01
3
Curry: proposed new functional programming, er, function.
...the new functional programming functions into base I thought I'd ask for a Curry() function. I use a simple one that looks this: Curry = function(FUN,...) { .orig = list(...);function(...) do.call(FUN,c(.orig,list(...))) } This comes in really handy when using say, heatmap(): heatmap(mydata,hclustfun=Curry(hclust,method="average")) or other functions where there are ... arguments, but it's not clear where they should end up. -- Byron Ellis (byron.ellis at gmail.com) "Oook" -- The Librarian
2010 Sep 18
1
Drawing Heatmap using gplots
Hi, I am using heatmap.2 of gplots to make heatmaps of my the attached file. I am giving my code for the same .. library(gplots) x=read.table("1.txt", header=TRUE) mat=data.matrix(x) heatmap.2(mat, col=greenred(75), Rowv=TRUE, Colv=TRUE, distfun = dist, hclustfun = hclust, dendrogram = c("both"), scale = c("row"), na.rm=TRUE, trace="none", sepwidth=c(0.05,0.05), margins = c(5, 10), xlab = "EXPRESSIONS", ylab = "GENES", labRow = NULL, labCol = NULL, key=TRUE, keysize=1, density.info=c("none"), ) I...
2008 Jun 16
1
heatmap.2 dendogram algorithm
Hello does anyone know what algorithm is used to produce the hierarchical clustering in the gplots package using the function heatmap.2? I think it may be the complete linkage clustering algorithm, but I can't find a source that seems reliable. Thank you and sorry if I posted this in the wrong place. If I have, please let me know and I will move it to the appropriate list. -- View this
2008 Nov 04
0
heatmap.2 question
Hi, there, I am planning to use heatmap.2 function to draw some heatmaps. However, I don't want to use default set manhattan distance and complete linkage in heatmap.2. How should I change parameters distfun and hclustfun? Thank you. ys [[alternative HTML version deleted]]
2009 Jul 02
0
using heatmap.2 without specifying Colv and Rowv
...eatmap.2 function in the Bioconductor gplots package. I am trying to create a heatmap diagram from a hierarchical clustering result based on the complete linkage and the pearson correlations as the distance metrics. After reading the help page for heatmap.2, it seems that it calls the distfun and hclustfun with the default settings. Is that the same as doing the below? > hr<-hclust(as.dist(1-cor(t(data), method="pearson")), method="complete) > hc<-hclust(as.dist(1-cor(data, method="pearson")), method="complete) > heatmap.2(data, Rowv=as.dendrogram(hr), Co...
2009 Jul 23
0
using k-means clustering in conjunction with heatmap.2 function
...previous posts on the mailing lists, and the documentation, I've attempted to cluster my data using kmeans using the following modified script: x=read.table('sample.table', header=TRUE) mat=data.matrix(x) km <-kmeans(t(scale(t(mat))), 3); km$cluster heatmap.2(mat, col=redgreen(75), hclustfun=km, trace="none") However, I'm not sure what I need to modify in the heatmap.2 list of parameters to have the matrix reflect a k-means clustering. The above usage will throw an error, since "km" is not a valid heirarchacal clustering function. My question is, what should th...
2011 Apr 13
0
Clustering help in Heat Maps
...rkmagenta','darkviolet','green4')) col=colorRampPalette(c("green","white","red"))(256), #col=greenred(75), #col = cm.colors(256), #bgStyle="3D Rectangle", #bgGradientMode=" Diagonal Edge", Rowv=TRUE, Colv=FALSE, distfun = dist, hclustfun = hclust, dendrogram = c("row"), scale = c("column"), na.rm=TRUE, trace="none", sepwidth=c(0.05,0.05), margins = c(03, 40), xlab = "", ylab = "", labRow = NULL, labCol = NULL, key=TRUE, keysize=1, density.info=c("none"), ) Thanks in adva...
2011 Jul 24
0
setting distance matrix and clustering methods in heatmap.2
...st) <- c("Sample 1","Sample 2","Sample 3", "Sample 4","Sample 5") test <- as.table(test) mat=data.matrix(test) #pdf("heatmap.pdf", height=10, width=10) heatmap.2(mat, dendrogram="row", Rowv=TRUE, Colv=NULL, distfun = dist, hclustfun = hclust, xlab = "Lipid Species", ylab = NULL, colsep=c(1), sepcolor="black", key=TRUE, keysize=1, trace="none", density.info=c("none"), margins=c(8, 12), col=bluered ) -- View this message in context: http://r.789695.n4.nabble.com/setting-distance-matrix-an...
2012 Jan 28
1
gplot heatmap
...lots of R package. The file (new4) is having values 0 and 1 only. library(gplots) library(marray) x=read.table("new4", header=TRUE) mat=data.matrix(x) heatmap.2(mat, col=colorRampPalette(c("black","red"))(256), #col=greenred(75), Rowv=TRUE, Colv=TRUE, distfun = dist, hclustfun = hclust, dendrogram = c("row"), scale = c("row"), na.rm=TRUE, trace="none", sepwidth=c(0.05,0.05), margins = c(25, 20), #xlab = "" ylab = "" labRow = NULL, labCol = NULL, key=TRUE, keysize=1, density.info=c("none") ) I am giving two colo...
2012 Jul 30
1
Z score in gplots
...ng as per the file entries. Any help would be appreciable. library(gplots) x=read.table("final.txt", header=TRUE) mat=data.matrix(x) heatmap.2(mat, col=colorRampPalette(c("green","white","red"))(256), #col=greenred(75), Rowv=TRUE, Colv=FALSE, distfun = dist, hclustfun = hclust, dendrogram = c("row"), scale = c("column"), na.rm=TRUE, trace="none", sepwidth=c(0.05,0.05), margins = c(01, 55), xlab = "", ylab = "", labRow = NULL, labCol = NULL, key=TRUE, keysize=1, density.info=c("none"), ) Thank you in ad...
2009 Jul 21
1
problem with heatmap.2 in package gplots generating non-finite breaks
...ot; [9] "ColSideColors" "Colv" "ddc" "ddr" [13] "dendrogram" "densadj" "denscol" "density.info" [17] "di" "distfun" "hcc" "hclustfun" [21] "hcr" "hline" "iy" "key" [25] "keysize" "labCol" "labRow" "lhei" [29] "linecol" "lmat" "lwid" "main&...