# HG changeset patch
# User workflow4metabolomics
# Date 1673348868 0
# Node ID 2a1f120a68746feea993b30b0d9d4a00806a8200
# Parent 77abacd33c31d727a5b958ee3ac5f41b69a7934e
planemo upload commit d9b3849751af6f74e3371db0c3525dcd08728723
diff -r 77abacd33c31 -r 2a1f120a6874 MS2snoop.R
--- a/MS2snoop.R Fri Sep 30 16:18:56 2022 +0000
+++ b/MS2snoop.R Tue Jan 10 11:07:48 2023 +0000
@@ -54,7 +54,8 @@
mzref,
spectra,
processing_parameters,
- background = !TRUE
+ background = !TRUE,
+ show_sirius_outputs = !TRUE
) {
if (is.vector(mzref) && length(mzref) > 1) {
return(lapply(
@@ -89,13 +90,16 @@
"-i='%s'",
"-o='%s'",
"tree",
- ## loglevel is not working taken into account during
- ## sirius startup, so we filter outputs...
- "2>&1 | grep '^(WARNING|SEVERE)'"
+ "2>&1"
),
input,
output
)
+ if (!show_sirius_outputs) {
+ ## loglevel is not taken into account during
+ ## sirius startup, so we filter outputs...
+ command <- paste(command, "| grep '^(WARNING|SEVERE)'")
+ }
verbose_catf(
">> Sirius is running %swith the command: %s\n",
if (background) "in the background " else "",
@@ -189,7 +193,8 @@
return(rep(NA, length(mz_list)))
}
if (!is.null(trees_filename)) {
- sirius_results <- cbind(sirius_results, extract_sirius_ppm(trees_filename))
+ extracted_ppm <- extract_sirius_ppm(trees_filename)
+ sirius_results <- cbind(sirius_results, extracted_ppm)
} else {
return(rep(NA, length(mz_list)))
}
@@ -210,7 +215,7 @@
for (index in seq_len(nrow(sirius_results))) {
result <- sirius_results[index, ]
- filter <- which(order(abs(fragment_matchings$mz - result$mz)) == 1)
+ filter <- order(abs(fragment_matchings$mz - result$mz))[1]
fragment_matchings[filter, "formula"] <- result$formula
fragment_matchings[filter, "ppm"] <- result$ppm
catf(
@@ -1124,7 +1129,7 @@
zip_pdfs <- function(processing_parameters) {
if (processing_parameters$do_pdf) {
- if (zip <- Sys.getenv("R_ZIPCMD", "zip") == "") {
+ if ((zip <- Sys.getenv("R_ZIPCMD", "zip")) == "") {
catf("R could not fin the zip executable. Trying luck: zip = \"zip\"")
zip <- "zip"
} else {
diff -r 77abacd33c31 -r 2a1f120a6874 MS2snoop.xml
--- a/MS2snoop.xml Fri Sep 30 16:18:56 2022 +0000
+++ b/MS2snoop.xml Tue Jan 10 11:07:48 2023 +0000
@@ -48,9 +48,15 @@
--ionization '$sirius.ionization'
--fragment_match_delta '$sirius.fragment_match_delta'
--fragment_match_delta_unit '$sirius.fragment_match_delta_unit'
- $advenced.pdf
+ #if $advenced.pdf:
+ --pdf_path './out.zip'
+ #end if
$advenced.debug
$advenced.verbose
+#if $advenced.pdf:
+&& cat ./out.zip > '$pdf_output'
+#end if
+
]]>
@@ -128,7 +134,7 @@
-
-
+
+
advenced['pdf']
-
+
@@ -163,7 +169,7 @@
-
+
@@ -177,7 +183,7 @@
-
+
@@ -191,7 +197,7 @@
-
+
@@ -207,7 +213,7 @@
@@ -224,7 +230,7 @@
@@ -237,7 +243,7 @@
@@ -250,7 +256,7 @@
@@ -263,7 +269,7 @@
@@ -278,7 +284,7 @@
diff -r 77abacd33c31 -r 2a1f120a6874 README.md
--- a/README.md Fri Sep 30 16:18:56 2022 +0000
+++ b/README.md Tue Jan 10 11:07:48 2023 +0000
@@ -5,7 +5,7 @@
-----------
* **@name**: MS2 Snoop
- * **@version**: 2.2.0
+ * **@version**: 2.2.1
* **@authors**: Jean François Martin (INRAE), Kevin Wagner (INRAE)
* **@maintainers**: Lain Pavot (PFEM - INRAE - MetaboHUB)
* **@init date**: 2022, April
diff -r 77abacd33c31 -r 2a1f120a6874 macros.xml
--- a/macros.xml Fri Sep 30 16:18:56 2022 +0000
+++ b/macros.xml Tue Jan 10 11:07:48 2023 +0000
@@ -138,7 +138,7 @@
]]>
- 2.2.0
+ 2.2.1
0
diff -r 77abacd33c31 -r 2a1f120a6874 test-data/smol/out-smol-base.tsv
--- a/test-data/smol/out-smol-base.tsv Fri Sep 30 16:18:56 2022 +0000
+++ b/test-data/smol/out-smol-base.tsv Tue Jan 10 11:07:48 2023 +0000
@@ -1,18 +1,18 @@
"compoundName" "inchikey" "elemcomposition" "fragment" "fragment_mz" "ppm" "fileid" "CorWithPrecursor" "AbsoluteIntensity" "relativeIntensity" "corValid"
"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C13H8O4" 229.05 2.02930325023702 "1" NA 203723.75 0.932156767504374 NA
"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 312.059 NA "1" NA 3981.51538085938 0.0182177900573243 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 313.068 NA "1" NA 7264.93603515625 0.0332413834452649 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C17H12O6" 367.081 -8.51110969664126 "1" NA 218550.953125 1 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C20H14O7" 451.115 -0.624494567969591 "1" NA 135964.078125 0.622116152690652 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C17H12O6" 313.068 -8.51110969664126 "1" NA 7264.93603515625 0.0332413834452649 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C20H14O7" 367.081 -0.624494567969591 "1" NA 218550.953125 1 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 451.115 NA "1" NA 135964.078125 0.622116152690652 NA
"Caffeic acid" "QAIPRVGONGVQAS-DUXPYHPUSA-N" "C9H8O4" NA 109.101 NA "1" NA 1663.78308105469 1 NA
"Caffeic acid" "QAIPRVGONGVQAS-DUXPYHPUSA-N" "C9H8O4" NA 140.951 NA "1" NA 1119.27758789062 0.672730478291135 NA
"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 55.575 NA "1" NA 959.281677246094 0.00801122428782145 NA
-"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 278.081 NA "1" NA 49810.07421875 0.415977585963074 NA
-"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" "C17H11NO3" 323.106 -0.610124713635454 "1" 1 119742.20703125 1 TRUE
+"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" "C17H11NO3" 278.081 -0.610124713635454 "1" NA 49810.07421875 0.415977585963074 NA
+"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 323.106 NA "1" 1 119742.20703125 1 TRUE
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 51.94 NA "1" NA 1706.40014648438 0.0178528316194543 NA
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C5H6" 67.054 -3.38002342189334 "1" NA 1413.32275390625 0.0147865746503924 NA
-"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 122.059 NA "1" NA 40171.04296875 0.420280593374599 NA
-"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C7H7NO" 135.117 -8.52289540743972 "1" NA 95581.484375 1 NA
+"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C7H7NO" 122.059 -8.52289540743972 "1" NA 40171.04296875 0.420280593374599 NA
+"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 135.117 NA "1" NA 95581.484375 1 NA
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 232.845 NA "1" NA 17855.763671875 0.186811952007572 NA
"Bergapten " "BGEBZHIAGXMEMV-UHFFFAOYSA-N" "C12H8O4" NA 135.071 NA "1" NA 1388.24841308594 0.0111932237930481 NA
"Bergapten " "BGEBZHIAGXMEMV-UHFFFAOYSA-N" "C12H8O4" NA 177.092 NA "1" NA 1346.46130371094 0.0108563010474573 NA
diff -r 77abacd33c31 -r 2a1f120a6874 test-data/smol/out-smol-delta-0.05mz.tsv
--- a/test-data/smol/out-smol-delta-0.05mz.tsv Fri Sep 30 16:18:56 2022 +0000
+++ b/test-data/smol/out-smol-delta-0.05mz.tsv Tue Jan 10 11:07:48 2023 +0000
@@ -1,18 +1,18 @@
"compoundName" "inchikey" "elemcomposition" "fragment" "fragment_mz" "ppm" "fileid" "CorWithPrecursor" "AbsoluteIntensity" "relativeIntensity" "corValid"
"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C13H8O4" 229.05 2.02930325023702 "1" NA 203723.75 0.932156767504374 NA
"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 312.059 NA "1" NA 3981.51538085938 0.0182177900573243 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 313.068 NA "1" NA 7264.93603515625 0.0332413834452649 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C17H12O6" 367.081 -8.51110969664126 "1" NA 218550.953125 1 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C20H14O7" 451.115 -0.624494567969591 "1" NA 135964.078125 0.622116152690652 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C17H12O6" 313.068 -8.51110969664126 "1" NA 7264.93603515625 0.0332413834452649 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C20H14O7" 367.081 -0.624494567969591 "1" NA 218550.953125 1 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 451.115 NA "1" NA 135964.078125 0.622116152690652 NA
"Caffeic acid" "QAIPRVGONGVQAS-DUXPYHPUSA-N" "C9H8O4" NA 109.101 NA "1" NA 1663.78308105469 1 NA
"Caffeic acid" "QAIPRVGONGVQAS-DUXPYHPUSA-N" "C9H8O4" NA 140.951 NA "1" NA 1119.27758789062 0.672730478291135 NA
"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 55.575 NA "1" NA 959.281677246094 0.00801122428782145 NA
-"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 278.081 NA "1" NA 49810.07421875 0.415977585963074 NA
-"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" "C17H11NO3" 323.106 -0.610124713635454 "1" 1 119742.20703125 1 TRUE
+"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" "C17H11NO3" 278.081 -0.610124713635454 "1" NA 49810.07421875 0.415977585963074 NA
+"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 323.106 NA "1" 1 119742.20703125 1 TRUE
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 51.94 NA "1" NA 1706.40014648438 0.0178528316194543 NA
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C5H6" 67.054 -3.38002342189334 "1" NA 1413.32275390625 0.0147865746503924 NA
-"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 122.059 NA "1" NA 40171.04296875 0.420280593374599 NA
-"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C7H7NO" 135.117 -8.52289540743972 "1" NA 95581.484375 1 NA
+"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C7H7NO" 122.059 -8.52289540743972 "1" NA 40171.04296875 0.420280593374599 NA
+"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 135.117 NA "1" NA 95581.484375 1 NA
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 232.845 NA "1" NA 17855.763671875 0.186811952007572 NA
"Bergapten " "BGEBZHIAGXMEMV-UHFFFAOYSA-N" "C12H8O4" NA 135.071 NA "1" NA 1388.24841308594 0.0111932237930481 NA
"Bergapten " "BGEBZHIAGXMEMV-UHFFFAOYSA-N" "C12H8O4" NA 177.092 NA "1" NA 1346.46130371094 0.0108563010474573 NA
diff -r 77abacd33c31 -r 2a1f120a6874 test-data/smol/out-smol-delta-8.542.tsv
--- a/test-data/smol/out-smol-delta-8.542.tsv Fri Sep 30 16:18:56 2022 +0000
+++ b/test-data/smol/out-smol-delta-8.542.tsv Tue Jan 10 11:07:48 2023 +0000
@@ -1,18 +1,18 @@
"compoundName" "inchikey" "elemcomposition" "fragment" "fragment_mz" "ppm" "fileid" "CorWithPrecursor" "AbsoluteIntensity" "relativeIntensity" "corValid"
"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C13H8O4" 229.05 2.02930325023702 "1" NA 203723.75 0.932156767504374 NA
"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 312.059 NA "1" NA 3981.51538085938 0.0182177900573243 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 313.068 NA "1" NA 7264.93603515625 0.0332413834452649 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C17H12O6" 367.081 -8.51110969664126 "1" NA 218550.953125 1 NA
-"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C20H14O7" 451.115 -0.624494567969591 "1" NA 135964.078125 0.622116152690652 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C17H12O6" 313.068 -8.51110969664126 "1" NA 7264.93603515625 0.0332413834452649 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" "C20H14O7" 367.081 -0.624494567969591 "1" NA 218550.953125 1 NA
+"Orientin" "PLAPMLGJVGLZOV-VPRICQMDSA-N" "C21H20O11" NA 451.115 NA "1" NA 135964.078125 0.622116152690652 NA
"Caffeic acid" "QAIPRVGONGVQAS-DUXPYHPUSA-N" "C9H8O4" NA 109.101 NA "1" NA 1663.78308105469 1 NA
"Caffeic acid" "QAIPRVGONGVQAS-DUXPYHPUSA-N" "C9H8O4" NA 140.951 NA "1" NA 1119.27758789062 0.672730478291135 NA
"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 55.575 NA "1" NA 959.281677246094 0.00801122428782145 NA
-"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 278.081 NA "1" NA 49810.07421875 0.415977585963074 NA
-"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" "C17H11NO3" 323.106 -0.610124713635454 "1" 1 119742.20703125 1 TRUE
+"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" "C17H11NO3" 278.081 -0.610124713635454 "1" NA 49810.07421875 0.415977585963074 NA
+"Berberine" "YBHILYKTIRIUTE-UHFFFAOYSA-N" "C20H18NO4+" NA 323.106 NA "1" 1 119742.20703125 1 TRUE
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 51.94 NA "1" NA 1706.40014648438 0.0178528316194543 NA
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C5H6" 67.054 -3.38002342189334 "1" NA 1413.32275390625 0.0147865746503924 NA
-"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 122.059 NA "1" NA 40171.04296875 0.420280593374599 NA
-"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C7H7NO" 135.117 -8.52289540743972 "1" NA 95581.484375 1 NA
+"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" "C7H7NO" 122.059 -8.52289540743972 "1" NA 40171.04296875 0.420280593374599 NA
+"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 135.117 NA "1" NA 95581.484375 1 NA
"Theobromine " "YAPQBXQYLJRXSA-UHFFFAOYSA-N" "C7H8N4O2" NA 232.845 NA "1" NA 17855.763671875 0.186811952007572 NA
"Bergapten " "BGEBZHIAGXMEMV-UHFFFAOYSA-N" "C12H8O4" NA 135.071 NA "1" NA 1388.24841308594 0.0111932237930481 NA
"Bergapten " "BGEBZHIAGXMEMV-UHFFFAOYSA-N" "C12H8O4" NA 177.092 NA "1" NA 1346.46130371094 0.0108563010474573 NA