diff macros.xml @ 0:ea891750acfc draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 970c7dc210faacd545c740ddae0e5e78c2cecce4
author recetox
date Mon, 04 Dec 2023 19:17:25 +0000
parents
children 8c98b3cb320e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Mon Dec 04 19:17:25 2023 +0000
@@ -0,0 +1,107 @@
+<macros>
+    <token name="@TOOL_VERSION@">0.24.0</token>
+
+    <xml name="creator">
+        <creator>
+            <yield/>
+            <person
+                givenName="Helge"
+                familyName="Hecht"
+                url="https://github.com/hechth"
+                identifier="0000-0001-6744-996X" />
+            <person
+                givenName="Maksym"
+                familyName="Skoryk"
+                url="https://github.com/maximskorik"
+                identifier="0000-0003-2056-8018" />
+            <person
+                givenName="Zargham"
+                familyName="Ahmad"
+                url="https://github.com/zargham-ahmad"
+                identifier="0000-0002-6096-224X" />
+            <person
+                givenName="Wudmir"
+                familyName="Rojas"
+                url="https://github.com/wverastegui"
+                identifier="0000-0001-7036-9987" />
+            <organization
+                url="https://www.recetox.muni.cz/"
+                email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
+                name="RECETOX MUNI" />
+        </creator>
+    </xml>
+    
+    <xml name="bio.tools">
+        <xrefs>
+            <xref type="bio.tools">matchms</xref>
+        </xrefs>
+    </xml>
+
+    <xml name="similarity_metrics">
+        <option value="CosineGreedy" selected="true">CosineGreedy</option>
+        <option value="CosineHungarian">CosineHungarian</option>
+        <option value="ModifiedCosine">ModifiedCosine</option>
+        <option value="NeutralLossesCosine">NeutralLossesCosine</option>
+    </xml>
+
+    <xml name="similarity_algorithm_params">
+        <section name="algorithm" title="Algorithm Parameters" expanded="true">
+            <param label="tolerance [Da]" name="tolerance" type="float" value="0.1"
+                   help="Peaks will be considered a match when less than tolerance apart. Absolute m/z value, not in ppm."/>
+            <param label="mz_power" name="mz_power" type="float" value="0.0"
+                   help="The power to raise mz to in the cosine function."/>
+            <param label="intensity_power" name="intensity_power" type="float" value="1.0"
+                   help="The power to raise intensity to in the cosine function."/>
+        </section>
+    </xml>
+
+    <xml name="input_param">
+        <conditional name="scores">
+            <param name="use_scores" label="Use Scores Object" type="select">
+                <option value="False" selected="true">FALSE</option>
+                <option value="True">TRUE</option>
+            </param>
+            <when value="True">
+                <param label="Scores object" name="scores_in" type="data" format="json"
+                    help="Scores objects calculated previously using one of the matchms similarity tools." />
+                <param label="join type" name="join_type" type="select" display="radio"
+                    help="The join type to use for appending scores - see [1] for details.">
+                    <option value="left" selected="true">left</option>
+                    <option value="inner">inner</option>
+                    <option value="right">right</option>
+                    <option value="outer">outer</option>
+                </param>
+            </when>
+            <when value="False">
+                <param label="Queries spectra" name="queries" type="data" format="msp"
+                    help="Query mass spectra to match against references."/>
+                <param label="Reference spectra" name="references" type="data" format="msp"
+                    help="Reference mass spectra to match against as library."/>
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.5281/zenodo.7178586</citation>
+            <citation type="doi">10.21105/joss.02411</citation>
+        </citations>
+    </xml>
+
+<token name="@init_scores@">
+from matchms.importing import load_from_msp, scores_from_json
+from matchms import Scores
+#if $scores.use_scores == "True"
+scores = scores_from_json("$scores_in")
+join_type = "$scores.join_type"
+#else
+scores = Scores(references=list(load_from_msp("$references")), queries=list(load_from_msp("$queries")), is_symmetric=False)
+join_type = "left"
+#end if
+</token>
+
+<token name="@init_logger@">
+from matchms import set_matchms_logger_level
+set_matchms_logger_level("WARNING")
+</token>   
+</macros>