comparison CAMERA_combinexsAnnos.r @ 6:2443150161b4 draft default tip

planemo upload commit cfad09eb4dd6b1439b7de6a0852cd8fa22210f58
author workflow4metabolomics
date Mon, 11 Sep 2023 22:41:22 +0000
parents 4c4945bce185
children
comparison
equal deleted inserted replaced
5:617cf0705775 6:2443150161b4
3 # ----- PACKAGE ----- 3 # ----- PACKAGE -----
4 cat("\tSESSION INFO\n") 4 cat("\tSESSION INFO\n")
5 5
6 #Import the different functions 6 #Import the different functions
7 source_local <- function(fname) { 7 source_local <- function(fname) {
8 argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/")) 8 argv <- commandArgs(trailingOnly = FALSE)
9 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
10 source(paste(base_dir, fname, sep = "/"))
9 } 11 }
10 source_local("lib.r") 12 source_local("lib.r")
11 13
12 pkgs <- c("CAMERA", "multtest", "batch") 14 pkgs <- c("CAMERA", "multtest", "batch")
13 loadAndDisplayPackages(pkgs) 15 loadAndDisplayPackages(pkgs)
14 cat("\n\n"); 16 cat("\n\n")
15 17
16 # ----- ARGUMENTS ----- 18 # ----- ARGUMENTS -----
17 cat("\tARGUMENTS INFO\n") 19 cat("\tARGUMENTS INFO\n")
18 20
19 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects 21 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects
20 write.table(as.matrix(args), col.names = F, quote = F, sep = "\t") 22 write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t")
21 23
22 cat("\n\n"); 24 cat("\n\n")
23 25
24 26
25 # ----- PROCESSING INFILE ----- 27 # ----- PROCESSING INFILE -----
26 cat("\tINFILE PROCESSING INFO\n") 28 cat("\tINFILE PROCESSING INFO\n")
27 29
54 56
55 # ----- PROCESSING INFO ----- 57 # ----- PROCESSING INFO -----
56 cat("\tMAIN PROCESSING INFO\n") 58 cat("\tMAIN PROCESSING INFO\n")
57 59
58 cAnnot <- combinexsAnnos_function( 60 cAnnot <- combinexsAnnos_function(
59 xaP = xaP, xaN = xaN, 61 xaP = xaP, xaN = xaN,
60 diffrepP = diffrepP, diffrepN = diffrepN, 62 diffrepP = diffrepP, diffrepN = diffrepN,
61 pos = args$pos, tol = args$tol, ruleset = args$ruleset, keep_meta = args$keep_meta, 63 pos = args$pos, tol = args$tol, ruleset = args$ruleset, keep_meta = args$keep_meta,
62 convertRTMinute = args$convertRTMinute, numDigitsMZ = args$numDigitsMZ, numDigitsRT = args$numDigitsRT, 64 convertRTMinute = args$convertRTMinute, numDigitsMZ = args$numDigitsMZ, numDigitsRT = args$numDigitsRT,
63 variableMetadataOutput = "variableMetadata.tsv" 65 variableMetadataOutput = "variableMetadata.tsv"
64 ) 66 )
65 67
66 # ----- EXPORT ----- 68 # ----- EXPORT -----
67 69
68 #saving R data in .Rdata file to save the variables used in the present tool 70 #saving R data in .Rdata file to save the variables used in the present tool