Mercurial > repos > lecorguille > msnbase_readmsdata
comparison msnbase_readmsdata.r @ 15:7faf9b2d83f6 draft
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
author | workflow4metabolomics |
---|---|
date | Mon, 11 Sep 2023 09:24:51 +0000 |
parents | 11ab2081bd4a |
children |
comparison
equal
deleted
inserted
replaced
14:11ab2081bd4a | 15:7faf9b2d83f6 |
---|---|
9 # ----- PACKAGE ----- | 9 # ----- PACKAGE ----- |
10 cat("\tSESSION INFO\n") | 10 cat("\tSESSION INFO\n") |
11 | 11 |
12 #Import the different functions | 12 #Import the different functions |
13 source_local <- function(fname) { | 13 source_local <- function(fname) { |
14 argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/")) | 14 argv <- commandArgs(trailingOnly = FALSE) |
15 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) | |
16 source(paste(base_dir, fname, sep = "/")) | |
15 } | 17 } |
16 source_local("lib.r") | 18 source_local("lib.r") |
17 | 19 |
18 pkgs <- c("MSnbase", "batch") | 20 pkgs <- c("MSnbase", "batch") |
19 loadAndDisplayPackages(pkgs) | 21 loadAndDisplayPackages(pkgs) |
20 cat("\n\n"); | 22 cat("\n\n") |
21 | 23 |
22 | 24 |
23 # ----- ARGUMENTS ----- | 25 # ----- ARGUMENTS ----- |
24 cat("\tARGUMENTS INFO\n") | 26 cat("\tARGUMENTS INFO\n") |
25 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects | 27 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects |
26 write.table(as.matrix(args), col.names = F, quote = F, sep = "\t") | 28 write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t") |
27 | 29 |
28 cat("\n\n") | 30 cat("\n\n") |
29 | 31 |
30 | 32 |
31 # ----- PROCESSING INFILE ----- | 33 # ----- PROCESSING INFILE ----- |