Pheatmap clustering and row annotation
0
1
Entering edit mode
@meseretbrihanu-14027
Last seen 7.2 years ago

Hi,

I have the following R code to annotate clusters by row:

My data http://dpaste.com/2DM3YAF

coldf http://dpaste.com/04D4J2X

pres <- pheatmap(tpm.filter.mean, cluster_rows=TRUE, show_rownames=FALSE, show_colnames = FALSE, cluster_cols=FALSE, annotation_col = coldf, main="Heatmap", scale="row")

pres.clust <- cbind(pres, cluster = cutree(pres$tree_row, k = 50))
pres.clust <- as.data.frame(unlist(pres.clust[,2]))
colnames(pres.clust) <- c("cluster")
ann.cols <- list(cluster=rainbow(10))

pheatmap(tpm.filter.mean, cluster_rows=TRUE, show_rownames=FALSE, show_colnames = FALSE, cluster_cols=FALSE, annotation_col=coldf, main="Heatmap", scale="row", annotation_row = pres.clust, cutree_rows = 10, annotation_colors = ann.cols)

I get the following error report.

no non-missing arguments to min; returning Infno non-missing arguments to max; returning -Inf
 Hide Traceback
Error in seq.int(rx[1L], rx[2L], length.out = nb) : 'from' must be finite

R pheatmap cutree • 11k views
ADD COMMENT
0
Entering edit mode

I tried recreating the issue and the heatmap was generated without a problem. What version of R and pheatmap are you using?

 

ADD REPLY

Login before adding your answer.

Traffic: 581 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6