comparison phyloseq_plot_richness.R @ 0:46a99bd1f10e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
author iuc
date Thu, 03 Mar 2022 13:28:04 +0000
parents
children b85ba18a8f36
comparison
equal deleted inserted replaced
-1:000000000000 0:46a99bd1f10e
1 #!/usr/bin/env Rscript
2
3 suppressPackageStartupMessages(library("optparse"))
4 suppressPackageStartupMessages(library("phyloseq"))
5
6 option_list <- list(
7 make_option(c("--input"), action = "store", dest = "input", help = "Input RDS file containing a phyloseq object"),
8 make_option(c("--output"), action = "store", dest = "output", help = "Output PDF")
9 )
10
11 parser <- OptionParser(usage = "%prog [options] file", option_list = option_list);
12 args <- parse_args(parser, positional_arguments = TRUE);
13 opt <- args$options;
14
15 phyloseq_obj <- readRDS(opt$input);
16
17 # Start PDF device driver and generate the plot.
18 dev.new();
19 pdf(file = opt$output);
20 plot_richness(phyloseq_obj, x = "samples", color = "samples");
21 dev.off()