I have created a matrix and now I would like to use pheatmap to draw a heatmap while preserving the order of the matrix rows. I would like to turn clustering off. Currently, pheatamp is clustering the rows when I run the following script:
tissuedata<-read.table('OrderedByGeneCounts.csv', header=TRUE, sep=',')
tissuedata2<-data.matrix(tissuedata)
tissuedata3<-log10(tissuedata2)
is.na(tissuedata3) <- do.call(cbind,lapply(tissuedata3, is.infinite))
tissuedata3[is.na(tissuedata3)] <- 0
tissue_exons<-scan(file="OrderedExonsList.txt", what="character", strip.white=TRUE)
rownames(tissuedata3)<-tissue_exons
pdf(file="pheatmapENSG00000026025.pdf", paper="a4", height=15)
pheatmap(tissuedata3,
color = colorRampPalette(rev(c("#D73027", "#FC8D59", "#FEE090", "#FFFFBF", "#E0F3F8", "#91BFDB", "#4575B4")))(100),
cellwidth = 25, cellheight = 3.8,
treeheight_row = 0,
treeheight_column=0,
kmeans_k = NA,
show_rownames = T, show_colnames = T,
fontsize=4,
scale="none",
legend=FALSE,
)
dev.off()
pheatmap(..., cluster_rows=FALSE, cluster_cols=FALSE)
in general, as per @blmoore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With