comparison data_manager/kraken2_build_database.xml @ 6:9002633b4737 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kraken2_database/ commit 5d74f13e59c4a2862c108ac1a08c067b0cfb2d97
author iuc
date Fri, 24 Jun 2022 12:44:33 +0000
parents 2f27f3b86827
children e4b4837f06f5
comparison
equal deleted inserted replaced
5:2f27f3b86827 6:9002633b4737
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="kraken2_build_database" name="Kraken2" tool_type="manage_data" version="@TOOL_VERSION@" profile="18.09"> 2 <tool id="kraken2_build_database" name="Kraken2" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
3 <macros> 3 <macros>
4 <token name="@TOOL_VERSION@">2.1.1</token> 4 <token name="@TOOL_VERSION@">2.1.2</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 <token name="@PROFILE@">21.01</token>
5 <xml name="common_params"> 7 <xml name="common_params">
6 <param name="kmer_len" type="integer" value="35" label="K-mer length in BP" /> 8 <param name="kmer_len" type="integer" value="35" label="K-mer length in BP" />
7 <param name="minimizer_len" type="integer" value="31" label="Minimizer length" /> 9 <param name="minimizer_len" type="integer" value="31" label="Minimizer length" />
8 <param name="minimizer_spaces" type="integer" value="6" label="Minimizer spaces" /> 10 <param name="minimizer_spaces" type="integer" value="6" label="Minimizer spaces" />
9 <param name="load_factor" type="float" value="0.7" min="0" max="1" label="Load factor" help="Proportion of the hash table to be populated" /> 11 <param name="load_factor" type="float" value="0.7" min="0" max="1" label="Load factor" help="Proportion of the hash table to be populated" />
10 <param name="clean" type="boolean" truevalue="--clean" falsevalue="" checked="true" label="Clean up extra files" /> 12 <param name="clean" type="boolean" truevalue="--clean" falsevalue="" checked="true" label="Clean up extra files" />
13 </xml>
14 <xml name="viral">
15 <option value="viral">Viral (viral; ~50 GB)</option>
16 </xml>
17 <xml name="minusb">
18 <option value="minusb">MinusB (archaea, viral, plasmid, human, UniVec_Core; ~8 GB)</option>
19 </xml>
20 <xml name="standard">
21 <option value="standard">Standard-Full (archaea, bacteria, viral, plasmid, human, UniVec_Core; ~50 GB)</option>
22 </xml>
23 <xml name="standard_08gb">
24 <option value="standard_08gb">Standard-8 (Standard with DB capped at 8 GB)</option>
25 </xml>
26 <xml name="standard_16gb">
27 <option value="standard_16gb">Standard-16 (Standard with DB capped at 16 GB)</option>
28 </xml>
29 <xml name="pluspf">
30 <option value="pluspf">PlusPF (Standard plus protozoa and fungi; ~50 GB)</option>
31 </xml>
32 <xml name="pluspf_08gb">
33 <option value="pluspf_08gb">PlusPF-8 (PlusPF with DB capped at 8 GB; ~7.5 GB)</option>
34 </xml>
35 <xml name="pluspf_16gb">
36 <option value="pluspf_16gb">PlusPF-16 (PlusPF with DB capped at 16 GB; ~15 GB)</option>
37 </xml>
38 <xml name="pluspfp">
39 <option value="pluspfp">PlusPFP (Standard plus protozoa, fungi and plant; ~129 GB)</option>
40 </xml>
41 <xml name="pluspfp_08gb">
42 <option value="pluspfp_08gb">PlusPFP-8 (PlusPFP with DB capped at 8 GB; ~7.5 GB)</option>
43 </xml>
44 <xml name="pluspfp_16gb">
45 <option value="pluspfp_16gb">PlusPFP-16 (PlusPFP with DB capped at 16 GB; ~15 GB)</option>
11 </xml> 46 </xml>
12 </macros> 47 </macros>
13 <description>database builder</description> 48 <description>database builder</description>
14 <requirements> 49 <requirements>
15 <requirement type="package" version="@TOOL_VERSION@">kraken2</requirement> 50 <requirement type="package" version="@TOOL_VERSION@">kraken2</requirement>
16 <requirement type="package" version="3.7">python</requirement> 51 <requirement type="package" version="3.7">python</requirement>
17 </requirements> 52 </requirements>
18 <version_command>kraken2 -version | head -n 1 | awk '{print $NF}'</version_command> 53 <version_command>kraken2 -version | head -n 1 | awk '{print $NF}'</version_command>
19 <command detect_errors="exit_code"> 54 <command detect_errors="exit_code"><![CDATA[
20 <![CDATA[ 55 python '$__tool_directory__/kraken2_build_database.py'
21 python '$__tool_directory__/kraken2_build_database.py' 56 '$out_file'
22 '${out_file}' 57 --database-type '$database_type.database_type'
23 --database-type ${database_type.database_type} 58 #if $database_type.database_type == "standard_local_build"
24 #if $database_type.database_type == "minikraken" 59 --threads \${GALAXY_SLOTS:-1}
25 --minikraken2-version ${database_type.minikraken2_version} 60 --kmer-len $database_type.kmer_len
26 #else if $database_type.database_type == "standard_prebuilt" 61 --minimizer-len $database_type.minimizer_len
27 --standard-prebuilt-size ${database_type.standard_prebuilt_size} 62 --minimizer-spaces $database_type.minimizer_spaces
28 #if $database_type.prebuilt_date_custom != "" 63 --load-factor $database_type.load_factor
29 --prebuilt-date ${database_type.prebuilt_date_custom} 64 $database_type.clean
30 #else 65 #else if $database_type.database_type == "standard_prebuilt"
31 --prebuilt-date ${database_type.prebuilt_date} 66 --prebuilt-db '$database_type.prebuild.prebuilt_db'
32 #end if 67 --prebuilt-date '$database_type.prebuild.prebuilt_date'
33 #else if $database_type.database_type == "standard_local_build" 68 #else if $database_type.database_type == "minikraken"
34 --threads \${GALAXY_SLOTS:-1} 69 --minikraken2-version '$database_type.minikraken2_version'
35 --kmer-len ${database_type.kmer_len} 70 #else if $database_type.database_type == "special"
36 --minimizer-len ${database_type.minimizer_len} 71 --threads \${GALAXY_SLOTS:-1}
37 --minimizer-spaces ${database_type.minimizer_spaces} 72 --special-database-type '$database_type.special_database_type'
38 --load-factor ${database_type.load_factor} 73 --kmer-len $database_type.kmer_len
39 ${database_type.clean} 74 --minimizer-len $database_type.minimizer_len
40 #else if $database_type.database_type == "special" 75 --minimizer-spaces $database_type.minimizer_spaces
41 --threads \${GALAXY_SLOTS:-1} 76 --load-factor $database_type.load_factor
42 --special-database-type ${database_type.special_database_type} 77 $database_type.clean
43 --kmer-len ${database_type.kmer_len} 78 #else if $database_type.database_type == "custom"
44 --minimizer-len ${database_type.minimizer_len} 79 --threads \${GALAXY_SLOTS:-1}
45 --minimizer-spaces ${database_type.minimizer_spaces} 80 --custom-fasta '$database_type.custom_fasta'
46 --load-factor ${database_type.load_factor} 81 --custom-database-name '$database_type.custom_database_name'
47 ${database_type.clean} 82 $database_type.skip_maps
48 #else if $database_type.database_type == "custom" 83 --kmer-len $database_type.kmer_len
49 --threads \${GALAXY_SLOTS:-1} 84 --minimizer-len $database_type.minimizer_len
50 ${database_type.skip_maps} 85 --minimizer-spaces $database_type.minimizer_spaces
51 --custom-fasta ${database_type.custom_fasta} 86 --load-factor $database_type.load_factor
52 --custom-database-name ${database_type.custom_database_name} 87 $database_type.clean
53 --kmer-len ${database_type.kmer_len} 88 #end if
54 --minimizer-len ${database_type.minimizer_len} 89 ]]>
55 --minimizer-spaces ${database_type.minimizer_spaces}
56 --load-factor ${database_type.load_factor}
57 ${database_type.clean}
58 #end if
59 ]]>
60 </command> 90 </command>
61 <inputs> 91 <inputs>
62 <conditional name="database_type"> 92 <conditional name="database_type">
63 <param name="database_type" type="select" multiple="false" label="Database Type"> 93 <param name="database_type" type="select" multiple="false" label="Database Type">
64 <option value="standard_local_build">Standard, Local Build</option> 94 <option value="standard_local_build">Standard, Local Build</option>
65 <option value="standard_prebuilt">Standard, Pre-Built</option> 95 <option value="standard_prebuilt">Pre-Built Refseq indexes</option>
66 <option value="minikraken">MiniKraken</option> 96 <option value="minikraken">MiniKraken</option>
67 <option value="special">Special</option> 97 <option value="special">Special</option>
68 <option value="custom">Custom</option> 98 <option value="custom">Custom</option>
69 </param> 99 </param>
70 <when value="standard_local_build"> 100 <when value="standard_local_build">
71 <expand macro="common_params" /> 101 <expand macro="common_params" />
72 </when> 102 </when>
73 <when value="standard_prebuilt"> 103 <when value="standard_prebuilt">
74 <param name="standard_prebuilt_size" type="select" multiple="false" label="Select size of prebuilt database to download"> 104 <conditional name="prebuild">
75 <option value="full">Standard-Full (~50 GB)</option> 105 <param name="prebuilt_date" type="select" label="Select index build date">
76 <option value="16">Standard-16 (~16 GB)</option> 106 <option value="2022-06-07">June 7, 2022</option>
77 <option value="8">Standard-8 (~8 GB)</option> 107 <option value="2021-05-17">May 17, 2021</option>
78 </param> 108 <option value="2021-01-27">January 27, 2021</option>
79 <param name="prebuilt_date" type="select" multiple="false" optional="true" label="Select database build date"> 109 <option value="2020-12-02">December 2, 2020</option>
80 <option value="2021-05-17">May 17, 2021</option> 110 <option value="2020-09-19">September 19, 2020</option>
81 <option value="2020-12-02">December 2, 2020</option> 111 </param>
82 </param> 112 <when value="2022-06-07">
83 <param name="prebuilt_date_custom" type="text" label="Custom date (YYYY-MM-DD)" help="Any text here will overwrite the selected date above." /> 113 <param name="prebuilt_db" type="select" label="Select a prebuilt Refseq index to download">
114 <expand macro="viral"/>
115 <expand macro="minusb"/>
116 <expand macro="standard"/>
117 <expand macro="standard_08gb"/>
118 <expand macro="standard_16gb"/>
119 <expand macro="pluspf"/>
120 <expand macro="pluspf_08gb"/>
121 <expand macro="pluspf_16gb"/>
122 <expand macro="pluspfp"/>
123 <expand macro="pluspfp_08gb"/>
124 <expand macro="pluspfp_16gb"/>
125 </param>
126 </when>
127 <when value="2021-05-17">
128 <param name="prebuilt_db" type="select" label="Select a prebuilt Refseq index to download">
129 <expand macro="viral"/>
130 <expand macro="minusb"/>
131 <expand macro="standard"/>
132 <expand macro="standard_08gb"/>
133 <expand macro="standard_16gb"/>
134 <expand macro="pluspf"/>
135 <expand macro="pluspf_08gb"/>
136 <expand macro="pluspf_16gb"/>
137 <expand macro="pluspfp_08gb"/>
138 <expand macro="pluspfp_16gb"/>
139 </param>
140 </when>
141 <when value="2021-01-27">
142 <param name="prebuilt_db" type="select" label="Select a prebuilt Refseq index to download">
143 <expand macro="pluspf"/>
144 <expand macro="pluspf_08gb"/>
145 <expand macro="pluspf_16gb"/>
146 <expand macro="pluspfp_08gb"/>
147 <expand macro="pluspfp_16gb"/>
148 </param>
149 </when>
150 <when value="2020-12-02">
151 <param name="prebuilt_db" type="select" label="Select a prebuilt Refseq index to download">
152 <expand macro="viral"/>
153 <expand macro="minusb"/>
154 <expand macro="standard"/>
155 <expand macro="standard_08gb"/>
156 <expand macro="standard_16gb"/>
157 </param>
158 </when>
159 <when value="2020-09-19">
160 <param name="prebuilt_db" type="select" multiple="false" label="Select a prebuilt Refseq indexes to download">
161 <expand macro="minusb"/>
162 <expand macro="standard"/>
163 <expand macro="standard_08gb"/>
164 <expand macro="standard_16gb"/>
165 <expand macro="pluspf"/>
166 <expand macro="pluspf_08gb"/>
167 <expand macro="pluspf_16gb"/>
168 <expand macro="pluspfp_08gb"/>
169 <expand macro="pluspfp_16gb"/>
170 </param>
171 </when>
172 </conditional>
84 </when> 173 </when>
85 <when value="minikraken"> 174 <when value="minikraken">
86 <param name="minikraken2_version" type="select" multiple="false" label="Select MiniKraken2 database version to download"> 175 <param name="minikraken2_version" type="select" multiple="false" label="Select MiniKraken2 database version to download">
87 <option value="v2">Version 2</option> 176 <option value="v2">Version 2</option>
88 <option value="v1">Version 1</option> 177 <option value="v1">Version 1</option>
95 <option value="rdp">RDP</option> 184 <option value="rdp">RDP</option>
96 </param> 185 </param>
97 <expand macro="common_params" /> 186 <expand macro="common_params" />
98 </when> 187 </when>
99 <when value="custom"> 188 <when value="custom">
100 <param name="custom_fasta" type="data" format="fasta" multiple="False" optional="true" label="Select history item" /> 189 <param name="custom_fasta" type="data" format="fasta" multiple="False" label="Select history item" />
101 <param name="custom_database_name" type="text" label="Name for this database" /> 190 <param name="custom_database_name" type="text" label="Name for this database" />
102 <param name="skip_maps" type="boolean" truevalue="--skip-maps" falsevalue="" label="Skip downloading accession number to taxid maps during taxonomy download." /> 191 <param name="skip_maps" type="boolean" truevalue="--skip-maps" falsevalue="" label="Skip downloading accession number to taxid maps during taxonomy download." />
103 <expand macro="common_params" /> 192 <expand macro="common_params" />
104 </when> 193 </when>
105 </conditional> 194 </conditional>
106 </inputs> 195 </inputs>
107 <outputs> 196 <outputs>
108 <data name="out_file" format="data_manager_json" /> 197 <data name="out_file" format="data_manager_json" />
109 </outputs> 198 </outputs>
110 <tests> 199 <tests>
200 <test expect_num_outputs="1">
201 <conditional name="database_type">
202 <param name="database_type" value="custom" />
203 <param name="custom_fasta" value="adapter.fa" />
204 <param name="custom_database_name" value="custom_database" />
205 <param name="skip_maps" value="true" />
206 <param name="kmer_len" value="35" />
207 <param name="minimizer_spaces" value="6"/>
208 <param name="load_factor" value="0.7" />
209 <param name="clean" truevalue="--clean"/>
210 </conditional>
211 <output name="out_file">
212 <assert_contents>
213 <has_text text="kraken2_databases"/>
214 <has_text text="path"/>
215 <has_text text="custom_database"/>
216 </assert_contents>
217 </output>
218 </test>
111 <test> 219 <test>
112 <param name="database_type" value="custom" /> 220 <conditional name="database_type">
113 <param name="custom_fasta" value="adapter.fa" /> 221 <param name="database_type" value="standard_prebuilt" />
114 <param name="custom_database_name" value="database" /> 222 <conditional name="prebuild">
115 <param name="skip_maps" value="true" /> 223 <param name="prebuilt_date" value="2022-06-07"/>
116 <output name="out_file" value="kraken2_custom_data_manager.json" /> 224 <param name="prebuilt_db" value="standard_08gb"/>
225 </conditional>
226 </conditional>
227 <output name="out_file">
228 <assert_contents>
229 <has_text text="kraken2_databases"/>
230 <has_text text="path"/>
231 <has_text text="Standard-8"/>
232 <has_text text="_standard_prebuilt_standard_08gb_2022-06-07"/>
233 <has_text text="Version"/>
234 <has_text text="Downloaded"/>
235 </assert_contents>
236 </output>
117 </test> 237 </test>
118 </tests> 238 </tests>
119 <help> 239 <help><![CDATA[
120 </help> 240 Build Kraken2 databases or download `prebuilt Kraken2 RefSeq indexes <https://benlangmead.github.io/aws-indexes/k2>`__
241 ]]></help>
121 <citations> 242 <citations>
122 <citation type="doi">10.1186/gb-2014-15-3-r46</citation> 243 <citation type="doi">10.1186/gb-2014-15-3-r46</citation>
123 </citations> 244 </citations>
124 </tool> 245 </tool>