Mercurial > repos > marie-tremblay-metatoul > 2dnmrannotation
annotate annotationRmn2DWrapper.R @ 2:dff7bde22102 draft
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
author | workflow4metabolomics |
---|---|
date | Tue, 04 Feb 2020 10:59:26 -0500 |
parents | |
children | 546c7ccd2ed4 |
rev | line source |
---|---|
2
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
1 #!/usr/local/public/bin/Rscript --vanilla --slave --no-site-file |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
2 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
3 ## 201919016 2DNmrAnnotation_1.0.0.R |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
4 ## Marie Tremblay-Franco |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
5 ## MetaboHUB: The French Infrastructure for Metabolomics and Fluxomics |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
6 ## www.metabohub.fr/en |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
7 ## marie.tremblay-franco@toulouse.inra.fr |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
8 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
9 runExampleL <- FALSE |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
10 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
11 if(runExampleL) { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
12 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
13 ## Example of arguments |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
14 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
15 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
16 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
17 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
18 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
19 ## Options |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
20 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
21 strAsFacL <- options()$stringsAsFactors |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
22 options(stringsAsFactors = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
23 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
24 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
25 ## Constants |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
26 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
27 topEnvC <- environment() |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
28 flagC <- "\n" |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
29 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
30 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
31 ##------------------------- |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
32 ## Input parameters reading |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
33 ##------------------------- |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
34 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
35 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
36 ## R libraries laoding |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
37 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
38 library(batch) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
39 library(dplyr) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
40 library(ggplot2) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
41 library(openxlsx) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
42 library(stringr) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
43 library(tidyr) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
44 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
45 if(!runExampleL) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
46 argLs <- parseCommandArgs(evaluate=FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
47 logFile <- argLs[["logOut"]] |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
48 sink(logFile) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
49 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
50 cat("\tPACKAGE INFO\n") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
51 sessionInfo() |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
52 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
53 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
54 ## Functions |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
55 ##------------------------------ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
56 source_local <- function(fname) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
57 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
58 argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
59 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
60 source(paste(base_dir, fname, sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
61 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
62 #Import the different functions |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
63 source_local("annotationRmn2D.R") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
64 source_local("annotationRmn2DGlobale.R") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
65 source_local("viridis.R") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
66 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
67 ## Input parameter values |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
68 fileToAnnotate <- argLs[[1]] |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
69 # Chosen sequence(s) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
70 cosy <- 0 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
71 hmbc <- 0 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
72 hsqc <- 0 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
73 jres <- 0 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
74 tocsy <- 0 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
75 ## sequences <- str_split(argLs[[2]], ",")[[1]] |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
76 ## for (s in 1:length(sequences)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
77 ## { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
78 ## argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
79 ## currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
80 ## if (sequences[s]=="cosy"){ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
81 ## cosy <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
82 ## load(paste(currentDir, "BdDReference_COSY.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
83 ## }else if(sequences[s]=="hmbc"){ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
84 ## hmbc <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
85 ## load(paste(currentDir, "BdDReference_HMBC.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
86 ## }else if(sequences[s]=="hsqc"){ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
87 ## hsqc <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
88 ## load(paste(currentDir, "BdDReference_HSQC.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
89 ## }else if(sequences[s]=="jres"){ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
90 ## jres <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
91 ## load(paste(currentDir, "BdDReference_JRES.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
92 ## }else if(sequences[s]=="tocsy"){ |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
93 ## tocsy <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
94 ## load(paste(currentDir, "BdDReference_TOCSY.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
95 ## }else |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
96 ## stop("No chosen sequence", call.=FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
97 ## } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
98 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
99 if (argLs[[2]]=='yes') |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
100 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
101 argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
102 currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
103 cosy <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
104 load(paste(currentDir, "BdDReference_COSY.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
105 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
106 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
107 if (argLs[[3]]=='yes') |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
108 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
109 argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
110 currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
111 jres <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
112 load(paste(currentDir, "BdDReference_JRES.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
113 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
114 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
115 if (argLs[[4]]=='yes') |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
116 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
117 argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
118 currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
119 hmbc <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
120 load(paste(currentDir, "BdDReference_HMBC.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
121 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
122 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
123 if (argLs[[5]]=='yes') |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
124 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
125 argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
126 currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
127 hsqc <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
128 load(paste(currentDir, "BdDReference_HSQC.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
129 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
130 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
131 if (argLs[[6]]=='yes') |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
132 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
133 argv <- commandArgs(trailingOnly = FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
134 currentDir <- dirname(substring(argv[grep("--file=", argv)], 8)) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
135 tocsy <- 1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
136 load(paste(currentDir, "BdDReference_TOCSY.RData", sep="/")) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
137 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
138 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
139 if (argLs[[2]]=='no' & argLs[[3]]=='no' & argLs[[4]]=='no' & argLs[[5]]=='no' & argLs[[6]]=='no') |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
140 stop("No chosen sequence", call.=FALSE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
141 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
142 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
143 # User database |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
144 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
145 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
146 # Allowed chemical shifts |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
147 tolPpm1 <- argLs$tolppm1 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
148 tolPpm2HJRes <- argLs$tolppmJRES |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
149 tolPpm2C <- argLs$tolppm2 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
150 # Threshold to remove metabolites (probability score < threshold) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
151 seuil <- argLs$threshold |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
152 # Remove metabolites when multiple assignations? |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
153 unicite <- str_to_upper(argLs$unicity) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
154 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
155 ## Output paramater values |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
156 AnnotationGraph <- argLs[["AnnotationGraph"]] |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
157 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
158 print(argLs) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
159 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
160 ## ANNOTATION |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
161 st0=Sys.time() |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
162 pdf(AnnotationGraph,onefile=TRUE) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
163 annotationMelange <- annotationRmn2DGlobale(fileToAnnotate, tolPpm1=tolPpm1, tolPpm2HJRes=tolPpm2HJRes, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
164 tolPpm2C=tolPpm2C, cosy=cosy, hmbc=hmbc, hsqc=hsqc, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
165 jres=jres, tocsy=tocsy, seuil=seuil, unicite=unicite) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
166 dev.off() |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
167 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
168 if (cosy==1) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
169 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
170 write.table(annotationMelange$COSY$liste_resultat, file=argLs[["annotationCOSY"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
171 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
172 if (nrow(annotationMelange$COSY$listing_ppm_commun) != 0) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
173 write.table(annotationMelange$COSY$listing_ppm_commun, file=argLs[["ppmCommunCOSY"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
174 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
175 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
176 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
177 if (hmbc==1) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
178 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
179 write.table(annotationMelange$HMBC$liste_resultat, file=argLs[["annotationHMBC"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
180 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
181 if (nrow(annotationMelange$HMBC$listing_ppm_commun) != 0) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
182 write.table(annotationMelange$HMBC$listing_ppm_commun, file=argLs[["ppmCommunHMBC"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
183 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
184 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
185 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
186 if (hsqc==1) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
187 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
188 write.table(annotationMelange$HSQC$liste_resultat, file=argLs[["annotationHSQC"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
189 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
190 if (nrow(annotationMelange$HSQC$listing_ppm_commun) != 0) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
191 write.table(annotationMelange$HSQC$listing_ppm_commun, file=argLs[["ppmCommunHSQC"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
192 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
193 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
194 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
195 if (jres==1) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
196 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
197 write.table(annotationMelange$JRES$liste_resultat, file=argLs[["annotationJRES"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
198 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
199 if (nrow(annotationMelange$JRES$listing_ppm_commun) != 0) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
200 write.table(annotationMelange$JRES$listing_ppm_commun, file=argLs[["ppmCommunJRES"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
201 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
202 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
203 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
204 if (tocsy==1) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
205 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
206 write.table(annotationMelange$TOCSY$liste_resultat, file=argLs[["annotationTOCSY"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
207 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
208 if (nrow(annotationMelange$TOCSY$listing_ppm_commun) != 0) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
209 write.table(annotationMelange$TOCSY$listing_ppm_commun, file=argLs[["ppmCommunTOCSY"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
210 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
211 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
212 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
213 ## Combinaison de sequences |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
214 if (cosy + jres + hmbc + hsqc + tocsy > 1) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
215 { |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
216 write.table(annotationMelange$combination, file=argLs[["annotationCombination"]], quote=FALSE, |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
217 row.names=FALSE,sep="\t") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
218 } |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
219 st1=Sys.time() |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
220 print(st1-st0) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
221 |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
222 ## Ending |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
223 ##-------- |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
224 cat("\nEnd of '2D NMR annotation' Galaxy module call: ", as.character(Sys.time()), sep = "") |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
225 sink() |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
226 options(stringsAsFactors = strAsFacL) |
dff7bde22102
"planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit b3abcb650e9b38458aa0ac5f7d838811d982ff65"
workflow4metabolomics
parents:
diff
changeset
|
227 rm(list = ls()) |