Mercurial > repos > iuc > phyloseq_from_dada2
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phyloseq_plot_richness.R Thu Mar 03 13:28:04 2022 +0000 @@ -0,0 +1,21 @@ +#!/usr/bin/env Rscript + +suppressPackageStartupMessages(library("optparse")) +suppressPackageStartupMessages(library("phyloseq")) + +option_list <- list( + make_option(c("--input"), action = "store", dest = "input", help = "Input RDS file containing a phyloseq object"), + make_option(c("--output"), action = "store", dest = "output", help = "Output PDF") +) + +parser <- OptionParser(usage = "%prog [options] file", option_list = option_list); +args <- parse_args(parser, positional_arguments = TRUE); +opt <- args$options; + +phyloseq_obj <- readRDS(opt$input); + +# Start PDF device driver and generate the plot. +dev.new(); +pdf(file = opt$output); +plot_richness(phyloseq_obj, x = "samples", color = "samples"); +dev.off()