comparison 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
comparison
equal deleted inserted replaced
4:8ae521f89988 5:8147d93d372d
1 <tool id="matchms_networking" name="matchMS networking" version="@TOOL_VERSION@+galaxy0" python_template_version="3.5"> 1 <tool id="matchms_networking" name="matchms networking" version="@TOOL_VERSION@+galaxy0" profile="21.09">
2 <description>create similarity network graph from matchMS similarity scores</description> 2 <description>create similarity network graph from matchms similarity scores</description>
3 3
4 <macros> 4 <macros>
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 <import>help.xml</import>
6 </macros> 7 </macros>
7 <expand macro="creator"/> 8 <expand macro="creator"/>
9 <edam_operations>
10 <edam_operation>operation_3927</edam_operation>
11 <edam_operation>operation_3925</edam_operation>
12 </edam_operations>
13 <expand macro="bio.tools"/>
8 14
9 <requirements> 15 <requirements>
10 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> 16 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
11 </requirements> 17 </requirements>
12 18
20 ]]></command> 26 ]]></command>
21 27
22 <configfiles> 28 <configfiles>
23 <configfile name="matchms_networking_cli"> 29 <configfile name="matchms_networking_cli">
24 python3 ${__tool_directory__}/matchms_networking_wrapper.py \ 30 python3 ${__tool_directory__}/matchms_networking_wrapper.py \
25 --graph_format "$graph_format" \ 31 --score_name '${score_layer_name}_score' \
26 --identifier "$identifier_key" \ 32 --graph_format '$graph_format' \
27 --top_n "$top_n" \ 33 --identifier '$identifier_key' \
28 --max_links "$max_links" \ 34 --top_n '$top_n' \
29 --score_cutoff "$score_cutoff" \ 35 --max_links '$max_links' \
30 --link_method "$link_method" \ 36 --score_cutoff '$score_cutoff' \
37 --link_method '$link_method' \
31 #if $keep_unconnected_nodes 38 #if $keep_unconnected_nodes
32 --keep_unconnected_nodes \ 39 --keep_unconnected_nodes \
33 #end if 40 #end if
34 "$scores" \ 41 '$scores' \
35 "$similarity_network_file" 42 '$similarity_network_file'
36 </configfile> 43 </configfile>
37 </configfiles> 44 </configfiles>
38 45
39 <inputs> 46 <inputs>
40 <param label="Similarity scores" name="scores" type="data" format="json" 47 <param label="Similarity scores" name="scores" type="data" format="json"
41 help="matchMS similarity-scores file."/> 48 help="matchms similarity-scores file."/>
49 <param label="Score Layer" name="score_layer_name" type="select" help="Metric of the score layer to create a network from.">
50 <expand macro="similarity_metrics"/>
51 </param>
52 <param label="Identifier key" name="identifier_key" type="text" value="compound_name"
53 help="Unique metadata identifier of each spectrum from which scores are computed."/>
42 <param label="Network-graph format" name="graph_format" type="select" 54 <param label="Network-graph format" name="graph_format" type="select"
43 help="Output format of the similarity network."> 55 help="Output format of the similarity network.">
44 <option value="graphml">graphml</option> 56 <option value="graphml">graphml</option>
45 <option value="cyjs">cyjs</option> 57 <option value="cyjs">cyjs</option>
46 <option value="gexf">gexf</option> 58 <option value="gexf">gexf</option>
47 <option value="gml">gml</option> 59 <option value="gml">gml</option>
48 <option value="json">json</option> 60 <option value="json">json</option>
49 </param> 61 </param>
50 <param label="Identifier key" name="identifier_key" type="text"
51 help="Unique metadata identifier of each spectrum from which scores are computed."/>
52 <param label="Number of top edges to keep" name="top_n" type="integer" value="20" 62 <param label="Number of top edges to keep" name="top_n" type="integer" value="20"
53 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 63 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
54 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'."/> 64 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'."/>
55 <param label="Maximum number of links per node" name="max_links" type="integer" value="10" 65 <param label="Maximum number of links per node" name="max_links" type="integer" value="10"
56 help="Maximum number of links to add per node."/> 66 help="Maximum number of links to add per node."/>
85 <param name="graph_format" value="graphml"/> 95 <param name="graph_format" value="graphml"/>
86 <param name="identifier_key" value="compound_name"/> 96 <param name="identifier_key" value="compound_name"/>
87 <output name="similarity_network_file" ftype="graphml"> 97 <output name="similarity_network_file" ftype="graphml">
88 <assert_contents> 98 <assert_contents>
89 <is_valid_xml /> 99 <is_valid_xml />
90 <has_line_matching expression='.*node id="C[0-9]*"\/.' n="138"/> 100 <has_line_matching expression='.*node id="C[0-9]*"\/.' n="51"/>
91 <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="16"/> 101 <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="4"/>
92 <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="16"/> 102 <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="4"/>
93 </assert_contents> 103 </assert_contents>
94 </output> 104 </output>
95 </test> 105 </test>
96 <test> 106 <test>
97 <param name="scores" value="scores.json" ftype="json"/> 107 <param name="scores" value="scores.json" ftype="json"/>
98 <param name="graph_format" value="cyjs"/> 108 <param name="graph_format" value="cyjs"/>
99 <param name="identifier_key" value="compound_name"/> 109 <param name="identifier_key" value="compound_name"/>
100 <output name="similarity_network_file" ftype="cyjs"> 110 <output name="similarity_network_file" ftype="cyjs">
101 <assert_contents> 111 <assert_contents>
102 <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="138"/> 112 <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="51"/>
103 <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="16"/> 113 <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="4"/>
104 </assert_contents> 114 </assert_contents>
105 </output> 115 </output>
106 </test> 116 </test>
107 <test> 117 <test>
108 <param name="scores" value="scores.json" ftype="json"/> 118 <param name="scores" value="scores.json" ftype="json"/>
109 <param name="graph_format" value="gexf"/> 119 <param name="graph_format" value="gexf"/>
110 <param name="identifier_key" value="compound_name"/> 120 <param name="identifier_key" value="compound_name"/>
111 <output name="similarity_network_file" ftype="gexf"> 121 <output name="similarity_network_file" ftype="gexf">
112 <assert_contents> 122 <assert_contents>
113 <is_valid_xml /> 123 <is_valid_xml />
114 <has_line_matching expression='.*node id="C[0-9]*" label="C[0-9]*" \/.' n="138"/> 124 <has_line_matching expression='.*node id="C[0-9]*" label="C[0-9]*" \/.' n="51"/>
115 <has_line_matching expression='\s*.edge source="C[0-9]*" target="C[0-9]*" id="[0-9]*" weight="0.[0-9]*" \/.' n="16"/> 125 <has_line_matching expression='\s*.edge source="C[0-9]*" target="C[0-9]*" id="[0-9]*" weight="0.[0-9]*" \/.' n="4"/>
116 </assert_contents> 126 </assert_contents>
117 </output> 127 </output>
118 </test> 128 </test>
119 <test> 129 <test>
120 <param name="scores" value="scores.json" ftype="json"/> 130 <param name="scores" value="scores.json" ftype="json"/>
121 <param name="graph_format" value="gml"/> 131 <param name="graph_format" value="gml"/>
122 <param name="identifier_key" value="compound_name"/> 132 <param name="identifier_key" value="compound_name"/>
123 <output name="similarity_network_file" ftype="gml"> 133 <output name="similarity_network_file" ftype="gml">
124 <assert_contents> 134 <assert_contents>
125 <has_line_matching expression='\s*node \[\n\s*id [0-9]*\n\s*label "C[0-9]*"\n\s*\]' n="138"/> 135 <has_line_matching expression='\s*node \[\n\s*id [0-9]*\n\s*label "C[0-9]*"\n\s*\]' n="51"/>
126 <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"/> 136 <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"/>
127 </assert_contents> 137 </assert_contents>
128 </output> 138 </output>
129 </test> 139 </test>
130 <test> 140 <test>
131 <param name="scores" value="scores.json" ftype="json"/> 141 <param name="scores" value="scores.json" ftype="json"/>
132 <param name="graph_format" value="json"/> 142 <param name="graph_format" value="json"/>
133 <param name="identifier_key" value="compound_name"/> 143 <param name="identifier_key" value="compound_name"/>
134 <output name="similarity_network_file" ftype="json"> 144 <output name="similarity_network_file" ftype="json">
135 <assert_contents> 145 <assert_contents>
136 <has_text_matching expression='{"id": "C[0-9]*"}' n="138"/> 146 <has_text_matching expression='{"id": "C[0-9]*"}' n="51"/>
137 <has_text_matching expression='{"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}' n="16"/> 147 <has_text_matching expression='{"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}' n="4"/>
138 </assert_contents> 148 </assert_contents>
139 </output> 149 </output>
140 </test> 150 </test>
141 <test> 151 <test>
142 <param name="scores" value="scores.json" ftype="json"/> 152 <param name="scores" value="scores.json" ftype="json"/>
144 <param name="identifier_key" value="compound_name"/> 154 <param name="identifier_key" value="compound_name"/>
145 <param name="keep_unconnected_nodes" value="false"/> 155 <param name="keep_unconnected_nodes" value="false"/>
146 <output name="similarity_network_file" ftype="graphml"> 156 <output name="similarity_network_file" ftype="graphml">
147 <assert_contents> 157 <assert_contents>
148 <is_valid_xml /> 158 <is_valid_xml />
149 <has_line_matching expression='.*node id="C[0-9]*"\/.' n="25"/> 159 <has_line_matching expression='.*node id="C[0-9]*"\/.' n="8"/>
150 <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="16"/> 160 <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="4"/>
151 <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="16"/> 161 <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="4"/>
152 </assert_contents> 162 </assert_contents>
153 </output> 163 </output>
154 </test> 164 </test>
155 <test> 165 <test>
156 <param name="scores" value="scores.json" ftype="json"/> 166 <param name="scores" value="scores.json" ftype="json"/>
159 <param name="score_cutoff" value="0.4"/> 169 <param name="score_cutoff" value="0.4"/>
160 <param name="keep_unconnected_nodes" value="false"/> 170 <param name="keep_unconnected_nodes" value="false"/>
161 <output name="similarity_network_file" ftype="graphml"> 171 <output name="similarity_network_file" ftype="graphml">
162 <assert_contents> 172 <assert_contents>
163 <is_valid_xml /> 173 <is_valid_xml />
164 <has_line_matching expression='.*node id="C[0-9]*"\/.' n="59"/> 174 <has_line_matching expression='.*node id="C[0-9]*"\/.' n="20"/>
165 <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="52"/> 175 <has_line_matching expression='.*edge source="C[0-9]*" target="C[0-9]*".' n="13"/>
166 <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="52"/> 176 <has_line_matching expression='\s*.data key="d0".0\.[0-9]*.*' n="13"/>
167 </assert_contents> 177 </assert_contents>
168 </output> 178 </output>
169 </test> 179 </test>
170 <test> 180 <test>
171 <param name="scores" value="scores.json" ftype="json"/> 181 <param name="scores" value="scores.json" ftype="json"/>
174 <param name="score_cutoff" value="0.8"/> 184 <param name="score_cutoff" value="0.8"/>
175 <param name="link_method" value="mutual"/> 185 <param name="link_method" value="mutual"/>
176 <param name="keep_unconnected_nodes" value="false"/> 186 <param name="keep_unconnected_nodes" value="false"/>
177 <output name="similarity_network_file" ftype="cyjs"> 187 <output name="similarity_network_file" ftype="cyjs">
178 <assert_contents> 188 <assert_contents>
179 <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="18"/> 189 <has_text_matching expression='{"data": {"id": "C[0-9]*", "value": "C[0-9]*", "name": "C[0-9]*"}}' n="6"/>
180 <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="9"/> 190 <has_text_matching expression='{"data": {"weight": 0\.[0-9]*, "source": "C[0-9]*", "target": "C[0-9]*"}}' n="3"/>
181 </assert_contents> 191 </assert_contents>
182 </output> 192 </output>
183 </test> 193 </test>
184 </tests> 194 </tests>
185 195
186 <help><![CDATA[ 196 <help>
187 @HELP_matchms_networking@ 197 @HELP_matchms_networking@
188 ]]></help> 198 @HELP_matchms@
199 </help>
189 200
190 <expand macro="citations"/> 201 <expand macro="citations"/>
191 202
192 </tool> 203 </tool>