This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Pheatmap on Rstudio

I have a data of 1510 paratyphi B isolates, downloaded from ENA. I have made a metadata of these isolates containing isolation source, continents and AMR phenotypes based on STAR-AMR (bioinfo-tool). I am trying to build a heatmap using pheatmap package on rstudio. the following commandlines giving this error :

ERROR: Error in check.length("fill") :    'gpar' element 'fill' must not be length 0

Please suggest me a relevant solution of this error.

Thank you!

Commands:

amr <- read.csv("test_csv.csv", header = T, sep = ",", row.names = 1)
z <- amr[,-1:-2]
zz <- as.matrix(z)
zz
ann <- data.frame(row.names = amr$Sample_ids, Continent=amr$Continents)
ann

library(RColorBrewer)
newCols <- colorRampPalette(grDevices::rainbow(length(unique(ann$Continent))))
annoCol <- newCols(length(unique(ann$Continent)))
names(annoCol) <- unique(ann$Continent)
annoCol <- list(category = annoCol)

pheatmap(a, scale = "row", cluster_cols = T, cluster_rows = T, clustering_distance_rows =  "correlation", annotation_row = ann, annotation_colors =  annoCol)
rstudio r pheatmap

0 answers

No answers yet.

Log in to answer this question.