diff phyloseq_plot_ordination.R @ 1:92e77800ef2c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/phyloseq commit 7df921baa7aa8680421b9440a1cd6eaab1a15ce2
author iuc
date Fri, 09 Feb 2024 21:42:09 +0000
parents 11d43fa12aab
children
line wrap: on
line diff
--- a/phyloseq_plot_ordination.R	Thu Mar 03 13:28:30 2022 +0000
+++ b/phyloseq_plot_ordination.R	Fri Feb 09 21:42:09 2024 +0000
@@ -11,20 +11,17 @@
     make_option(c("--output"), action = "store", dest = "output", help = "Output")
 )
 
-parser <- OptionParser(usage = "%prog [options] file", option_list = option_list);
-args <- parse_args(parser, positional_arguments = TRUE);
-opt <- args$options;
-
+parser <- OptionParser(usage = "%prog [options] file", option_list = option_list)
+args <- parse_args(parser, positional_arguments = TRUE)
+opt <- args$options
 # Construct a phyloseq object.
-phyloseq_obj <- readRDS(opt$input);
-
+phyloseq_obj <- readRDS(opt$input)
 # Transform data to proportions as appropriate for
 # Bray-Curtis distances.
-proportions_obj <- transform_sample_counts(phyloseq_obj, function(otu) otu / sum(otu));
-ordination_obj <- ordinate(proportions_obj, method = opt$method, distance = opt$distance);
-
+proportions_obj <- transform_sample_counts(phyloseq_obj, function(otu) otu / sum(otu))
+ordination_obj <- ordinate(proportions_obj, method = opt$method, distance = opt$distance)
 # Start PDF device driver and generate the plot.
-dev.new();
-pdf(file = opt$output);
-plot_ordination(proportions_obj, ordination_obj, type = opt$type);
-dev.off();
+dev.new()
+pdf(file = opt$output)
+plot_ordination(proportions_obj, ordination_obj, type = opt$type)
+dev.off()