Mercurial > repos > recetox > matchms_formatter
comparison matchms_formatter.xml @ 0:60f34912b3de draft
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 4d2ac914c951166e386a94d8ebb8cb1becfac122"
author | recetox |
---|---|
date | Tue, 22 Mar 2022 16:08:45 +0000 |
parents | |
children | 574c6331e9db |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:60f34912b3de |
---|---|
1 <tool id="matchms_formatter" name="matchms output formatter" version="0.1.3" python_template_version="3.5"> | |
2 <description>reformat output tables of matchms</description> | |
3 | |
4 <macros> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="creator"/> | |
8 | |
9 <requirements> | |
10 <requirement type="package" version="1.1.4">pandas</requirement> | |
11 <requirement type="package" version="8.0.1">click</requirement> | |
12 </requirements> | |
13 | |
14 <command detect_errors="aggressive"><![CDATA[ | |
15 sh ${matchms_formatter_cli} | |
16 ]]></command> | |
17 | |
18 <configfiles> | |
19 <configfile name="matchms_formatter_cli"> | |
20 python3 ${__tool_directory__}/formatter.py \ | |
21 --sf "$scores" \ | |
22 --mf "$matches" \ | |
23 --o "$output" \ | |
24 $method.selection \ | |
25 #if $method.selection == "get-thresholded-data" | |
26 --st $method.scores_threshold \ | |
27 --mt $method.matches_threshold | |
28 #else | |
29 --k $method.k | |
30 #end if | |
31 </configfile> | |
32 </configfiles> | |
33 | |
34 <inputs> | |
35 <param label="Scores Table" name="scores" type="data" format="csv,tabular,tsv" help="Scores output table." /> | |
36 <param label="Matches Table" name="matches" type="data" format="csv,tabular,tsv" help="Scores output table." /> | |
37 | |
38 | |
39 <conditional name="method"> | |
40 <param name="selection" type="select" label="Formatting method"> | |
41 <option value="get-thresholded-data" selected="true">Thresholding</option> | |
42 <option value="get-top-k-data">Top K Matches</option> | |
43 </param> | |
44 <when value="get-thresholded-data"> | |
45 <param label="Scores Threshold" name="scores_threshold" type="float" value="0.6" min="0.0" max="1.0" | |
46 help="Threshold for matching score."/> | |
47 <param label="Matches Threshold" name="matches_threshold" type="integer" value="3" min="0" | |
48 help="Threshold for number of matches ions."/> | |
49 </when> | |
50 <when value="get-top-k-data"> | |
51 <param label="Top K" name="k" type="integer" value="5" help="K for top k match selection."/> | |
52 </when> | |
53 </conditional> | |
54 | |
55 </inputs> | |
56 <outputs> | |
57 <data label="${tool.name} (${method.selection}) on ${on_string}" name="output" format_source="scores"/> | |
58 </outputs> | |
59 | |
60 <tests> | |
61 <test> | |
62 <param name="scores" value="scores_test2_out.tsv" ftype="tsv"/> | |
63 <param name="matches" value="matches_test2_out.tsv" ftype="tsv"/> | |
64 <param name="selection" value="get-thresholded-data"/> | |
65 <param name="scores_threshold" value="0.4"/> | |
66 <param name="matches_threshold" value="2"/> | |
67 <output name="output" file="formatter/test2_threshold_formatting.tsv" ftype="tsv" | |
68 checksum="md5$8929cdac47252da638f066261ffc16b7"/> | |
69 </test> | |
70 <test> | |
71 <param name="scores" value="scores_test2_out.tsv" ftype="tsv"/> | |
72 <param name="matches" value="matches_test2_out.tsv" ftype="tsv"/> | |
73 <param name="selection" value="get-top-k-data"/> | |
74 <param name="k" value="3"/> | |
75 <output name="output" file="formatter/test2_topk_formatting.tsv" ftype="tsv" | |
76 checksum="md5$a9186721aa2df2f9dbdef5021aa6bc26"/> | |
77 </test> | |
78 </tests> | |
79 | |
80 <help><![CDATA[ | |
81 Usage | |
82 This tool creates user friendly tables from the data matrices produces by matchms. | |
83 The tool can be operated on two modes based on (i) thresholds or (ii) top k matches. | |
84 | |
85 Input Table Format | |
86 The tool expects two data matrices with the format as depicted below. | |
87 The tool assumes the reference compound labels as row labels and the query labels as column labels (as naturally outputted by matchms). | |
88 | |
89 +----------+------+------+-----+ | |
90 | | C001 | C002 | ... | | |
91 +==========+======+======+=====+ | |
92 | Perylene | 0.1 | 0.0 | ... | | |
93 +----------+------+------+-----+ | |
94 | Glycine | 0.5 | 0.34 | ... | | |
95 +----------+------+------+-----+ | |
96 | ... | ... | ... | ... | | |
97 +----------+------+------+-----+ | |
98 | |
99 Output Table Format | |
100 +----------+-----------+---------+--------+ | |
101 | query | reference | matches | scores | | |
102 +==========+===========+=========+========+ | |
103 | C001 | Glycine | 6 | 0.5 | | |
104 +----------+-----------+---------+--------+ | |
105 | C002 | Glycine | 3 | 0.34 | | |
106 +----------+-----------+---------+--------+ | |
107 | ... | ... | ... | ... | | |
108 +----------+-----------+---------+--------+ | |
109 | |
110 ]]></help> | |
111 </tool> |