diff matchms_networking.xml @ 5:8147d93d372d draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
author recetox
date Tue, 27 Jun 2023 14:29:16 +0000
parents e4ec3592507f
children 9982b85ff4e7
line wrap: on
line diff
--- a/matchms_networking.xml	Thu May 25 09:06:20 2023 +0000
+++ b/matchms_networking.xml	Tue Jun 27 14:29:16 2023 +0000
@@ -1,10 +1,16 @@
-<tool id="matchms_networking" name="matchMS networking" version="@TOOL_VERSION@+galaxy0" python_template_version="3.5">
-    <description>create similarity network graph from matchMS similarity scores</description>
+<tool id="matchms_networking" name="matchms networking" version="@TOOL_VERSION@+galaxy0" profile="21.09">
+    <description>create similarity network graph from matchms similarity scores</description>
 
     <macros>
         <import>macros.xml</import>
+        <import>help.xml</import>
     </macros>
     <expand macro="creator"/>
+    <edam_operations>
+        <edam_operation>operation_3927</edam_operation>
+        <edam_operation>operation_3925</edam_operation>
+    </edam_operations>
+    <expand macro="bio.tools"/>
 
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
@@ -22,23 +28,29 @@
     <configfiles>
         <configfile name="matchms_networking_cli">
             python3 ${__tool_directory__}/matchms_networking_wrapper.py \
-            --graph_format "$graph_format" \
-            --identifier "$identifier_key" \
-            --top_n "$top_n" \
-            --max_links "$max_links" \
-            --score_cutoff "$score_cutoff" \
-            --link_method "$link_method" \
+            --score_name '${score_layer_name}_score' \
+            --graph_format '$graph_format' \
+            --identifier '$identifier_key' \
+            --top_n '$top_n' \
+            --max_links '$max_links' \
+            --score_cutoff '$score_cutoff' \
+            --link_method '$link_method' \
             #if $keep_unconnected_nodes
             --keep_unconnected_nodes \
             #end if
-            "$scores" \
-            "$similarity_network_file"
+            '$scores' \
+            '$similarity_network_file'
         </configfile>
     </configfiles>
 
     <inputs>
         <param label="Similarity scores" name="scores" type="data" format="json"
-            help="matchMS similarity-scores file."/>
+            help="matchms similarity-scores file."/>
+        <param label="Score Layer" name="score_layer_name" type="select" help="Metric of the score layer to create a network from.">
+            <expand macro="similarity_metrics"/>
+        </param>
+        <param label="Identifier key" name="identifier_key" type="text" value="compound_name"
+            help="Unique metadata identifier of each spectrum from which scores are computed."/>
         <param label="Network-graph format" name="graph_format" type="select"
             help="Output format of the similarity network.">
             <option value="graphml">graphml</option>
@@ -47,8 +59,6 @@
             <option value="gml">gml</option>
             <option value="json">json</option>
         </param>
-        <param label="Identifier key" name="identifier_key" type="text"
-            help="Unique metadata identifier of each spectrum from which scores are computed."/>
         <param label="Number of top edges to keep" name="top_n" type="integer" value="20"
             help="The number of highest-score edges to keep between a pair of nodes. Depending on 'Link method' parameter the top N edges will be selected either from disjoined
             sets of individual specta or joined subset of scores between the given pair of spectra. This value has to be higher than the 'Maximum number of links'."/>
@@ -87,9 +97,9 @@
             <output name="similarity_network_file" ftype="graphml">
                 <assert_contents>
                     <is_valid_xml />
-                    <has_line_matching expression='.*node id="C[0-9]*"\/.' n="138"/>
-                    <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="16"/>
-                    <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="16"/>
+                    <has_line_matching expression='.*node id="C[0-9]*"\/.' n="51"/>
+                    <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="4"/>
+                    <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="4"/>
                 </assert_contents>
             </output>
         </test>
@@ -99,8 +109,8 @@
             <param name="identifier_key" value="compound_name"/>
             <output name="similarity_network_file" ftype="cyjs">
                 <assert_contents>
