comparison clair3.xml @ 1:63e02ef6e153 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/clair3 commit 05505898035b41c07461dc0eecec61699ecbcf41
author iuc
date Fri, 28 Oct 2022 20:58:30 +0000
parents 44f6ec903688
children
comparison
equal deleted inserted replaced
0:44f6ec903688 1:63e02ef6e153
1 <tool id="clair3" name="Clair3" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> 1 <tool id="clair3" name="Clair3" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
2 <description>germline small variant caller for long-reads</description>
2 <macros> 3 <macros>
3 <token name="@TOOL_VERSION@">0.1.11</token> 4 <token name="@TOOL_VERSION@">0.1.12</token>
4 <token name="@VERSION_SUFFIX@">0</token> 5 <token name="@VERSION_SUFFIX@">0</token>
5 </macros> 6 </macros>
7 <xrefs>
8 <xref type='bio.tools'>clair3</xref>
9 </xrefs>
6 <requirements> 10 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">clair3</requirement> 11 <requirement type="package" version="@TOOL_VERSION@">clair3</requirement>
8 </requirements> 12 </requirements>
9 <version_command><![CDATA[run_clair3.sh --version | cut -f2 -d ' ']]></version_command> 13 <version_command><![CDATA[run_clair3.sh --version | cut -f2 -d ' ']]></version_command>
10 <command detect_errors="exit_code"><![CDATA[ 14 <command detect_errors="exit_code"><![CDATA[
16 samtools faidx reference.fasta && 20 samtools faidx reference.fasta &&
17 21
18 #if $model_source.source == "datatable" 22 #if $model_source.source == "datatable"
19 #set model_path = $model_source.model.fields.path 23 #set model_path = $model_source.model.fields.path
20 #end if 24 #end if
21 25 #set $extension = $bam_input.ext
22 ln -s '${$bam_input}' input_reads.bam && 26 ln -s '${$bam_input}' input_reads.$extension &&
23 ln -s '${$bam_input.metadata.bam_index}' input_reads.bai && 27 #if $extension == 'bam'
28 ln -s '${$bam_input.metadata.bam_index}' input_reads.bai &&
29 #else
30 ln -s '${$bam_input.metadata.cram_index}' input_reads.crai &&
31 #end if
24 32
25 #if $bed_or_vcf.bed_or_vcf_selector == 'bed' 33 #if $bed_or_vcf.bed_or_vcf_selector == 'bed'
26 ln -s '$bed_or_vcf.bed_fn' input.bed && 34 ln -s '$bed_or_vcf.bed_fn' input.bed &&
27 #elif $bed_or_vcf.bed_or_vcf_selector == 'vcf' 35 #elif $bed_or_vcf.bed_or_vcf_selector == 'vcf'
28 ln -s '$bed_or_vcf.vcf_fn' input.vcf && 36 ln -s '$bed_or_vcf.vcf_fn' input.vcf &&
29 #end if 37 #end if
30 38
31 run_clair3.sh 39 run_clair3.sh
32 --bam_fn=input_reads.bam 40 --bam_fn=input_reads.$extension
33 --ref_fn=reference.fasta 41 --ref_fn=reference.fasta
34 #if $model_source.source == "datatable" 42 #if $model_source.source == "datatable"
35 --platform='${model_source.model.fields.platform}' 43 --platform='${model_source.model.fields.platform}'
36 --model_path=${model_source.model.fields.path} 44 --model_path=${model_source.model.fields.path}
37 #else 45 #else
41 --platform='ont' 49 --platform='ont'
42 #end if 50 #end if
43 --model_path=\$(dirname \$(which run_clair3.sh))/models/$model_source.select_built_in 51 --model_path=\$(dirname \$(which run_clair3.sh))/models/$model_source.select_built_in
44 #end if 52 #end if
45 --output='.' 53 --output='.'
46 --threads=\${GALAXY_SLOTS:-1} 54 --threads=\${GALAXY_SLOTS:-2}
47 #if $bed_or_vcf.bed_or_vcf_selector == 'bed' 55 #if $bed_or_vcf.bed_or_vcf_selector == 'bed'
48 --bed_fn=input.bed 56 --bed_fn=input.bed
49 #elif $bed_or_vcf.bed_or_vcf_selector == 'vcf' 57 #elif $bed_or_vcf.bed_or_vcf_selector == 'vcf'
50 --vcf_fn=input.vcf 58 --vcf_fn=input.vcf
51 #else 59 #else
52 $bed_or_vcf.include_all_ctgs 60 $bed_or_vcf.include_all_ctgs
53 #end if 61 #end if
54 #if $output_options.selection_mode == 'advanced' 62 $gvcf
55 $output_options.gvcf
56 #end if
57 #if $adv.qual 63 #if $adv.qual
58 --qual=$adv.qual 64 --qual=$adv.qual
59 #end if 65 #end if
60 #if $adv.snp_min_af 66 #if $adv.snp_min_af
61 --snp_min_af=$adv.snp_min_af 67 --snp_min_af=$adv.snp_min_af
71 --chunk_size=$adv.chunk_size 77 --chunk_size=$adv.chunk_size
72 #end if 78 #end if
73 79
74 ]]></command> 80 ]]></command>
75 <inputs> 81 <inputs>
82 <param type="data" name="bam_input" argument="--bam_fn" format="bam,cram" label="BAM/CRAM file input" />
76 <conditional name="ref_source"> 83 <conditional name="ref_source">
77 <param type="select" label="Reference genome source" name="source"> 84 <param type="select" label="Reference genome source" name="source">
78 <option value="history" selected="true">History</option> 85 <option value="history" selected="true">History</option>
79 <option value="builtin">Built-in</option> 86 <option value="builtin">Built-in</option>
80 </param> 87 </param>
81 <when value="history"> 88 <when value="history">
82 <param type="data" format="fasta" name="ref_fasta" label="Reference genome" /> 89 <param type="data" format="fasta" name="ref_fasta" argument="--ref_fn" label="Reference genome" />
83 </when> 90 </when>
84 <when value="builtin"> 91 <when value="builtin">
85 <param type="select" name="ref_fasta_builtin" label="Reference genome"> 92 <param type="select" name="ref_fasta_builtin" label="Reference genome">
86 <options from_data_table="all_fasta" /> 93 <options from_data_table="all_fasta" />
87 </param> 94 </param>
88 </when> 95 </when>
89 </conditional> 96 </conditional>
90 <conditional name="model_source"> 97 <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"> 98 <param name="source" type="select" label="Clair3 model" help="Select if you want to use a built-in model shipping with the tool or a model cached on this Galaxy server.">
92 <option value="built-in">Built-in</option> 99 <option value="built-in">Built-in</option>
93 <option value="datatable">Datatable</option> 100 <option value="datatable">Cached</option>
94 </param> 101 </param>
95 <when value="built-in"> 102 <when value="built-in">
96 <param type="select" name="select_built_in" label="Select built-in model."> 103 <param type="select" name="select_built_in" label="Built-in model">
97 <option value="r941_prom_sup_g5014">r941_prom_sup_g5014</option> 104 <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> 105 <option value="r941_prom_hac_g360+g422">r941_prom_hac_g360+g422</option>
99 <option value="hifi">hifi</option> 106 <option value="hifi">hifi</option>
100 <option value="ilmn">ilmn</option> 107 <option value="ilmn">ilmn</option>
101 </param> 108 </param>
102 </when> 109 </when>
103 <when value="datatable"> 110 <when value="datatable">
104 <param argument="--model_path" type="select" name="model" label="Select model" > 111 <param name="model" argument="--model_path" type="select" label="Cached model from server" >
105 <options from_data_table="clair3_models"> 112 <options from_data_table="clair3_models">
106 <validator type="no_options" message="no modles available" /> 113 <validator type="no_options" message="no cached models available" />
107 </options> 114 </options>
108 </param> 115 </param>
109 </when> 116 </when>
110 </conditional> 117 </conditional>
111 <param type="data" name="bam_input" format="bam" label="BAM file input." /> 118 <conditional name="bed_or_vcf">
112 <conditional name="bed_or_vcf"> 119 <param type="select" name="bed_or_vcf_selector" label="Restict variant calling to:">
113 <param type="select" name="bed_or_vcf_selector" label="Restict variant calling to:"> 120 <option value="unrestricted" selected="true">Whole reference (unrestricted)</option>
114 <option value="unrestricted" selected="true">Whole reference (unrestricted)</option> 121 <option value="bed" selected="true">Regions defined in BED dataset</option>
115 <option value="bed" selected="true">Regions defined in BED dataset</option> 122 <option value="vcf">Sites defined in VCF dataset</option>
116 <option value="vcf">Sites defined in VCF dataset</option> 123 </param>
117 </param> 124 <when value="bed">
118 <when value="bed"> 125 <param type="data" argument="--bed_fn" format="bed" label="Call variants only in the provided bed regions."/>
119 <param type="data" name="bed_fn" format="bed" label="Call variants only in the provided bed regions."/> 126 </when>
120 </when> 127 <when value="vcf">
121 <when value="vcf"> 128 <param type="data" argument="--vcf_fn" format="vcf" label="Candidate sites VCF file input" help="Variants will only be called at the sites in the VCF file if provided."/>
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."/> 129 </when>
123 </when> 130 <when value="unrestricted">
124 <when value="unrestricted"> 131 <param type="boolean" argument="--include_all_ctgs" truevalue="--include_all_ctgs" falsevalue="" checked="true" label="Call variants on all contigs" help="If disabled, call in chr{1..22,X,Y} and {1..22,X,Y}" />
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." /> 132 </when>
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> 133 </conditional>
141 <section name="adv" title="Advanced Parameters" expanded="false"> 134 <param type="boolean" argument="--gvcf" truevalue="--gvcf" falsevalue="" label="Enable GVCF output" help="GVCF stands for Genomic VCF. A GVCF is a kind of VCF, so the basic format specification is the same as for a regular VCF but contains extra information. Default: disable" />
142 <param type="integer" name="qual" value="0" min="0" label="If set, variants with >qual will be marked PASS, or LowQual otherwise." /> 135 <param name="output_files" type="select" display="checkboxes" multiple="true" label="Optional additional output files">
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." /> 136 <option value="full_alignment">Full alignment file</option>
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." /> 137 <option value="pileup">Pileup file</option>
145 <param type="boolean" name="enable_phasing" truevalue="--enable_phasing" falsevalue="" label="Output phased variants using whatshap, default: disable" /> 138 <option value="phased_bam">Phased BAM file</option>
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." /> 139 </param>
147 <param type="boolean" name="print_ref_calls" truevalue="--print_ref_calls" falsevalue="" label="Show reference calls (0/0) in vcf file, default: disable." /> 140 <section name="adv" title="Advanced parameters" expanded="false">
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."> 141 <param type="integer" argument="--qual" value="0" min="0" label="Qual" help="If set, variants with >qual will be marked PASS, or LowQual otherwise." />
149 <option value="" selected="true">diploid</option> 142 <param type="float" argument="--snp_min_af" value="0.08" min="0" max="1" label="Minimum SNP AF" help="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." />
150 <option value="--haploid_sensitive">haploid (sensitive)</option> 143 <param type="float" argument="--indel_min_af" value="0.15" min="0" max="1" label="Minimum INDEL AF" help="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." />
151 <option value="--haploid_precise">haploid (precise)</option> 144 <param type="boolean" argument="--enable_phasing" truevalue="--enable_phasing" falsevalue="" label="Enable phasing" help="Output phased variants using whatshap. Default: disable" />
145 <param type="boolean" argument="--no_phasing_for_fa" truevalue="--no_phasing_for_fa" falsevalue="" label="Call variants without whatshap phasing" help="EXPERIMENTAL: Call variants without whatshap phasing in full alignment calling. Default: disable" />
146 <param type="boolean" argument="--print_ref_calls" truevalue="--print_ref_calls" falsevalue="" label="Print reference calls" help="Show reference calls (0/0) in vcf file. Default: disable." />
147 <param type="select" name="ploidity_model" label="Call with the following ploidy model" help="EXPERIMENTAL. When haploid sensitive is enabled only 1/1 is considered as a variant. When haploid precise is enabled only 0/1 and 1/1 are considered as a variant. Default: diploid.">
148 <option value="" selected="true">Diploid</option>
149 <option value="--haploid_sensitive">Haploid sensitive (--haploid_sensitive)</option>
150 <option value="--haploid_precise">haploid precise (--haploid_precise)</option>
152 </param> 151 </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" /> 152 <param type="integer" argument="--chunk_size" value="5000000" min="1" label="Chunk size" help="The size of each chuck for parallel processing. Default: 5Mbp." optional="true" />
154 </section> 153 </section>
155 </inputs> 154 </inputs>
156 <outputs> 155 <outputs>
157 <data name="merge_output" format="vcf_bgzip" from_work_dir="./merge_output.vcf.gz" /> 156 <data name="merge_output" format="vcf_bgzip" from_work_dir="./merge_output.vcf.gz" label="${tool.name} on ${on_string}: merged output"/>
158 <data name="pileup" format="vcf_bgzip" from_work_dir="./pileup.vcf.gz"> 157 <data name="pileup" format="vcf_bgzip" from_work_dir="./pileup.vcf.gz" label="${tool.name} on ${on_string}: pileup">
159 <filter>output_options['selection_mode'] == 'advanced' and output_options['pileup_check']</filter> 158 <filter>output_files and 'pileup' in output_files</filter>
160 </data> 159 </data>
161 <data name="full_alignment" format="vcf_bgzip" from_work_dir="./full_alignment.vcf.gz"> 160 <data name="full_alignment" format="vcf_bgzip" from_work_dir="./full_alignment.vcf.gz" label="${tool.name} on ${on_string}: full alignment">
162 <filter>output_options['selection_mode'] == 'advanced' and output_options['full_alignment_check']</filter> 161 <filter>output_files and 'full_alignment' in output_files</filter>
163 </data> 162 </data>
164 <data name="phased_bam" format="bam" from_work_dir="./phased_bam.bam"> 163 <data name="phased_bam" format="bam" from_work_dir="./phased_bam.bam" label="${tool.name} on ${on_string}: phased BAM">
165 <filter>output_options['selection_mode'] == 'advanced' and output_options['phased_bam_check']</filter> 164 <filter>output_files and 'phased_bam' in output_files</filter>
166 </data> 165 </data>
167 </outputs> 166 </outputs>
168 <tests> 167 <tests>
169 <test expect_num_outputs="1"> 168 <test expect_num_outputs="1">
170 <conditional name="model_source"> 169 <conditional name="model_source">
177 <param name="ref_fasta" value="test1.fasta" /> 176 <param name="ref_fasta" value="test1.fasta" />
178 </conditional> 177 </conditional>
179 <conditional name="bed_or_vcf"> 178 <conditional name="bed_or_vcf">
180 <param name="bed_or_vcf_selector" value="vcf"/> 179 <param name="bed_or_vcf_selector" value="vcf"/>
181 <param name="vcf_fn" value="test1.vcf.gz" /> 180 <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> 181 </conditional>
187 <section name="adv"> 182 <section name="adv">
188 <param name="no_phasing_for_fa" value="true"/> 183 <param name="no_phasing_for_fa" value="true"/>
189 <param name="print_ref_calls" value="true"/> 184 <param name="print_ref_calls" value="true"/>
190 <param name="ploidity_model" value=""/> 185 <param name="ploidity_model" value=""/>
205 </conditional> 200 </conditional>
206 <conditional name="ref_source"> 201 <conditional name="ref_source">
207 <param name="source" value="builtin" /> 202 <param name="source" value="builtin" />
208 <param name="ref_fasta_builtin" value="test1" /> 203 <param name="ref_fasta_builtin" value="test1" />
209 </conditional> 204 </conditional>
210 <conditional name="output_options"> 205 <param name="gvcf" value="true"/>
211 <param name="selection_mode" value="advanced"/> 206 <param name="output_files" value="full_alignment,pileup,phased_bam"/>
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"> 207 <section name="adv">
217 <param name="print_ref_calls" value="true"/> 208 <param name="print_ref_calls" value="true"/>
218 </section> 209 </section>
219 <output name="merge_output" decompress="true" file="merge_output_1.vcf" ftype="vcf_bgzip"/> 210 <output name="merge_output" decompress="true" file="merge_output_1.vcf.gz" ftype="vcf_bgzip"/>
220 <output name="pileup" decompress="true" file="pileup_1.vcf" ftype="vcf_bgzip"/> 211 <output name="pileup" decompress="true" file="pileup_1.vcf.gz" ftype="vcf_bgzip"/>
221 <output name="full_alignment" decompress="true" file="full_alignment_1.vcf" ftype="vcf_bgzip"/> 212 <output name="full_alignment" decompress="true" file="full_alignment_1.vcf.gz" ftype="vcf_bgzip"/>
222 <output name="phased_bam" file="phased_bam_1.bam" ftype="bam"/> 213 <output name="phased_bam" file="phased_bam_1.bam" ftype="bam"/>
223 </test> 214 </test>
224 <test expect_num_outputs="4"> 215 <test expect_num_outputs="4">
225 <conditional name="model_source"> 216 <conditional name="model_source">
226 <param name="source" value="datatable" /> 217 <param name="source" value="datatable" />
233 </conditional> 224 </conditional>
234 <conditional name="ref_source"> 225 <conditional name="ref_source">
235 <param name="source" value="builtin" /> 226 <param name="source" value="builtin" />
236 <param name="ref_fasta_builtin" value="test1" /> 227 <param name="ref_fasta_builtin" value="test1" />
237 </conditional> 228 </conditional>
238 <conditional name="output_options"> 229 <param name="output_files" value="full_alignment,pileup,phased_bam"/>
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"> 230 <section name="adv">
245 <param name="snp_min_af" value="0.5"/> 231 <param name="snp_min_af" value="0.5"/>
246 <param name="indel_min_af" value="0.12"/> 232 <param name="indel_min_af" value="0.12"/>
247 <param name="no_phasing_for_fa" value="true" /> 233 <param name="no_phasing_for_fa" value="true" />
248 <param name="print_ref_calls" value="true"/> 234 <param name="print_ref_calls" value="true"/>
266 <assert_contents> 252 <assert_contents>
267 <has_size value="0" /> 253 <has_size value="0" />
268 </assert_contents> 254 </assert_contents>
269 </output> 255 </output>
270 </test> 256 </test>
257 <!-- Test input CRAM -->
258 <test expect_num_outputs="1">
259 <conditional name="model_source">
260 <param name="source" value="builtin" />
261 <param name="select_built_in" value="r941_prom_hac_g360+g422" />
262 </conditional>
263 <param name="bam_input" value="test1.cram" />
264 <conditional name="ref_source">
265 <param name="source" value="history" />
266 <param name="ref_fasta" value="test1.fasta" />
267 </conditional>
268 <output name="merge_output" file="output_cram_test.vcf.gz" ftype="vcf_bgzip"/>
269 </test>
271 </tests> 270 </tests>
272 <help><![CDATA[ 271 <help><![CDATA[
273 Clair3 is a germline small variant caller for long-reads. Clair3 makes the best of two major method categories: 272 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. 273 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. 274 Clair3 runs fast and has superior performance, especially at lower coverage. Clair3 is simple and modular for easy deployment and integration.