annotate xcms_refine.r @ 2:090b33a9981c draft default tip

planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit eca29d4347fe2f4802091c4a06715232a6fd9253
author workflow4metabolomics
date Mon, 15 Jul 2024 16:00:52 +0000
parents 20f8ebc3a391
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
1 #!/usr/bin/env Rscript
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
2
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
3 # ----- LOG FILE -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
4 log_file <- file("log.txt", open = "wt")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
5 sink(log_file)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
6 sink(log_file, type = "output")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
7
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
8
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
9 # ----- PACKAGE -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
10 cat("\tSESSION INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
11
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
12 #Import the different functions
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
13 source_local <- function(fname) {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
14 argv <- commandArgs(trailingOnly = FALSE)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
15 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
16 source(paste(base_dir, fname, sep = "/"))
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
17 }
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
18 source_local("lib.r")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
19
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
20 pkgs <- c("xcms", "batch", "RColorBrewer")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
21 loadAndDisplayPackages(pkgs)
1
20f8ebc3a391 planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
workflow4metabolomics
parents: 0
diff changeset
22 cat("\n\n")
0
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
23
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
24 # ----- ARGUMENTS -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
25 cat("\tARGUMENTS INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
26 # interpretation of arguments given in command line as an R list of objects
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
27 args <- parseCommandArgs(evaluate = FALSE)
1
20f8ebc3a391 planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
workflow4metabolomics
parents: 0
diff changeset
28 write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t")
0
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
29
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
30 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
31
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
32 # ----- PROCESSING INFILE -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
33 cat("\tARGUMENTS PROCESSING INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
34
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
35 #saving the specific parameters
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
36 args_method <- args$method
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
37 args_image <- args$image
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
38 args_msLevel <- args$msLevel
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
39 param_args <- list()
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
40
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
41 if (args_method == "CleanPeaks") {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
42 param_args$maxPeakwidth <- args$maxPeakwidth
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
43 } else if (args_method == "FilterIntensity") {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
44 param_args$threshold <- args$threshold
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
45 param_args$value <- args$value
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
46 param_args$nValues <- args$nValues
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
47 } else if (args_method == "MergeNeighboringPeaks") {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
48 param_args$expandRt <- args$expandRt
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
49 param_args$expandMz <- args$expandMz
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
50 param_args$ppm <- args$ppm
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
51 param_args$minProp <- args$minProp
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
52 }
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
53
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
54 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
55
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
56
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
57 # ----- ARGUMENTS PROCESSING -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
58 cat("\tINFILE PROCESSING INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
59
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
60 #image is an .RData file necessary to use xset variable given by previous tools
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
61 load(args_image)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
62 if (!exists("xdata")) stop("\n\nERROR: The RData doesn't contain any object called 'xdata'. Such RData as this might have been created by an old version of XMCS 2.*")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
63
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
64 # Handle infiles
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
65 if (!exists("singlefile")) singlefile <- NULL
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
66 if (!exists("zipfile")) zipfile <- NULL
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
67 rawFilePath <- retrieveRawfileInTheWorkingDir(singlefile, zipfile, args)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
68 zipfile <- rawFilePath$zipfile
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
69 singlefile <- rawFilePath$singlefile
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
70
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
71 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
72
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
73
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
74 # ----- MAIN PROCESSING INFO -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
75 cat("\tMAIN PROCESSING INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
76
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
77
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
78 cat("\t\tPREPARE PARAMETERS\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
79
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
80 if (args_method == "CleanPeaks") {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
81 refineChromPeaksParam <- CleanPeaksParam(maxPeakwidth = param_args$maxPeakwidth)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
82 } else if (args_method == "FilterIntensity") {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
83 refineChromPeaksParam <- FilterIntensityParam(
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
84 threshold = param_args$threshold,
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
85 nValues = param_args$nValues,
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
86 value = param_args$value
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
87 )
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
88 } else if (args_method == "MergeNeighboringPeaks") {
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
89 refineChromPeaksParam <- MergeNeighboringPeaksParam(
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
90 expandRt = param_args$expandRt,
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
91 expandMz = param_args$expandMz,
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
92 ppm = param_args$ppm,
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
93 minProp = param_args$minProp
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
94 )
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
95 }
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
96
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
97 cat(str(refineChromPeaksParam))
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
98
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
99 cat("\n\n\t\tCOMPUTE\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
100
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
101 xdata <- updateObject(xdata)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
102
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
103 xdata <- refineChromPeaks(xdata, param = refineChromPeaksParam)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
104
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
105 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
106
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
107 # ----- EXPORT -----
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
108
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
109 cat("\tXCMSnExp OBJECT INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
110 print(xdata)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
111 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
112
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
113 cat("\txcmsSet OBJECT INFO\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
114 # Get the legacy xcmsSet object
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
115 xset <- getxcmsSetObject(xdata)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
116 print(xset)
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
117 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
118
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
119 #saving R data in .Rdata file to save the variables used in the present tool
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
120 objects2save <- c("xdata", "zipfile", "singlefile", "md5sumList", "sampleNamesList")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
121 save(list = objects2save[objects2save %in% ls()], file = "xcmsSet.RData")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
122
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
123 cat("\n\n")
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
124
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
125
eb115eb8f25c "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit d4bb3c31e2beca6b4059758c9e76d42c26f8aa55"
workflow4metabolomics
parents:
diff changeset
126 cat("\tDONE\n")