comparison clair3.xml @ 0:44f6ec903688 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/clair3 commit 9968295e33bad5323ac9cbff8f64c2db35189a5f
author iuc
date Wed, 15 Jun 2022 09:45:05 +0000
parents
children 63e02ef6e153
comparison
equal deleted inserted replaced
-1:000000000000 0:44f6ec903688
1 <tool id="clair3" name="Clair3" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
2 <macros>
3 <token name="@TOOL_VERSION@">0.1.11</token>
4 <token name="@VERSION_SUFFIX@">0</token>
5 </macros>
6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">clair3</requirement>
8 </requirements>
9 <version_command><![CDATA[run_clair3.sh --version | cut -f2 -d ' ']]></version_command>
10 <command detect_errors="exit_code"><![CDATA[
11 #if $ref_source.source == "history"
12 ln -s '${ref_source.ref_fasta}' reference.fasta &&
13 #elif $ref_source.source == "builtin"
14 ln -s '${ref_source.ref_fasta_builtin.fields.path}' reference.fasta &&
15 #end if
16 samtools faidx reference.fasta &&
17
18 #if $model_source.source == "datatable"
19 #set model_path = $model_source.model.fields.path
20 #end if
21
22 ln -s '${$bam_input}' input_reads.bam &&
23 ln -s '${$bam_input.metadata.bam_index}' input_reads.bai &&
24
25 #if $bed_or_vcf.bed_or_vcf_selector == 'bed'
26 ln -s '$bed_or_vcf.bed_fn' input.bed &&
27 #elif $bed_or_vcf.bed_or_vcf_selector == 'vcf'
28 ln -s '$bed_or_vcf.vcf_fn' input.vcf &&
29 #end if
30
31 run_clair3.sh
32 --bam_fn=input_reads.bam
33 --ref_fn=reference.fasta
34 #if $model_source.source == "datatable"
35 --platform='${model_source.model.fields.platform}'
36 --model_path=${model_source.model.fields.path}
37 #else
38 #if $model_source.select_built_in == "hifi" or $model_source.select_built_in == "ilmn":
39 --platform='${$model_source.select_built_in}'
40 #else
41 --platform='ont'
42 #end if
43 --model_path=\$(dirname \$(which run_clair3.sh))/models/$model_source.select_built_in
44 #end if
45 --output='.'
46 --threads=\${GALAXY_SLOTS:-1}
47 #if $bed_or_vcf.bed_or_vcf_selector == 'bed'
48 --bed_fn=input.bed
49 #elif $bed_or_vcf.bed_or_vcf_selector == 'vcf'
50 --vcf_fn=input.vcf
51 #else
52 $bed_or_vcf.include_all_ctgs
53 #end if
54 #if $output_options.selection_mode == 'advanced'
55 $output_options.gvcf
56 #end if
57 #if $adv.qual
58 --qual=$adv.qual
59 #end if
60 #if $adv.snp_min_af
61 --snp_min_af=$adv.snp_min_af
62 #end if
63 #if $adv.indel_min_af
64 --indel_min_af=$adv.indel_min_af
65 #end if
66 $adv.enable_phasing
67 $adv.no_phasing_for_fa
68 $adv.print_ref_calls
69 $adv.ploidity_model
70 #if $adv.chunk_size
71 --chunk_size=$adv.chunk_size
72 #end if
73
74 ]]></command>
75 <inputs>
76 <conditional name="ref_source">
77 <param type="select" label="Reference genome source" name="source">
78 <option value="history" selected="true">History</option>
79 <option value="builtin">Built-in</option>
80 </param>
81 <when value="history">
82 <param type="data" format="fasta" name="ref_fasta" label="Reference genome" />
83 </when>
84 <when value="builtin">
85 <param type="select" name="ref_fasta_builtin" label="Reference genome">
86 <options from_data_table="all_fasta" />
87 </param>
88 </when>
89 </conditional>
90 <conditional name="model_source">
91 <param type="select" label="Select if you want to use built-in models or your own via datatable." name="source">
92 <option value="built-in">Built-in</option>
93 <option value="datatable">Datatable</option>
94 </param>
95 <when value="built-in">
96 <param type="select" name="select_built_in" label="Select built-in model.">
97 <option value="r941_prom_sup_g5014">r941_prom_sup_g5014</option>
98 <option value="r941_prom_hac_g360+g422">r941_prom_hac_g360+g422</option>
99 <option value="hifi">hifi</option>
100 <option value="ilmn">ilmn</option>
101 </param>
102 </when>
103 <when value="datatable">
104 <param argument="--model_path" type="select" name="model" label="Select model" >
105 <options from_data_table="clair3_models">
106 <validator type="no_options" message="no modles available" />
107 </options>
108 </param>
109 </when>
110 </conditional>
111 <param type="data" name="bam_input" format="bam" label="BAM file input." />
112 <conditional name="bed_or_vcf">
113 <param type="select" name="bed_or_vcf_selector" label="Restict variant calling to:">
114 <option value="unrestricted" selected="true">Whole reference (unrestricted)</option>
115 <option value="bed" selected="true">Regions defined in BED dataset</option>
116 <option value="vcf">Sites defined in VCF dataset</option>
117 </param>
118 <when value="bed">
119 <param type="data" name="bed_fn" format="bed" label="Call variants only in the provided bed regions."/>
120 </when>
121 <when value="vcf">
122 <param type="data" name="vcf_fn" format="vcf" label="Candidate sites VCF file input, variants will only be called at the sites in the VCF file if provided."/>
123 </when>
124 <when value="unrestricted">
125 <param type="boolean" name="include_all_ctgs" truevalue="--include_all_ctgs" falsevalue="" checked="true" label="Call variants on all contigs, otherwise call in chr{1..22,X,Y} and {1..22,X,Y}, default: disable." />
126 </when>
127 </conditional>
128 <conditional name="output_options">
129 <param label="Use advanced output options" name="selection_mode" type="select">
130 <option selected="true" value="defaults">Show merged output file only</option>
131 <option value="advanced">Show intermediate output files</option>
132 </param>
133 <when value="defaults"/>
134 <when value="advanced">
135 <param name="full_alignment_check" type="boolean" label="Show full alignment file"/>
136 <param name="pileup_check" type="boolean" label="Show pileup file"/>
137 <param name="phased_bam_check" type="boolean" label="Show itermediate phased BAM file"/>
138 <param type="boolean" name="gvcf" truevalue="--gvcf" falsevalue="" label="Enable GVCF output, default: disable" />
139 </when>
140 </conditional>
141 <section name="adv" title="Advanced Parameters" expanded="false">
142 <param type="integer" name="qual" value="0" min="0" label="If set, variants with >qual will be marked PASS, or LowQual otherwise." />
143 <param type="float" name="snp_min_af" value="0.08" min="0" max="1" label="Minimum SNP AF required for a candidate variant. Lowering the value might increase a bit of sensitivity in trade of speed and accuracy, default: ont:0.08,hifi:0.08,ilmn:0.08." />
144 <param type="float" name="indel_min_af" value="0.15" min="0" max="1" label="Minimum INDEL AF required for a candidate variant. Lowering the value might increase a bit of sensitivity in trade of speed and accuracy, default: ont:0.15,hifi:0.08,ilmn:0.08." />
145 <param type="boolean" name="enable_phasing" truevalue="--enable_phasing" falsevalue="" label="Output phased variants using whatshap, default: disable" />
146 <param type="boolean" name="no_phasing_for_fa" truevalue="--no_phasing_for_fa" falsevalue="" label="EXPERIMENTAL: Call variants without whatshap phasing in full alignment calling, default: disable." />
147 <param type="boolean" name="print_ref_calls" truevalue="--print_ref_calls" falsevalue="" label="Show reference calls (0/0) in vcf file, default: disable." />
148 <param type="select" name="ploidity_model" label="Call with the following ploidy model" help="EXPERIMENTAL: Enable haploid calling mode. Only 1/1 is considered as a variant, default: disable. EXPERIMENTAL: Enable haploid calling mode. 0/1 and 1/1 are considered as a variant, default: disable.">
149 <option value="" selected="true">diploid</option>
150 <option value="--haploid_sensitive">haploid (sensitive)</option>
151 <option value="--haploid_precise">haploid (precise)</option>
152 </param>
153 <param type="integer" name="chunk_size" value="5000000" min="1" label="The size of each chuck for parallel processing, default: 5Mbp." optional="true" />
154 </section>
155 </inputs>
156 <outputs>
157 <data name="merge_output" format="vcf_bgzip" from_work_dir="./merge_output.vcf.gz" />
158 <data name="pileup" format="vcf_bgzip" from_work_dir="./pileup.vcf.gz">
159 <filter>output_options['selection_mode'] == 'advanced' and output_options['pileup_check']</filter>
160 </data>
161 <data name="full_alignment" format="vcf_bgzip" from_work_dir="./full_alignment.vcf.gz">
162 <filter>output_options['selection_mode'] == 'advanced' and output_options['full_alignment_check']</filter>
163 </data>
164 <data name="phased_bam" format="bam" from_work_dir="./phased_bam.bam">
165 <filter>output_options['selection_mode'] == 'advanced' and output_options['phased_bam_check']</filter>
166 </data>
167 </outputs>
168 <tests>
169 <test expect_num_outputs="1">
170 <conditional name="model_source">
171 <param name="source" value="built-in"/>
172 <param name="select_built_in" value="r941_prom_hac_g360+g422"/>
173 </conditional>
174 <param name="bam_input" value="test1.bam" />
175 <conditional name="ref_source">
176 <param name="source" value="history" />
177 <param name="ref_fasta" value="test1.fasta" />
178 </conditional>
179 <conditional name="bed_or_vcf">
180 <param name="bed_or_vcf_selector" value="vcf"/>
181 <param name="vcf_fn" value="test1.vcf.gz" />
182 </conditional>
183 <conditional name="output_options">
184 <param name="selection_mode" value="advanced"/>
185 <param name="gvcf" value="true" />
186 </conditional>
187 <section name="adv">
188 <param name="no_phasing_for_fa" value="true"/>
189 <param name="print_ref_calls" value="true"/>
190 <param name="ploidity_model" value=""/>
191 </section>
192 <assert_stdout>
193 <has_text text="[WARNING] No contig intersection found, output header only in" />
194 </assert_stdout>
195 </test>
196 <test expect_num_outputs="4">
197 <conditional name="model_source">
198 <param name="source" value="builtin" />
199 <param name="select_built_in" value="r941_prom_hac_g360+g422" />
200 </conditional>
201 <param name="bam_input" value="test1.bam" />
202 <conditional name="bed_or_vcf">
203 <param name="bed_or_vcf_selector" value="unrestricted"/>
204 <param name="include_all_ctgs" value="true" />
205 </conditional>
206 <conditional name="ref_source">
207 <param name="source" value="builtin" />
208 <param name="ref_fasta_builtin" value="test1" />
209 </conditional>
210 <conditional name="output_options">
211 <param name="selection_mode" value="advanced"/>
212 <param name="pileup_check" value="true"/>
213 <param name="full_alignment_check" value="true"/>
214 <param name="phased_bam_check" value="true"/>
215 </conditional>
216 <section name="adv">
217 <param name="print_ref_calls" value="true"/>
218 </section>
219 <output name="merge_output" decompress="true" file="merge_output_1.vcf" ftype="vcf_bgzip"/>
220 <output name="pileup" decompress="true" file="pileup_1.vcf" ftype="vcf_bgzip"/>
221 <output name="full_alignment" decompress="true" file="full_alignment_1.vcf" ftype="vcf_bgzip"/>
222 <output name="phased_bam" file="phased_bam_1.bam" ftype="bam"/>
223 </test>
224 <test expect_num_outputs="4">
225 <conditional name="model_source">
226 <param name="source" value="datatable" />
227 <param name="model" value="test_model" />
228 </conditional>
229 <param name="bam_input" value="test1.bam" />
230 <conditional name="bed_or_vcf">
231 <param name="bed_or_vcf_selector" value="bed"/>
232 <param name="bed_fn" value="test1.bed" />
233 </conditional>
234 <conditional name="ref_source">
235 <param name="source" value="builtin" />
236 <param name="ref_fasta_builtin" value="test1" />
237 </conditional>
238 <conditional name="output_options">
239 <param name="selection_mode" value="advanced"/>
240 <param name="pileup_check" value="true"/>
241 <param name="full_alignment_check" value="true"/>
242 <param name="phased_bam_check" value="true"/>
243 </conditional>
244 <section name="adv">
245 <param name="snp_min_af" value="0.5"/>
246 <param name="indel_min_af" value="0.12"/>
247 <param name="no_phasing_for_fa" value="true" />
248 <param name="print_ref_calls" value="true"/>
249 </section>
250 <output name="merge_output" ftype="vcf_bgzip">
251 <assert_contents>
252 <has_size value="450" delta="50" />
253 </assert_contents>
254 </output>
255 <output name="pileup" ftype="vcf_bgzip">
256 <assert_contents>
257 <has_size value="0" />
258 </assert_contents>
259 </output>
260 <output name="full_alignment" ftype="vcf_bgzip">
261 <assert_contents>
262 <has_size value="0" />
263 </assert_contents>
264 </output>
265 <output name="phased_bam" ftype="bam">
266 <assert_contents>
267 <has_size value="0" />
268 </assert_contents>
269 </output>
270 </test>
271 </tests>
272 <help><![CDATA[
273 Clair3 is a germline small variant caller for long-reads. Clair3 makes the best of two major method categories:
274 pileup calling handles most variant candidates with speed, and full-alignment tackles complicated candidates to maximize precision and recall.
275 Clair3 runs fast and has superior performance, especially at lower coverage. Clair3 is simple and modular for easy deployment and integration.
276
277 https://github.com/HKU-BAL/Clair3
278
279 LICENSE:
280
281 Copyright 2021 The University of Hong Kong, Department of Computer Science
282
283 Redistribution and use in source and binary forms, with or without modification,
284 are permitted provided that the following conditions are met:
285
286 1. Redistributions of source code must retain the above copyright notice, this
287 list of conditions and the following disclaimer.
288
289 2. Redistributions in binary form must reproduce the above copyright notice,
290 this list of conditions and the following disclaimer in the documentation
291 and/or other materials provided with the distribution.
292
293 3. Neither the name of the copyright holder nor the names of its contributors
294 may be used to endorse or promote products derived from this software without
295 specific prior written permission.
296
297 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
298 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
299 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
300 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
301 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
302 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
303 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
304 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
305 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
306 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
307 ]]></help>
308 <citations>
309 <citation type="doi">10.1101/2021.12.29.474431</citation>
310 </citations>
311 </tool>