Skip to content

Commit

Permalink
plotDist
Browse files Browse the repository at this point in the history
  • Loading branch information
noriakis committed Jun 21, 2024
1 parent 56d1678 commit d2b001b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/plotDist.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ plotDist <- function(stana, sp, cl=NULL, AAfunc=dist.ml, AAargs=list(),
sn <- attr(d, "Labels")
}
if (length(cl)!=0) {
met <- data.frame(listToNV(cl))
met <- data.frame(met[sn, ]) %>% `row.names<-`(sn) %>% `colnames<-`(c("group"))
met <- listToNV(cl)[sn]
met <- data.frame(met) %>% `row.names<-`(sn) %>% `colnames<-`(c("group"))
gr <- met$group
gr[is.na(gr)] <- "No group"
met$group <- gr
pheatmap(d, annotation_row=met)
} else {
pheatmap(d)
Expand Down

0 comments on commit d2b001b

Please sign in to comment.