view render_tree.R @ 2:96406ba2696b draft default tip

planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
author dfornika
date Sat, 29 Jun 2019 00:54:28 -0400
parents 9f0241ee55e8
children
line wrap: on
line source

#!/usr/bin/env Rscript

library(grid)

suppressMessages(
  library(ggtree)
)

args = commandArgs(trailingOnly=TRUE)

tree <- read.tree(args[1])

tree_plot <- ggplot(tree, aes(x, y)) + 
  geom_tree() + 
  theme_tree2() +
  geom_tiplab(size=3, align=TRUE, hjust=-0.1) + ggplot2::xlim(0, 0.08) +
  geom_tippoint() +
  theme(plot.margin=unit(c(1,1,1,1),"cm"))

suppressMessages(
  ggsave(args[2], plot=tree_plot, device="png")
)