-                    <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="138"/>
-                    <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="16"/>
+                    <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="51"/>
+                    <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="4"/>
                 </assert_contents>
             </output>
         </test>
@@ -111,8 +121,8 @@
             <output name="similarity_network_file" ftype="gexf">
             <assert_contents>
                 <is_valid_xml />
-                <has_line_matching expression='.*node id="C[0-9]*" label="C[0-9]*" \/.' n="138"/>
-                <has_line_matching expression='\s*.edge source="C[0-9]*" target="C[0-9]*" id="[0-9]*" weight="0.[0-9]*" \/.' n="16"/>
+                <has_line_matching expression='.*node id="C[0-9]*" label="C[0-9]*" \/.' n="51"/>
+                <has_line_matching expression='\s*.edge source="C[0-9]*" target="C[0-9]*" id="[0-9]*" weight="0.[0-9]*" \/.' n="4"/>
             </assert_contents>
         </output>
         </test>
@@ -122,8 +132,8 @@
             <param name="identifier_key" value="compound_name"/>
             <output name="similarity_network_file" ftype="gml">
                 <assert_contents>
-                    <has_line_matching expression='\s*node \[\n\s*id [0-9]*\n\s*label "C[0-9]*"\n\s*\]' n="138"/>
-                    <has_line_matching expression='\s*edge \[\n\s*source [0-9]*\n\s*target [0-9]*\n\s*weight 0\.[0-9]*\n\s*\]' n="16"/>
+                    <has_line_matching expression='\s*node \[\n\s*id [0-9]*\n\s*label "C[0-9]*"\n\s*\]' n="51"/>
+                    <has_line_matching expression='\s*edge \[\n\s*source [0-9]*\n\s*target [0-9]*\n\s*weight 0\.[0-9]*\n\s*\]' n="4"/>
                 </assert_contents>
             </output>
         </test>
@@ -133,8 +143,8 @@
             <param name="identifier_key" value="compound_name"/>
             <output name="similarity_network_file" ftype="json">
                 <assert_contents>
-                    <has_text_matching expression='{"id": "C[0-9]*"}' n="138"/>
-                    <has_text_matching expression='{"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}' n="16"/>
+                    <has_text_matching expression='{"id": "C[0-9]*"}' n="51"/>
+                    <has_text_matching expression='{"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}' n="4"/>
                 </assert_contents>
             </output>
         </test>
@@ -146,9 +156,9 @@
             <output name="similarity_network_file" ftype="graphml">
                 <assert_contents>
                     <is_valid_xml />
-                    <has_line_matching expression='.*node id="C[0-9]*"\/.' n="25"/>
-                    <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="16"/>
-                    <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="16"/>
+                    <has_line_matching expression='.*node id="C[0-9]*"\/.' n="8"/>
+                    <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="4"/>
+                    <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="4"/>
                 </assert_contents>
             </output>
         </test>
@@ -161,9 +171,9 @@
             <output name="similarity_network_file" ftype="graphml">
                 <assert_contents>
                     <is_valid_xml />
-                    <has_line_matching expression='.*node id="C[0-9]*"\/.' n="59"/>
-                    <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="52"/>
-                    <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="52"/>
+                    <has_line_matching expression='.*node id="C[0-9]*"\/.' n="20"/>
+                    <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="13"/>
+                    <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="13"/>
                 </assert_contents>
             </output>
         </test>
@@ -176,16 +186,17 @@
             <param name="keep_unconnected_nodes" value="false"/>
             <output name="similarity_network_file" ftype="cyjs">
                 <assert_contents>
-                    <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="18"/>
-                    <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="9"/>
+                    <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="6"/>
+                    <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="3"/>
                 </assert_contents>
             </output>
         </test>
     </tests>
 
-    <help><![CDATA[
+    <help>
         @HELP_matchms_networking@
-    ]]></help>
+        @HELP_matchms@
+    </help>
 
     <expand macro="citations"/>