Pheatmap on Rstudio
0
0
Entering edit mode
23 months ago
Mahnoor • 0

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 • 749 views
ADD COMMENT
0
Entering edit mode

possible solution: link

ADD REPLY

Login before adding your answer.

Traffic: 2454 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