Mercurial > repos > iuc > phyloseq_from_dada2
annotate phyloseq_plot_richness.R @ 3:40ebae5bbe51 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 10dfb1308ff858c6623c7dd9215a3bdf518427f9
author | iuc |
---|---|
date | Tue, 03 Dec 2024 17:45:31 +0000 |
parents | b85ba18a8f36 |
children |
rev | line source |
---|---|
0
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
2 |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
3 suppressPackageStartupMessages(library("optparse")) |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
4 suppressPackageStartupMessages(library("phyloseq")) |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
5 |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
6 option_list <- list( |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
7 make_option(c("--input"), action = "store", dest = "input", help = "Input RDS file containing a phyloseq object"), |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
8 make_option(c("--output"), action = "store", dest = "output", help = "Output PDF") |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
9 ) |
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
10 |
1
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
11 parser <- OptionParser(usage = "%prog [options] file", option_list = option_list) |
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
12 args <- parse_args(parser, positional_arguments = TRUE) |
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
13 opt <- args$options |
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
14 phyloseq_obj <- readRDS(opt$input) |
0
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
15 # Start PDF device driver and generate the plot. |
1
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
16 dev.new() |
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
17 pdf(file = opt$output) |
b85ba18a8f36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
iuc
parents:
0
diff
changeset
|
18 plot_richness(phyloseq_obj, x = "samples", color = "samples") |
0
46a99bd1f10e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit d1004c06207be773c278e12745aada276b63172e"
iuc
parents:
diff
changeset
|
19 dev.off() |