diff macros.xml @ 0:9ff95a1a2705 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
author recetox
date Tue, 27 Jun 2023 14:28:07 +0000
parents
children 3f96c93f8566
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Jun 27 14:28:07 2023 +0000
@@ -0,0 +1,105 @@
+<macros>
+    <token name="@TOOL_VERSION@">0.20.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="boolean" truevalue="TRUE" falsevalue="FALSE"
+                   checked="false"/>
+            <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
+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>