comparison matchms_formatter.xml @ 4:966b4134ad12 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5661cf2406e0616d7b2f4bee1b57ec43716088de
author recetox
date Tue, 18 Oct 2022 11:02:18 +0000
parents 574c6331e9db
children 1b09315a3f87
comparison
equal deleted inserted replaced
3:574c6331e9db 4:966b4134ad12
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 </macros> 6 </macros>
7 <expand macro="creator"/> 7 <expand macro="creator"/>
8 8
9 <requirements> 9 <requirements>
10 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
10 <requirement type="package" version="1.1.4">pandas</requirement> 11 <requirement type="package" version="1.1.4">pandas</requirement>
11 <requirement type="package" version="8.0.1">click</requirement> 12 <requirement type="package" version="8.0.1">click</requirement>
12 </requirements> 13 </requirements>
14
15 <environment_variables>
16 <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable>
17 <environment_variable name="XDG_CACHE_HOME">\$_GALAXY_JOB_TMP_DIR</environment_variable>
18 </environment_variables>
13 19
14 <command detect_errors="aggressive"><![CDATA[ 20 <command detect_errors="aggressive"><![CDATA[
15 sh ${matchms_formatter_cli} 21 sh ${matchms_formatter_cli}
16 ]]></command> 22 ]]></command>
17 23
18 <configfiles> 24 <configfiles>
19 <configfile name="matchms_formatter_cli"> 25 <configfile name="matchms_formatter_cli">
20 python3 ${__tool_directory__}/formatter.py \ 26 python3 ${__tool_directory__}/formatter.py \
21 --sf "$scores" \ 27 --sf "$scores" \
22 --mf "$matches" \
23 --o "$output" \ 28 --o "$output" \
24 $method.selection \ 29 $method.selection \
25 #if $method.selection == "get-thresholded-data" 30 #if $method.selection == "get-thresholded-data"
26 --st $method.scores_threshold \ 31 --st $method.scores_threshold \
27 --mt $method.matches_threshold 32 --mt $method.matches_threshold
30 #end if 35 #end if
31 </configfile> 36 </configfile>
32 </configfiles> 37 </configfiles>
33 38
34 <inputs> 39 <inputs>
35 <param label="Scores Table" name="scores" type="data" format="tsv" help="Scores output table." /> 40 <param label="Scores object" name="scores" type="data" format="json" help="MatchMS Scores json file." />
36 <param label="Matches Table" name="matches" type="data" format="tsv" help="Scores output table." />
37
38 41
39 <conditional name="method"> 42 <conditional name="method">
40 <param name="selection" type="select" label="Formatting method"> 43 <param name="selection" type="select" label="Formatting method">
41 <option value="get-thresholded-data" selected="true">Thresholding</option> 44 <option value="get-thresholded-data" selected="true">Thresholding</option>
42 <option value="get-top-k-data">Top K Matches</option> 45 <option value="get-top-k-data">Top K Matches</option>
57 <data label="${tool.name} (${method.selection}) on ${on_string}" name="output" format="tsv"/> 60 <data label="${tool.name} (${method.selection}) on ${on_string}" name="output" format="tsv"/>
58 </outputs> 61 </outputs>
59 62
60 <tests> 63 <tests>
61 <test> 64 <test>
62 <param name="scores" value="scores_test2_out.tsv" ftype="tsv"/> 65 <param name="scores" value="similarity/scores_test2_out.json" ftype="json"/>
63 <param name="matches" value="matches_test2_out.tsv" ftype="tsv"/>
64 <param name="selection" value="get-thresholded-data"/> 66 <param name="selection" value="get-thresholded-data"/>
65 <param name="scores_threshold" value="0.4"/> 67 <param name="scores_threshold" value="0.4"/>
66 <param name="matches_threshold" value="2"/> 68 <param name="matches_threshold" value="2"/>
67 <output name="output" file="formatter/test2_threshold_formatting.tsv" ftype="tsv" 69 <output name="output" file="formatter/test2_threshold_formatting.tsv" ftype="tsv"
68 checksum="md5$8929cdac47252da638f066261ffc16b7"/> 70 checksum="md5$db18b3f3dd5d8dea4db0fc1d59d3db3b"/>
69 </test> 71 </test>
70 <test> 72 <test>
71 <param name="scores" value="scores_test2_out.tsv" ftype="tsv"/> 73 <param name="scores" value="similarity/scores_test2_out.json" ftype="json"/>
72 <param name="matches" value="matches_test2_out.tsv" ftype="tsv"/>
73 <param name="selection" value="get-top-k-data"/> 74 <param name="selection" value="get-top-k-data"/>
74 <param name="k" value="3"/> 75 <param name="k" value="3"/>
75 <output name="output" file="formatter/test2_topk_formatting.tsv" ftype="tsv" 76 <output name="output" file="formatter/test2_topk_formatting.tsv" ftype="tsv"
76 checksum="md5$a9186721aa2df2f9dbdef5021aa6bc26"/> 77 checksum="md5$ff827ec7413acac3d2394330935ace99"/>
77 </test> 78 </test>
78 </tests> 79 </tests>
79 80
80 <help><![CDATA[ 81 <help><![CDATA[
81 Usage 82 @HELP_formatter@
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> 83 ]]></help>
111 </tool> 84 </tool>