Entering edit mode
meseretbrihanu
▴
10
@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
I tried recreating the issue and the heatmap was generated without a problem. What version of R and pheatmap are you using?