Repository 'ms2snoop'
hg clone https://toolshed.g2.bx.psu.edu/repos/workflow4metabolomics/ms2snoop

Changeset 4:856001213966 (2022-07-06)
Previous changeset 3:c68c94865667 (2022-06-22) Next changeset 5:78d5a12406c2 (2022-08-05)
Commit message:
planemo upload commit 53543b5d911fc1f2d204f314a4d2aaf93a8c7715
modified:
MS2snoop.R
MS2snoop.xml
README.md
macros.xml
test-data/compound_fragments_result.txt
test-data/compounds_pos.csv
test-data/compounds_pos.txt
added:
planemo_retest.sh
test-data/compounds_pos_old_format.txt
b
diff -r c68c94865667 -r 856001213966 MS2snoop.R
--- a/MS2snoop.R Wed Jun 22 13:07:01 2022 +0000
+++ b/MS2snoop.R Wed Jul 06 10:38:39 2022 +0000
[
@@ -15,7 +15,7 @@
 #'
 
 
-assign("MS2SNOOP_VERSION", "1.1.0")
+assign("MS2SNOOP_VERSION", "2.0.0")
 lockBinding("MS2SNOOP_VERSION", globalenv())
 
 assign("MISSING_PARAMETER_ERROR", 1)
@@ -87,7 +87,9 @@
   vmz,
   cor_abs_int,
   refcol,
-  c_name
+  c_name,
+  inchikey,
+  elemcomposition
 ) {
   ## du fait de la difference de nombre de colonne entre la dataframe qui
   ## inclue les scans en 1ere col, mzRef se decale de 1
@@ -156,6 +158,8 @@
   corValid <- (round(cor_abs_int, 2) >= r_threshold) ##nolint object_name_linter
   cp_res <- data.frame(
     rep(c_name, length(vmz)),
+    rep(inchikey, length(vmz)),
+    rep(elemcomposition, length(vmz)),
     rep(fid, length(vmz)),
     vmz,
     cor_abs_int,
@@ -166,6 +170,8 @@
 
   colnames(cp_res) <- c(
     "compoundName",
+    "inchikey",
+    "elemcomposition",
     "fileid",
     "fragments_mz",
     "CorWithPrecursor",
@@ -200,6 +206,8 @@
   mzref,
   rtref,
   c_name,
+  inchikey,
+  elemcomposition,
   min_number_scan,
   mzdecimal,
   r_threshold = DEFAULT_EXTRACT_FRAGMENTS_R_THRESHOLD,
@@ -361,7 +369,9 @@
           vmz = vmz,
           cor_abs_int = cor_abs_int,
           refcol = refcol,
-          c_name = c_name
+          c_name = c_name,
+          inchikey = inchikey,
+          elemcomposition = elemcomposition
         )
         if (f == 1) {
           res_comp <- res_comp_by_file
@@ -541,8 +551,10 @@
 }
 
 stop_with_status <- function(msg, status) {
+  sink(stderr())
   message(sprintf("Error: %s", msg))
   message(sprintf("Error code: %s", status))
+  sink(NULL)
   base::quit(status = status)
 }
 
@@ -660,6 +672,15 @@
   return(result)
 }
 
+uniformize_columns <- function(df) {
+  cols <- colnames(df)
+  for (func in c(tolower)) {
+    cols <- func(cols)
+  }
+  colnames(df) <- cols
+  return(df)
+}
+
 main <- function(args) {
   if (args$version) {
     cat(sprintf("%s\n", MS2SNOOP_VERSION))
@@ -680,6 +701,24 @@
   ## list of compounds : col1=Name of molecule, col2=m/z, col3=retention time
   compounds <- get_csv_or_tsv(args$compounds)
 
+  compounds <- uniformize_columns(compounds)
+  mandatory_columns <- c(
+    "compound_name",
+    "mz",
+    "rtsec",
+    "inchikey"
+  )
+  presents <- mandatory_columns %in% colnames(compounds)
+  if (!all(presents)) {
+    stop_with_status(
+      sprintf(
+        "Some columns are missing: %s",
+        paste(mandatory_columns[which(!presents)], collapse = ", ")
+      ),
+      BAD_PARAMETER_VALUE_ERROR
+    )
+  }
+
   res_all <- NULL
   for (i in seq_len(nrow(compounds))) {
     ## loop execution for all compounds in the compounds file
@@ -687,9 +726,11 @@
     res_cor <- extract_fragments(
       precursors = precursors,
       fragments = fragments,
-      mzref = compounds[[2]][i],
-      rtref = compounds[[3]][i],
-      c_name = compounds[[1]][i],
+      mzref = compounds[["mz"]][i],
+      rtref = compounds[["rtsec"]][i],
+      c_name = compounds[["compound_name"]][i],
+      inchikey = compounds[["inchikey"]][i],
+      elemcomposition = compounds[["elemcomposition"]][i],
       min_number_scan = args$min_number_scan,
       mzdecimal = args$mzdecimal,
       r_threshold = args$r_threshold,
@@ -717,8 +758,8 @@
   )
 }
 
-unset_debug()
-unset_verbose()
+global_debug <- FALSE
+global_verbose <- FALSE
 args <- optparse::parse_args(create_parser())
 main(args)
 
b
diff -r c68c94865667 -r 856001213966 MS2snoop.xml
--- a/MS2snoop.xml Wed Jun 22 13:07:01 2022 +0000
+++ b/MS2snoop.xml Wed Jul 06 10:38:39 2022 +0000
[
@@ -4,8 +4,6 @@
     </description>
     <macros>
         <import>macros.xml</import>
-        <token name="@TOOL_VERSION@">1.1.0</token>
-        <token name="@VERSION_SUFFIX@">0</token>
     </macros>
     <edam_topics>
         <edam_topic>topic_0091</edam_topic>
@@ -242,16 +240,18 @@
                 <expand macro="has_smol_verbose_stdout"/>
             </assert_stdout>
         </test>
+        <test expect_exit_code="2" expect_failure="true">
+            <param name="compound_txt" value="compounds_pos_old_format.txt" />
+            <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" />
+            <param name="peaklist_preco_tsv" value="peaklist_precursors.csv" />
+            <assert_stderr>
+                <has_line line="Error: Some columns are missing: compound_name, rtsec, inchikey" />
+            </assert_stderr>
+        </test>
     </tests>
     <help><![CDATA[
-.. class:: infomark
 
-**Authors** Jean-Francois Martin (jean-francois.martin@inrae.fr), Lain Pavot (lain.pavot@inrae.fr), Kevin Wagner (kevin.wagner@inrae.fr) 
-
-.. class:: infomark
-
----------------------------------------------------
-
+@AUTHORS@
 
 ==============
 MS2 validation
@@ -261,8 +261,9 @@
 Description
 -----------
 
-MS2snoop use results of msPurity to find spectra of standards listed in a compounds file.
-Check the fragments and precursor using correlation of among the different scans of fragments 
+MS2snoop use results of msPurity to find spectra of standards listed in
+a compounds file. Check the fragments and precursor using correlation of
+among the different scans of fragments 
 
 -----------------
 Workflow position
@@ -298,56 +299,22 @@
 +----------------------------------------------+------------+
 | Parameter : num + label                      |   Format   |
 +===========================+==================+============+
-| Input from msPurity Precursor                |   TSV      |
+| Input from msPurity Precursor                |   TSV,CSV  |
 +----------------------------------------------+------------+
-| Input from msPurity fragment                 |   TSV      |
+| Input from msPurity fragment                 |   TSV,CSV  |
 | Input compounds file to search in precursor  |            |
 +----------------------------------------------+------------+
-| and fragment (Name + m/z + ret Time)         |   TSV      |
+| and fragment (Name + m/z + ret Time)         |   TSV,CSV  |
 +----------------------------------------------+------------+
 
 
-----------
-Parameters
-----------
-
-msPurity.purityA
-  | output TSV file
-
-msPurity.frag4feature
-  | output TSV file
+@PARAMETERS@
 
-Compounds file
-  | A TSV TXT file with a list of compounds with at least 3 columns : 
-  |   col1=Name of molecule, col2=m/z, col3=retention time
-
-tolerance for mz(dalton) rt(seconds) to match the standard in the compounds file with the precursor MSpurity files
-  |   tolmz <- 0.01
-  |   tolrt <- 20
-
-relative intensity threshold
-  |   seuil_ra = 0.05
 
-nb decimal for mz
-  |   mzdecimal <- 0
+@OUTPUTS@
 
-r pearson correlation threshold between precursor and fragment absolute intensity
-  |   r_threshold <- 0.85
-
-fragments are kept if there are found in a minimum number of scans
-  |   minNumberScan <- 8
 
-------------
-Output files
-------------
+@CHANGELOG@
 
-compound_fragments_result.tsv
-  | tabular output
-  | Array with p rows (corresponding to the fragments for the different compounds of the compounds file)
-  | Last column "corvalid" is a boolean for validated fragments 
-
-processing_file.pdf
-  | pdf output 
-  | For each compound of the compounds file, Graph of the all fragments with parents (or most intense peak if parent is not detected in the fragments. At the end the pdf file a graph of the spectra with validated fragments.
    ]]></help>
 </tool>
b
diff -r c68c94865667 -r 856001213966 README.md
--- a/README.md Wed Jun 22 13:07:01 2022 +0000
+++ b/README.md Wed Jul 06 10:38:39 2022 +0000
b
@@ -5,7 +5,7 @@
 -----------
 
  * **@name**: MS2 Snoop
- * **@version**: 1.1.0
+ * **@version**: 2.0.0
  * **@authors**: Jean François Martin (INRAE)
  * **@maintainers**: Lain Pavot (PFEM - INRAE - MetaboHUB)
  * **@init date**: 2022, April
b
diff -r c68c94865667 -r 856001213966 macros.xml
--- a/macros.xml Wed Jun 22 13:07:01 2022 +0000
+++ b/macros.xml Wed Jul 06 10:38:39 2022 +0000
[
@@ -1,5 +1,132 @@
 <macros>
 
+  <token name="@AUTHORS@">
+.. class:: infomark
+
+**Authors** Jean-Francois Martin (jean-francois.martin@inrae.fr), Lain Pavot (lain.pavot@inrae.fr), Kevin Wagner (kevin.wagner@inrae.fr) 
+
+.. class:: infomark
+
+---------------------------------------------------
+
+
+  </token>
+  <token name="@PARAMETERS@">
+    <![CDATA[
+----------
+Parameters
+----------
+
+msPurity.purityA
+  | output TSV file
+
+msPurity.frag4feature
+  | output TSV file
+
+Compounds file
+  | A tabulated, comma or semicolon separated values file whith
+    compounds. Its format is as follow:
+  |  
+  | At least 4 columns:
+  | **compound_name**: The name of the compound
+  | **mz**: The m/z ratio
+  | **rtsec**: The retention time in seconds
+  | **inchikey**: The compound's inchi key
+  |  
+  | An optional column can be added:
+  | **elemcomposition**: The elemental composition of the molecule
+
+tolerance for mz(dalton) rt(seconds) to match the standard in the
+ compounds file with the precursor MSpurity files
+  |   tolmz <- 0.01
+  |   tolrt <- 20
+
+relative intensity threshold
+  |   seuil_ra = 0.05
+
+nb decimal for mz
+  |   mzdecimal <- 0
+
+r pearson correlation threshold between precursor and fragment absolute
+  intensity
+  |   r_threshold <- 0.85
+
+fragments are kept if there are found in a minimum number of scans
+  |   minNumberScan <- 8
+
+]]>
+  </token>
+  <token name="@OUTPUTS@">
+    <![CDATA[
+------------
+Output files
+------------
+
+compound_fragments_result.tsv
+  | tabular output
+  | Array with p rows (corresponding to the fragments for the different
+    compounds of the compounds file)
+  | Last column "corvalid" is a boolean for validated fragments 
+
+processing_file.pdf
+  | pdf output 
+  | For each compound of the compounds file, Graph of the all fragments
+    with parents (or most intense peak if parent is not detected in the
+    fragments. At the end the pdf file a graph of the spectra with
+    validated fragments.
+]]>
+  </token>
+  <token name="@CHANGELOG@">
+--------------
+Changelog/News
+--------------
+
+2.0.0
+  | This version is motivated by a strengthening of the quality of the
+    input files.
+    Input files that don't match the newly defined format will not be
+    processed anymore. Previously, MS2Snoop expected the c_name, the
+    mzref and the rtref to be the 1st, the 2nd and the 3rd columns
+    respectively, and the header was somewhat ignored in the compound
+    file.
+  | 
+  | Now, we'd like to add some new columns, some of them are optional.
+    This new
+    format of file implies a better definition of the columns order,
+    names, optioning or requirement.
+    The exact columns name are:
+  |   - **compound_name** [MANDATORY] ;
+  |   - **inchikey** [MANDATORY] ;
+  |   - **elemcomposition** [OPTIONAL] ;
+  |   - **mz** [MANDATORY] ;
+  |   - **rtsec** [MANDATORY].
+  | 
+  | These names can be written indiferentially in lower and/or upper
+    case. The new definition being incompatible with the older one, that
+    was more flexible, but also more error-prone.
+
+1.1.0
+  | new feature, xml improvement (IUC)
+  | chore: better labels in the xml parameter fields
+  | feat: add support for tab, comma and semicolon separated values
+    input files.
+  | chore: add some tests in an external macro.xml file
+
+
+1.0.1
+  | Bug fix, new parameters and some improvement in the xml.
+  | fix: the program crashed when there were no result on the first
+    iteration. Fixed in the main loop.
+  | chore: the xml matches better the IUC recommendations
+  | chore: add a --debug and a --verbose option to the tool.
+
+1.0.0
+  | First version, published on the toolshed.
+
+  </token>
+
+  <token name="@TOOL_VERSION@">2.0.0</token>
+  <token name="@VERSION_SUFFIX@">0</token>
 
   <xml name="has_smol_stdout">
     <has_line line="processing  2-diethylamino-6-methyl pyrimidin-4-ol one " />
b
diff -r c68c94865667 -r 856001213966 planemo_retest.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/planemo_retest.sh Wed Jul 06 10:38:39 2022 +0000
b
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export TEST_FLAGS=--failed
+
+./planemo_test.sh ;
b
diff -r c68c94865667 -r 856001213966 test-data/compound_fragments_result.txt
--- a/test-data/compound_fragments_result.txt Wed Jun 22 13:07:01 2022 +0000
+++ b/test-data/compound_fragments_result.txt Wed Jul 06 10:38:39 2022 +0000
b
b'@@ -1,1385 +1,1385 @@\n-"compoundName"\t"fileid"\t"fragments_mz"\t"CorWithPrecursor"\t"AbsoluteIntensity"\t"relativeIntensity"\t"corValid"\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t84\t0.601436519480403\t406.383798606\t0.00344160476662782\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t123\t-0.167860259307508\t295.871994004\t0.00250569650751035\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t126\t0.907929868611774\t430.137959956\t0.00364277527394095\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t137\t0.676403388268515\t430.806630151\t0.00364843814371653\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t146\t-0.125051837812104\t538.358772757\t0.00455928145962519\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t148\t0.1558553290912\t143.310915941\t0.00121367912083162\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t149\t-0.276972713799663\t617.416199707\t0.00522880720932724\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t150\t-0.410733329402461\t5080.527405\t0.0430262411887723\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t151\t-0.243340932574313\t218.539256565\t0.00185077690023418\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t154\t0.991757449276389\t16836.882397703\t0.14258908675458\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t164\t0.146040591250743\t1829.10214243\t0.0154903976822645\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t180\t0.39213526382476\t209.753137589\t0.00177636854770712\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t182\t1\t118079.7407496\t1\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t84\t0.601436519480403\t406.383798606\t0.00344160476662782\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t123\t-0.167860259307508\t295.871994004\t0.00250569650751035\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t126\t0.907929868611774\t430.137959956\t0.00364277527394095\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t137\t0.676403388268515\t430.806630151\t0.00364843814371653\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t146\t-0.125051837812104\t538.358772757\t0.00455928145962519\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t148\t0.1558553290912\t143.310915941\t0.00121367912083162\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t149\t-0.276972713799663\t617.416199707\t0.00522880720932724\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t150\t-0.410733329402461\t5080.527405\t0.0430262411887723\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t151\t-0.243340932574313\t218.539256565\t0.00185077690023418\tFALSE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t154\t0.991757449276389\t16836.882397703\t0.14258908675458\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t164\t0.146040591250743\t1829.10214243\t0.0154903976822645\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t180\t0.39213526382476\t209.753137589\t0.00177636854770712\tTRUE\n-"2-diethylamino-6-methyl pyrimidin-4-ol one"\t"7"\t182\t1\t118079.7407496\t1\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t132\t0.710501933879621\t105.532976149\t6.84594522892331e-05\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t144\t0.276479394498518\t203.085251814\t0.00013174180824369\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t146\t0.604633971720309\t166.134730821\t0.000107771931516144\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t156\t0.191791879044897\t459.381193152\t0.000298001496998986\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t158\t-0.331971393756239\t13878.1056368\t0.00900275482959977\tFALSE\n-"5-hydroxy-thiabendazole"\t"1"\t160\t0.77523958114776\t386.949028017\t0.000251014606889261\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t162\t-0.476769537229124\t213.45186329\t0.000138466649801652\tFALSE\n-"5-hydroxy-thiabendazole"\t"1"\t172\t0.593280623618274\t794.89456843\t0.000515649693282338\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t173\t0.89953946593837\t207.738348006\t0.000134760281031794\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t174\t0.150820546879602\t1525.52666664\t0.000989612193854381\tTRUE\n-"5-hydroxy-thiabendazole"\t"1"\t175\t0.646696639290413\t163.18886233\t0.000105860940745588\tTRUE\n-"5-hydroxy-thiabendazole'..b'9187\tTRUE\n+"TCMTB"\tNA\tNA\t"9"\t221\t0.209076519592657\t2733.66568752\t0.0497037625553133\tTRUE\n+"TCMTB"\tNA\tNA\t"9"\t223\t0.0847402042583731\t543.135544781\t0.0098753407471842\tTRUE\n+"TCMTB"\tNA\tNA\t"9"\t225\t0.382588834038783\t381.507453195\t0.00693660382586481\tTRUE\n+"TCMTB"\tNA\tNA\t"9"\t239\t1\t27067.5244917\t0.492144235645765\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t79\t0.0521595798449914\t279.873629576\t0.00690652095555926\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t109\t0.922563790701349\t9640.82224867\t0.237909305675332\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t125\t-0.441808918074544\t178.089407913\t0.00439476284199285\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t127\t0.769422232032552\t1076.07612804\t0.0265546358881489\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t140\t0.348604833045235\t1970.98268515\t0.0486384988777101\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t145\t0.820960207936605\t4235.84716059\t0.104529202066952\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t185\t0.31275352450403\t348.909767164\t0.00861014530796692\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t187\t-0.260474354038597\t107.324927324\t0.00264848767902871\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t197\t-0.0360245652498858\t2081.96281053\t0.0513771869161251\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t199\t0.34691746641912\t144.142693995\t0.00355705015215411\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t201\t0.095844899247823\t127.383673675\t0.00314348305328139\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t211\t0.589929547507267\t156.726169586\t0.00386757614917167\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t213\t0.214402092378455\t334.711538323\t0.00825977158690306\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t215\t0.177739314274526\t412.352368363\t0.0101757363760497\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t221\t0.950607639404665\t40523.0985871\t1\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t225\t-0.377401610724356\t503.974612244\t0.012436724480996\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t227\t0.163495046198974\t177.141063216\t0.00437136027086513\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t229\t0.602334206324447\t1013.548554406\t0.0250116252148756\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t239\t-0.216616311827602\t1313.5219316555\t0.0324141533459547\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t257\t1\t25290.7478033\t0.624106958379313\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t79\t0.0521595798449914\t279.873629576\t0.00690652095555926\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t109\t0.922563790701349\t9640.82224867\t0.237909305675332\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t125\t-0.441808918074544\t178.089407913\t0.00439476284199285\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t127\t0.769422232032552\t1076.07612804\t0.0265546358881489\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t140\t0.348604833045235\t1970.98268515\t0.0486384988777101\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t145\t0.820960207936605\t4235.84716059\t0.104529202066952\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t185\t0.31275352450403\t348.909767164\t0.00861014530796692\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t187\t-0.260474354038597\t107.324927324\t0.00264848767902871\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t197\t-0.0360245652498858\t2081.96281053\t0.0513771869161251\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t199\t0.34691746641912\t144.142693995\t0.00355705015215411\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t201\t0.095844899247823\t127.383673675\t0.00314348305328139\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t211\t0.589929547507267\t156.726169586\t0.00386757614917167\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t213\t0.214402092378455\t334.711538323\t0.00825977158690306\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t215\t0.177739314274526\t412.352368363\t0.0101757363760497\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t221\t0.950607639404665\t40523.0985871\t1\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t225\t-0.377401610724356\t503.974612244\t0.012436724480996\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t227\t0.163495046198974\t177.141063216\t0.00437136027086513\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t229\t0.602334206324447\t1013.548554406\t0.0250116252148756\tTRUE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t239\t-0.216616311827602\t1313.5219316555\t0.0324141533459547\tFALSE\n+"Trichlorfon (Dylox)"\tNA\tNA\t"4"\t257\t1\t25290.7478033\t0.624106958379313\tTRUE\n'
b
diff -r c68c94865667 -r 856001213966 test-data/compounds_pos.csv
--- a/test-data/compounds_pos.csv Wed Jun 22 13:07:01 2022 +0000
+++ b/test-data/compounds_pos.csv Wed Jul 06 10:38:39 2022 +0000
b
@@ -1,33 +1,33 @@
-Compounds,mz,rt
-2-diethylamino-6-methyl pyrimidin-4-ol one,182.12879,345.0
-5-hydroxy-thiabendazole,218.03826,315.0
-acetamiprid-N-desmethyl,209.05885,526.2
-Acetochlor,270.12554,1158.6
-Avermectin B1a (Abamectin),895.49221,1663.8
-Benzophenone-3 (Oxybenzone),229.08592,1178.4
-Butocarboxim,191.0849,1267.8
-Carbendazim,192.07676,339.0
-Cefoperazone,646.1497,1755.0
-Chlorfenvinphos,358.97681,1255.8
-Chlormequat,122.0737,54.0
-Desisopropylatrazine,174.0541,399.0
-Dichlorvos,220.9532,763.2
-Dimethyldithiophosphate,158.96979,615.0
-Emamectin B1a,886.5311,1663.8
-Fluopyram,397.05369,1161.0
-Hydroxy-tebuconazole,324.14733,1098.6
-Isoproturon,207.14919,936.0
-Ivermectin B1a ,897.4971,1650.0
-Malathion dicarboxilic acid,274.98075,574.8
-Methamidophos,142.0086,139.2
-Metolachlor,284.14119,1158.0
-"N,N-diethyl-m-toluamide ou DEET",192.13829,945.0
-Nigericin,747.4654,1663.8
-Omethoate,214.02975,237.0
-Prochloraz,376.03809,1271.4
-p-Toluenesulfonamide,172.04323,393.0
-Rifaximin,786.3596,1183.2
-Spinosad A (Spinosyn A),732.4681,1212.0
-TCMTB,238.9766,1032.0
-Trichlorfon (Dylox),256.9299,444.0
-Tylosin,916.5264,909.0
+Compound_name,mz,rtsec,inchikey,elemcomposition
+2-diethylamino-6-methyl pyrimidin-4-ol one,182.12879,345.0,,
+5-hydroxy-thiabendazole,218.03826,315.0,,
+acetamiprid-N-desmethyl,209.05885,526.2,,
+Acetochlor,270.12554,1158.6,,
+Avermectin B1a (Abamectin),895.49221,1663.8,,
+Benzophenone-3 (Oxybenzone),229.08592,1178.4,,
+Butocarboxim,191.0849,1267.8,,
+Carbendazim,192.07676,339.0,,
+Cefoperazone,646.1497,1755.0,,
+Chlorfenvinphos,358.97681,1255.8,,
+Chlormequat,122.0737,54.0,,
+Desisopropylatrazine,174.0541,399.0,,
+Dichlorvos,220.9532,763.2,,
+Dimethyldithiophosphate,158.96979,615.0,,
+Emamectin B1a,886.5311,1663.8,,
+Fluopyram,397.05369,1161.0,,
+Hydroxy-tebuconazole,324.14733,1098.6,,
+Isoproturon,207.14919,936.0,,
+Ivermectin B1a ,897.4971,1650.0,,
+Malathion dicarboxilic acid,274.98075,574.8,,
+Methamidophos,142.0086,139.2,,
+Metolachlor,284.14119,1158.0,,
+"N,N-diethyl-m-toluamide ou DEET",192.13829,945.0,,
+Nigericin,747.4654,1663.8,,
+Omethoate,214.02975,237.0,,
+Prochloraz,376.03809,1271.4,,
+p-Toluenesulfonamide,172.04323,393.0,,
+Rifaximin,786.3596,1183.2,,
+Spinosad A (Spinosyn A),732.4681,1212.0,,
+TCMTB,238.9766,1032.0,,
+Trichlorfon (Dylox),256.9299,444.0,,
+Tylosin,916.5264,909.0,,
b
diff -r c68c94865667 -r 856001213966 test-data/compounds_pos.txt
--- a/test-data/compounds_pos.txt Wed Jun 22 13:07:01 2022 +0000
+++ b/test-data/compounds_pos.txt Wed Jul 06 10:38:39 2022 +0000
b
@@ -1,33 +1,33 @@
-Compounds mz rt
-2-diethylamino-6-methyl pyrimidin-4-ol one 182.12879 345.0
-5-hydroxy-thiabendazole 218.03826 315.0
-acetamiprid-N-desmethyl 209.05885 526.2
-Acetochlor 270.12554 1158.6
-Avermectin B1a (Abamectin) 895.49221 1663.8
-Benzophenone-3 (Oxybenzone) 229.08592 1178.4
-Butocarboxim 191.0849 1267.8
-Carbendazim 192.07676 339.0
-Cefoperazone 646.1497 1755.0
-Chlorfenvinphos 358.97681 1255.8
-Chlormequat 122.0737 54.0
-Desisopropylatrazine 174.0541 399.0
-Dichlorvos 220.9532 763.2
-Dimethyldithiophosphate 158.96979 615.0
-Emamectin B1a 886.5311 1663.8
-Fluopyram 397.05369 1161.0
-Hydroxy-tebuconazole 324.14733 1098.6
-Isoproturon 207.14919 936.0
-Ivermectin B1a  897.4971 1650.0
-Malathion dicarboxilic acid 274.98075 574.8
-Methamidophos 142.0086 139.2
-Metolachlor 284.14119 1158.0
-N,N-diethyl-m-toluamide ou DEET 192.13829 945.0
-Nigericin 747.4654 1663.8
-Omethoate 214.02975 237.0
-Prochloraz 376.03809 1271.4
-p-Toluenesulfonamide 172.04323 393.0
-Rifaximin 786.3596 1183.2
-Spinosad A (Spinosyn A) 732.4681 1212.0
-TCMTB 238.9766 1032.0
-Trichlorfon (Dylox) 256.9299 444.0
-Tylosin 916.5264 909.0
+Compound_name mz rtsec inchikey elemcomposition
+2-diethylamino-6-methyl pyrimidin-4-ol one 182.12879 345.0
+5-hydroxy-thiabendazole 218.03826 315.0
+acetamiprid-N-desmethyl 209.05885 526.2
+Acetochlor 270.12554 1158.6
+Avermectin B1a (Abamectin) 895.49221 1663.8
+Benzophenone-3 (Oxybenzone) 229.08592 1178.4
+Butocarboxim 191.0849 1267.8
+Carbendazim 192.07676 339.0
+Cefoperazone 646.1497 1755.0
+Chlorfenvinphos 358.97681 1255.8
+Chlormequat 122.0737 54.0
+Desisopropylatrazine 174.0541 399.0
+Dichlorvos 220.9532 763.2
+Dimethyldithiophosphate 158.96979 615.0
+Emamectin B1a 886.5311 1663.8
+Fluopyram 397.05369 1161.0
+Hydroxy-tebuconazole 324.14733 1098.6
+Isoproturon 207.14919 936.0
+Ivermectin B1a  897.4971 1650.0
+Malathion dicarboxilic acid 274.98075 574.8
+Methamidophos 142.0086 139.2
+Metolachlor 284.14119 1158.0
+N,N-diethyl-m-toluamide ou DEET 192.13829 945.0
+Nigericin 747.4654 1663.8
+Omethoate 214.02975 237.0
+Prochloraz 376.03809 1271.4
+p-Toluenesulfonamide 172.04323 393.0
+Rifaximin 786.3596 1183.2
+Spinosad A (Spinosyn A) 732.4681 1212.0
+TCMTB 238.9766 1032.0
+Trichlorfon (Dylox) 256.9299 444.0
+Tylosin 916.5264 909.0
b
diff -r c68c94865667 -r 856001213966 test-data/compounds_pos_old_format.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/compounds_pos_old_format.txt Wed Jul 06 10:38:39 2022 +0000
b
@@ -0,0 +1,33 @@
+Compounds mz rt
+2-diethylamino-6-methyl pyrimidin-4-ol one 182.12879 345.0
+5-hydroxy-thiabendazole 218.03826 315.0
+acetamiprid-N-desmethyl 209.05885 526.2
+Acetochlor 270.12554 1158.6
+Avermectin B1a (Abamectin) 895.49221 1663.8
+Benzophenone-3 (Oxybenzone) 229.08592 1178.4
+Butocarboxim 191.0849 1267.8
+Carbendazim 192.07676 339.0
+Cefoperazone 646.1497 1755.0
+Chlorfenvinphos 358.97681 1255.8
+Chlormequat 122.0737 54.0
+Desisopropylatrazine 174.0541 399.0
+Dichlorvos 220.9532 763.2
+Dimethyldithiophosphate 158.96979 615.0
+Emamectin B1a 886.5311 1663.8
+Fluopyram 397.05369 1161.0
+Hydroxy-tebuconazole 324.14733 1098.6
+Isoproturon 207.14919 936.0
+Ivermectin B1a  897.4971 1650.0
+Malathion dicarboxilic acid 274.98075 574.8
+Methamidophos 142.0086 139.2
+Metolachlor 284.14119 1158.0
+N,N-diethyl-m-toluamide ou DEET 192.13829 945.0
+Nigericin 747.4654 1663.8
+Omethoate 214.02975 237.0
+Prochloraz 376.03809 1271.4
+p-Toluenesulfonamide 172.04323 393.0
+Rifaximin 786.3596 1183.2
+Spinosad A (Spinosyn A) 732.4681 1212.0
+TCMTB 238.9766 1032.0
+Trichlorfon (Dylox) 256.9299 444.0
+Tylosin 916.5264 909.0