Previous changeset 6:77abacd33c31 (2022-09-30) |
Commit message:
planemo upload commit d9b3849751af6f74e3371db0c3525dcd08728723 |
modified:
MS2snoop.R MS2snoop.xml README.md macros.xml test-data/smol/out-smol-base.tsv test-data/smol/out-smol-delta-0.05mz.tsv test-data/smol/out-smol-delta-8.542.tsv |
b |
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 { |
b |
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 + ]]> </command> <inputs> @@ -128,7 +134,7 @@ </section> <section title="Advenced Options" name="advenced"> - <param argument="--pdf" type="boolean" truevalue="--pdf_path '$pdf_output'" falsevalue="" value="" optional="true" + <param argument="--pdf" type="boolean" value="" optional="true" label="Output PDF" help="The tool will output some pdf in a zip file" /> @@ -143,14 +149,14 @@ </section> </inputs> <outputs> - <data name="frag_result_txt" format="tsv" label="${tool.name} on ${peaklist_frag_tsv.name}" /> - <data name="pdf_output" format="zip" label="${tool.name} PDFs for ${peaklist_frag_tsv.name}"> + <data name="frag_result_txt" format="tsv" label="${tool.name}_on_${peaklist_frag_tsv.name}" /> + <data name="pdf_output" format="zip" label="${tool.name}_PDFs_for_${peaklist_frag_tsv.name}"> <filter>advenced['pdf']</filter> </data> </outputs> <tests> <test> - <!-- Regular test with no option --> + <!-- #1 Regular test with no option --> <param name="compound_txt" value="compounds_pos.txt" /> <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> @@ -163,7 +169,7 @@ </test> <test> - <!-- Regular files with verbose output --> + <!-- #2 Regular files with verbose output --> <param name="compound_txt" value="compounds_pos.txt" /> <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> @@ -177,7 +183,7 @@ </test> <test> - <!-- Regular test with debug outputs --> + <!-- #3 Regular test with debug outputs --> <param name="compound_txt" value="compounds_pos.txt" /> <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> @@ -191,7 +197,7 @@ </test> <test> - <!-- Regular test with both verbose and debug outputs --> + <!-- #4 Regular test with both verbose and debug outputs --> <param name="compound_txt" value="compounds_pos.txt" /> <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> @@ -207,7 +213,7 @@ <test> <!-- - This test mixes tsv, csv, and so, and ms2snoop is expected + #5 This test mixes tsv, csv, and so, and ms2snoop is expected handle them like usual. --> <param name="compound_txt" value="compounds_pos.csv" /> @@ -224,7 +230,7 @@ <test> <!-- - This test contains smaller datasets. This is the "regular" + #6 This test contains smaller datasets. This is the "regular" smol test, to prepare further smolah tests. --> <param name="ionization" value="[M+?]+" /> @@ -237,7 +243,7 @@ <test> <!-- - Test for pdf generation + #7 Test for pdf generation --> <param name="pdf" value="True" /> <param name="ionization" value="[M+?]+" /> @@ -250,7 +256,7 @@ <test> <!-- - test for delta in ppm + #8 test for delta in ppm --> <param name="ionization" value="[M+?]+" /> <param name="mzdecimal" value="3" /> @@ -263,7 +269,7 @@ <test> <!-- - test for delta in m/z + #9 test for delta in m/z --> <param name="ionization" value="[M+?]+" /> <param name="mzdecimal" value="3" /> @@ -278,7 +284,7 @@ <!-- === expected to fail tests === --> <test expect_exit_code="2" expect_failure="true"> <!-- - This test uses old format for molecules file. + #10 This test uses old format for molecules file. Is is expected to fail --> <param name="compound_txt" value="compounds_pos_old_format.txt" /> |
b |
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 |
b |
@@ -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 |
b |
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 |
b |
@@ -138,7 +138,7 @@ ]]> </token> - <token name="@TOOL_VERSION@">2.2.0</token> + <token name="@TOOL_VERSION@">2.2.1</token> <token name="@VERSION_SUFFIX@">0</token> <xml name="has_smol_stdout"> |
b |
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 |
b |
@@ -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 |
b |
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 |
b |
@@ -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 |
b |
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 |
b |
@@ -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 |