comparison matchms_formatter.xml @ 3:e2a1dbeba196 draft

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