# HG changeset patch # User dfornika # Date 1561781588 14400 # Node ID 342fe8c2d8bb95a981d0bfbd58278debdd26ac42 planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty diff -r 000000000000 -r 342fe8c2d8bb render_tree.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/render_tree.R Sat Jun 29 00:13:08 2019 -0400 @@ -0,0 +1,18 @@ +#!/usr/bin/env Rscript + +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() + +suppressMessages( + ggsave(args[2], plot=tree_plot, device="png") +) diff -r 000000000000 -r 342fe8c2d8bb render_tree.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/render_tree.xml Sat Jun 29 00:13:08 2019 -0400 @@ -0,0 +1,36 @@ + + render a newick tree + + bioconductor-ggtree + + echo '0.1.0' + + + + + + + + + + + + +@article{yu2017ggtree, + title={ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data}, + author={Yu, Guangchuang and Smith, David K and Zhu, Huachen and Guan, Yi and Lam, Tommy Tsan-Yuk}, + journal={Methods in Ecology and Evolution}, + volume={8}, + number={1}, + pages={28--36}, + year={2017}, + publisher={Wiley Online Library} +} + + + diff -r 000000000000 -r 342fe8c2d8bb test-data/data.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/data.csv Sat Jun 29 00:13:08 2019 -0400 @@ -0,0 +1,9 @@ +taxa,number,fruit +A,1,apple +B,2,banana +C,3,carrot +D,4,date +E,5,eggplant +F,6,fruit +G,7,grape +H,8,honeydew \ No newline at end of file diff -r 000000000000 -r 342fe8c2d8bb test-data/tree.nhx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/tree.nhx Sat Jun 29 00:13:08 2019 -0400 @@ -0,0 +1,19 @@ +( +( +( +( +F:0.00037, +C:0.00093) +:0.00242, +B:0.00448) +:0.00500, +( +E:0.03441, +D:0.02059) +:0.00888) +:0.00307, +G:0.00154, +( +H:0.00000, +A:0.00000) +:0.00141); diff -r 000000000000 -r 342fe8c2d8bb test-data/tree.png Binary file test-data/tree.png has changed