Question: plot phylogenetic tree with ggtree
0
gravatar for erickurod93
10 months ago by
erickurod930 wrote:

hello, I would like to do a plot with ggtree, I have a phylogenetic tree, a vector with continuous values, and a matrix with binary data (0 and 1). I'd like to plot them in an single plot, I mean colour the tree with the continuous scale and a heatmap with binary data, I have tried whit the next code, but it doesn't work

          p <- ggtree(phylogenetic_tee, mrsd="2018-10-01",ladderize = T) + geom_treescale(x=2008, y=-1, offset=1) 
p <- p + geom_tiplab()
    p %<+% vector_continuouos + aes(color=my_var)
        heatmap_b <- gheatmap(p, binary_matrix, offset=1, width=2, font.size=1, colnames_angle=90, hjust=0.01,low = "green",
                 high = "blue", color = "white", colnames = TRUE,
                 colnames_position = "top") +
          scale_color_continuous(aes(color=my_var ),low='darkgreen', high='red')
R • 532 views
ADD COMMENTlink written 10 months ago by erickurod930

Can you upload your tree and matrix data ?

ADD REPLYlink written 10 months ago by Chirag Parsania1.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 534 users visited in the last hour