diff xcms_xcmsSet.r @ 33:f5d51091cf84 draft

planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
author workflow4metabolomics
date Mon, 11 Sep 2023 09:22:36 +0000
parents b02d1992a43a
children
line wrap: on
line diff
--- a/xcms_xcmsSet.r	Wed Apr 07 16:47:14 2021 +0000
+++ b/xcms_xcmsSet.r	Mon Sep 11 09:22:36 2023 +0000
@@ -11,19 +11,21 @@
 
 #Import the different functions
 source_local <- function(fname) {
-  argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/"))
+  argv <- commandArgs(trailingOnly = FALSE)
+  base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
+  source(paste(base_dir, fname, sep = "/"))
 }
 source_local("lib.r")
 
 pkgs <- c("xcms", "batch")
 loadAndDisplayPackages(pkgs)
-cat("\n\n");
+cat("\n\n")
 
 
 # ----- ARGUMENTS -----
 cat("\tARGUMENTS INFO\n")
 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects
-write.table(as.matrix(args), col.names = F, quote = F, sep = "\t")
+write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t")
 
 cat("\n\n")
 
@@ -34,7 +36,7 @@
 #saving the commun parameters
 BPPARAM <- MulticoreParam(1)
 if (!is.null(args$BPPARAM)) {
-    BPPARAM <- MulticoreParam(args$BPPARAM)
+  BPPARAM <- MulticoreParam(args$BPPARAM)
 }
 register(BPPARAM)
 
@@ -47,9 +49,9 @@
 method <- args$method
 
 if (!is.null(args$roiList)) {
-    cat("\t\troiList provided\n")
-    args$roiList <- list(getDataFrameFromFile(args$roiList))
-    print(args$roiList)
+  cat("\t\troiList provided\n")
+  args$roiList <- list(getDataFrameFromFile(args$roiList))
+  print(args$roiList)
 }
 
 cat("\n\n")
@@ -103,7 +105,7 @@
 if (exists("peaklistParam")) {
   if (peaklistParam) {
     cat("\nCreating the chromatographic peaks' table...\n")
-    write.table(chromPeaks(xdata), file = "chromPeak_table.tsv", sep = "\t", quote = F, row.names = F)
+    write.table(chromPeaks(xdata), file = "chromPeak_table.tsv", sep = "\t", quote = FALSE, row.names = FALSE)
   }
 }