diff matchms_filtering.xml @ 13:ca5a8db023e1 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 98223db312c30b0e121a1422a9534a3db3fbf0c0
author recetox
date Thu, 14 Dec 2023 13:45:58 +0000
parents 039e7ab31836
children da15e8ea3b28
line wrap: on
line diff
--- a/matchms_filtering.xml	Mon Dec 04 19:12:43 2023 +0000
+++ b/matchms_filtering.xml	Thu Dec 14 13:45:58 2023 +0000
@@ -1,4 +1,4 @@
-<tool id="matchms_filtering" name="matchms filtering" version="@TOOL_VERSION@+galaxy0" profile="21.09">
+<tool id="matchms_filtering" name="matchms filtering" version="@TOOL_VERSION@+galaxy1" profile="21.09">
     <description>filter and normalize mass spectrometry data</description>
 
     <macros>
@@ -55,6 +55,10 @@
             #if $require_inchi_is_true == "TRUE"
                 -require_inchi \
             #end if
+            #if $derive_precursor_mz_from_parent_mass.is_true == "TRUE"
+                -derive_precursor_mz_from_parent_mass \
+                --estimate_from_adduct "${derive_precursor_mz_from_parent_mass.estimate_from_adduct}" \
+            #end if
             #if $reduce_to_top_n_peaks.is_true == "TRUE"
                 -reduce_to_top_n_peaks \
                 --n_max "$reduce_to_top_n_peaks.n_max" \
@@ -104,6 +108,18 @@
         <param name="require_inchi_is_true" label="Require INCHI" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false"
                 help="Remove spectra that does not contain INCHI." />
 
+        <conditional name="derive_precursor_mz_from_parent_mass">
+            <param name="is_true" label="Derive precursor_mz from parent_mass" type="select"
+                   help="Derives the precursor_mz from the parent mass and adduct or charge.">
+                <option value="FALSE" selected="true">FALSE</option>
+                <option value="TRUE">TRUE</option>
+            </param>
+            <when value="TRUE">
+                <param label="Estimate from adduct" name="estimate_from_adduct" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" />
+            </when>
+            <when value="FALSE"></when>
+        </conditional>
+
         <conditional name="reduce_to_top_n_peaks">
             <param name="is_true" label="Reduce to top n peaks" type="select"
                    help="Lowest intensity peaks will be removed when it has more peaks than desired.">
@@ -174,6 +190,14 @@
             </section>
             <output name="output" file="filtering/reduce_to_top_n_peaks.msp" ftype="msp"/>
         </test>
+        <test>
+            <param name="spectra" value="filtering/derive_precursor_mz.msp" ftype="msp"/>
+            <section name="derive_precursor_mz_from_parent_mass">
+                <param name="is_true" value="TRUE"/>
+                <param name="estimate_from_adduct" value="TRUE"/>
+            </section>
+            <output name="output" file="filtering/derive_precursor_mz_out.msp" ftype="msp"/>
+        </test>
     </tests>
 
     <help>