Mercurial > repos > dfornika > render_tree
annotate render_tree.R @ 0:342fe8c2d8bb draft
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:13:08 -0400 |
parents | |
children | 9f0241ee55e8 |
rev | line source |
---|---|
0
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
2 |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
3 suppressMessages( |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
4 library(ggtree) |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
5 ) |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
6 |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
7 args = commandArgs(trailingOnly=TRUE) |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
8 |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
9 tree <- read.tree(args[1]) |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
10 |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
11 tree_plot <- ggplot(tree, aes(x, y)) + |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
12 geom_tree() + |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
13 theme_tree2() + |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
14 geom_tiplab() |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
15 |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
16 suppressMessages( |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
17 ggsave(args[2], plot=tree_plot, device="png") |
342fe8c2d8bb
planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/render_tree commit 8898f2229ec13917b7d96e20725f3871d9d93e90-dirty
dfornika
parents:
diff
changeset
|
18 ) |