comparison tools/gatk/unified_genotyper.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9071e359b9a3
1 <tool id="gatk_unified_genotyper" name="Unified Genotyper" version="0.0.1">
2 <description>SNP and indel caller</description>
3 <command interpreter="python">gatk_wrapper.py
4 --stdout "${output_log}"
5 #for $i, $input_bam in enumerate( $reference_source.input_bams ):
6 -d "-I" "${input_bam.input_bam}" "${input_bam.input_bam.ext}" "gatk_input_${i}"
7 -d "" "${input_bam.input_bam.metadata.bam_index}" "bam_index" "gatk_input_${i}" ##hardcode galaxy ext type as bam_index
8 #end for
9 -p 'java
10 -jar "${GALAXY_DATA_INDEX_DIR}/shared/jars/gatk/GenomeAnalysisTK.jar"
11 -T "UnifiedGenotyper"
12 -o "${output_vcf}"
13 -et "NO_ET" ##ET no phone home
14 ##-log "${output_log}" ##don't use this to log to file, instead directly capture stdout
15 #if $reference_source.reference_source_selector != "history":
16 -R "${reference_source.ref_file.fields.path}"
17 #end if
18 --standard_min_confidence_threshold_for_calling "${standard_min_confidence_threshold_for_calling}"
19 --standard_min_confidence_threshold_for_emitting "${standard_min_confidence_threshold_for_emitting}"
20 '
21 #set $rod_binding_names = dict()
22 #if str( $input_dbsnp_rod ) != "None":
23 -d "-D" "${input_dbsnp_rod}" "${input_dbsnp_rod.ext}" "dbsnp_rod"
24 #end if
25 #for $rod_binding in $rod_bind:
26 #if str( $rod_binding.rod_bind_type.rod_bind_type_selector ) == 'custom':
27 #set $rod_bind_name = $rod_binding.rod_bind_type.custom_rod_name
28 #else
29 #set $rod_bind_name = $rod_binding.rod_bind_type.rod_bind_type_selector
30 #end if
31 #set $rod_binding_names[$rod_bind_name] = $rod_binding_names.get( $rod_bind_name, -1 ) + 1
32 -d "-B:${rod_bind_name},%(file_type)s" "${rod_binding.rod_bind_type.input_rod}" "${rod_binding.rod_bind_type.input_rod.ext}" "input_${rod_bind_name}_${rod_binding_names[$rod_bind_name]}"
33 #if str( $rod_binding.rod_bind_type.rodToIntervalTrackName ):
34 -p '--rodToIntervalTrackName "${rod_bind_name}"'
35 #end if
36 #end for
37
38 ##start standard gatk options
39 #if $gatk_param_type.gatk_param_type_selector == "advanced":
40 #for $sample_metadata in $gatk_param_type.sample_metadata:
41 -p '--sample_metadata "${sample_metadata.sample_metadata_file}"'
42 #end for
43 #for $read_filter in $gatk_param_type.read_filter:
44 -p '--read_filter "${read_filter.read_filter_type.read_filter_type_selector}"
45 ###raise Exception( str( dir( $read_filter ) ) )
46 #for $name, $param in $read_filter.read_filter_type.iteritems():
47 #if $name not in [ "__current_case__", "read_filter_type_selector" ]:
48 --${name} "${param}"
49 #end if
50 #end for
51 '
52 #end for
53 #if str( $gatk_param_type.input_intervals ) != "None":
54 -d "-L" "${gatk_param_type.input_intervals}" "${gatk_param_type.input_intervals.ext}" "input_intervals"
55 #end if
56 #if str( $gatk_param_type.input_exclude_intervals ) != "None":
57 -d "-XL" "${gatk_param_type.input_exclude_intervals}" "${gatk_param_type.input_exclude_intervals.ext}" "input_intervals"
58 #end if
59
60 -p '--BTI_merge_rule "${gatk_param_type.BTI_merge_rule}"'
61
62 -p '--downsampling_type "${gatk_param_type.downsampling_type.downsampling_type_selector}"'
63 #if str( $gatk_param_type.downsampling_type.downsampling_type_selector ) != "NONE":
64 -p '--${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_type_selector} "${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_value}"'
65 #end if
66 -p '
67 --baq "${gatk_param_type.baq}"
68 --baqGapOpenPenalty "${gatk_param_type.baq_gap_open_penalty}"
69 ${gatk_param_type.use_original_qualities}
70 --defaultBaseQualities "${gatk_param_type.default_base_qualities}"
71 --validation_strictness "${gatk_param_type.validation_strictness}"
72 --interval_merging "${gatk_param_type.interval_merging}"
73 '
74 #if str( $gatk_param_type.read_group_black_list ) != "None":
75 -d "-read_group_black_list" "${gatk_param_type.read_group_black_list}" "txt" "input_read_group_black_list"
76 #end if
77 #end if
78 #if $reference_source.reference_source_selector == "history":
79 -d "-R" "${reference_source.ref_file}" "${reference_source.ref_file.ext}" "gatk_input"
80 #end if
81 ##end standard gatk options
82 ##start analysis specific options
83 #if $analysis_param_type.analysis_param_type_selector == "advanced":
84 -p '
85 --genotype_likelihoods_model "${analysis_param_type.genotype_likelihoods_model}"
86 --p_nonref_model "${analysis_param_type.p_nonref_model}"
87 --heterozygosity "${analysis_param_type.heterozygosity}"
88 --pcr_error_rate "${analysis_param_type.pcr_error_rate}"
89 --genotyping_mode "${analysis_param_type.genotyping_mode}"
90 --output_mode "${analysis_param_type.output_mode}"
91 ${analysis_param_type.noSLOD}
92 --min_base_quality_score "${analysis_param_type.min_base_quality_score}"
93 --min_mapping_quality_score "${analysis_param_type.min_mapping_quality_score}"
94 --max_deletion_fraction "${analysis_param_type.max_deletion_fraction}"
95 --min_indel_count_for_genotyping "${analysis_param_type.min_indel_count_for_genotyping}"
96 --indel_heterozygosity "${analysis_param_type.indel_heterozygosity}"
97 --indelGapContinuationPenalty "${analysis_param_type.indelGapContinuationPenalty}"
98 --indelGapOpenPenalty "${analysis_param_type.indelGapOpenPenalty}"
99 --indelHaplotypeSize "${analysis_param_type.indelHaplotypeSize}"
100 ${analysis_param_type.doContextDependentGapPenalties}
101 #if $analysis_param_type.annotation.value:
102 #for $annotation in $analysis_param_type.annotation.value:
103 --annotation "${annotation}"
104 #end for
105 #end if
106 #if $analysis_param_type.group.value:
107 #for $group in $analysis_param_type.group.value:
108 --group "${group}"
109 #end for
110 #end if
111 '
112 #end if
113 </command>
114 <inputs>
115 <conditional name="reference_source">
116 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
117 <option value="cached">Locally cached</option>
118 <option value="history">History</option>
119 </param>
120 <when value="cached">
121 <repeat name="input_bams" title="Sample BAM file" min="1">
122 <param name="input_bam" type="data" format="bam" label="BAM file">
123 <validator type="unspecified_build" />
124 <validator type="dataset_metadata_in_file" filename="picard_index.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." /> <!-- fixme!!! this needs to be a select -->
125 </param>
126 </repeat>
127 <param name="ref_file" type="select" label="Using reference genome">
128 <options from_data_table="picard_indexes">
129 <!-- <filter type="data_meta" key="dbkey" ref="input_bam" column="dbkey"/> does not yet work in a repeat...-->
130 </options>
131 </param>
132 </when>
133 <when value="history"> <!-- FIX ME!!!! -->
134 <repeat name="input_bams" title="Sample BAM file" min="1">
135 <param name="input_bam" type="data" format="bam" label="BAM file" />
136 </repeat>
137 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
138 </when>
139 </conditional>
140
141 <param name="input_dbsnp_rod" type="data" format="gatk_dbsnp" optional="True" label="dbSNP reference ordered data (ROD)" />
142 <repeat name="rod_bind" title="Binding for reference-ordered data">
143 <conditional name="rod_bind_type">
144 <param name="rod_bind_type_selector" type="select" label="Binding Type">
145 <option value="snps" selected="True">SNPs</option>
146 <option value="indels">INDELs</option>
147 <option value="custom">Custom</option>
148 </param>
149 <when value="snps">
150 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
151 <param name="rodToIntervalTrackName" type="boolean" truevalue="--rodToIntervalTrackName" falsevalue="" label="Use ROD as interval List (-BTI, --rodToIntervalTrackName)" help="Only one ROD may have this option specified" />
152 </when>
153 <when value="indels">
154 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
155 <param name="rodToIntervalTrackName" type="boolean" truevalue="--rodToIntervalTrackName" falsevalue="" label="Use ROD as interval List (-BTI, --rodToIntervalTrackName)" help="Only one ROD may have this option specified" />
156 </when>
157 <when value="custom">
158 <param name="custom_rod_name" type="text" value="Unknown" label="ROD Name"/>
159 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
160 <param name="rodToIntervalTrackName" type="boolean" truevalue="--rodToIntervalTrackName" falsevalue="" label="Use ROD as interval List (-BTI, --rodToIntervalTrackName)" help="Only one ROD may have this option specified" />
161 </when>
162 </conditional>
163 </repeat>
164
165 <param name="standard_min_confidence_threshold_for_calling" type="float" value="30.0" label="The minimum phred-scaled confidence threshold at which variants not at 'trigger' track sites should be called" />
166 <param name="standard_min_confidence_threshold_for_emitting" type="float" value="30.0" label="The minimum phred-scaled confidence threshold at which variants not at 'trigger' track sites should be emitted (and filtered if less than the calling threshold)" />
167
168
169 <conditional name="gatk_param_type">
170 <param name="gatk_param_type_selector" type="select" label="Basic or Advanced GATK options">
171 <option value="basic" selected="True">Basic</option>
172 <option value="advanced">Advanced</option>
173 </param>
174 <when value="basic">
175 <!-- Do nothing here -->
176 </when>
177 <when value="advanced">
178 <repeat name="sample_metadata" title="Sample Metadata">
179 <param name="sample_metadata_file" type="data" format="txt" label="Sample file(s) in JSON format" />
180 </repeat>
181 <repeat name="read_filter" title="Read Filter">
182 <conditional name="read_filter_type">
183 <param name="read_filter_type_selector" type="select" label="Read Filter Type">
184 <option value="MaxReadLength" selected="True">MaxReadLength</option>
185 <option value="ZeroMappingQualityRead">ZeroMappingQualityRead</option>
186 </param>
187 <when value="ZeroMappingQualityRead">
188 <!-- no extra options -->
189 </when>
190 <when value="MaxReadLength">
191 <param name="maxReadLength" type="integer" value="76" label="Max Read Length"/>
192 </when>
193 </conditional>
194 </repeat>
195 <param name="input_intervals" type="data" format="picard_interval_list" optional="True" label="A list of genomic intervals over which to operate" />
196 <param name="input_exclude_intervals" type="data" format="picard_interval_list" optional="True" label="A list of genomic intervals to exclude from processing" />
197
198 <param name="BTI_merge_rule" type="select" label="BTI merge rule">
199 <option value="UNION" selected="True">UNION</option>
200 <option value="INTERSECTION">INTERSECTION</option>
201 </param>
202
203 <conditional name="downsampling_type">
204 <param name="downsampling_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
205 <option value="NONE" selected="True">NONE</option>
206 <option value="ALL_READS">ALL_READS</option>
207 <option value="BY_SAMPLE">BY_SAMPLE</option>
208 </param>
209 <when value="NONE">
210 <!-- no more options here -->
211 </when>
212 <when value="ALL_READS">
213 <conditional name="downsample_to_type">
214 <param name="downsample_to_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
215 <option value="downsample_to_fraction" selected="True">Downsample by Fraction</option>
216 <option value="downsample_to_coverage">Downsample by Coverage</option>
217 </param>
218 <when value="downsample_to_fraction">
219 <param name="downsample_to_value" type="float" label="Fraction [0.0-1.0] of reads to downsample to" value="0.1"/>
220 </when>
221 <when value="downsample_to_coverage">
222 <param name="downsample_to_value" type="integer" label="Coverage to downsample to at any given locus" value="0"/>
223 </when>
224 </conditional>
225 </when>
226 <when value="BY_SAMPLE">
227 <conditional name="downsample_to_type">
228 <param name="downsample_to_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
229 <option value="downsample_to_fraction" selected="True">Downsample by Fraction</option>
230 <option value="downsample_to_coverage">Downsample by Coverage</option>
231 </param>
232 <when value="downsample_to_fraction">
233 <param name="downsample_to_value" type="float" label="Fraction [0.0-1.0] of reads to downsample to" value="0.1"/>
234 </when>
235 <when value="downsample_to_coverage">
236 <param name="downsample_to_value" type="integer" label="Coverage to downsample to at any given locus" value="0"/>
237 </when>
238 </conditional>
239 </when>
240 </conditional>
241 <param name="baq" type="select" label="Type of BAQ calculation to apply in the engine">
242 <option value="OFF" selected="True">OFF</option>
243 <option value="CALCULATE_AS_NECESSARY">CALCULATE_AS_NECESSARY</option>
244 <option value="RECALCULATE">RECALCULATE</option>
245 </param>
246 <param name="baq_gap_open_penalty" type="integer" label="BAQ gap open penalty (Phred Scaled)" value="40" help="Default value is 40. 30 is perhaps better for whole genome call sets."/>
247 <param name="use_original_qualities" type="boolean" truevalue="--useOriginalQualities" falsevalue="" label="Use the original base quality scores from the OQ tag" />
248 <param name="default_base_qualities" type="integer" label="Value to be used for all base quality scores, when some are missing" value="-1"/>
249 <param name="validation_strictness" type="select" label="How strict should we be with validation">
250 <option value="STRICT" selected="True">STRICT</option>
251 <option value="LENIENT">LENIENT</option>
252 <option value="SILENT">SILENT</option>
253 </param>
254 <param name="interval_merging" type="select" label="Interval merging rule">
255 <option value="ALL" selected="True">ALL</option>
256 <option value="OVERLAPPING_ONLY">OVERLAPPING_ONLY</option>
257 </param>
258 <param name="read_group_black_list" type="data" format="txt" optional="True" label="Read group black list" />
259 </when>
260 </conditional>
261
262 <conditional name="analysis_param_type">
263 <param name="analysis_param_type_selector" type="select" label="Basic or Advanced Analysis options">
264 <option value="basic" selected="True">Basic</option>
265 <option value="advanced">Advanced</option>
266 </param>
267 <when value="basic">
268 <!-- Do nothing here -->
269 </when>
270 <when value="advanced">
271 <param name="genotype_likelihoods_model" type="select" label="Genotype likelihoods calculation model to employ">
272 <option value="BOTH" selected="True">BOTH</option>
273 <option value="SNP">SNP</option>
274 <option value="INDEL">INDEL</option>
275 </param>
276 <param name="p_nonref_model" type="select" label="Non-reference probability calculation model to employ">
277 <option value="EXACT" selected="True">EXACT</option>
278 <option value="GRID_SEARCH">GRID_SEARCH</option>
279 </param>
280 <param name="heterozygosity" type="float" value="1e-3" label="Heterozygosity value used to compute prior likelihoods for any locus" />
281 <param name="pcr_error_rate" type="float" value="1e-4" label="The PCR error rate to be used for computing fragment-based likelihoods" />
282 <param name="genotyping_mode" type="select" label="How to determine the alternate allele to use for genotyping">
283 <option value="DISCOVERY" selected="True">DISCOVERY</option>
284 <option value="GENOTYPE_GIVEN_ALLELES">GENOTYPE_GIVEN_ALLELES</option>
285 </param>
286 <param name="output_mode" type="select" label="Should we output confident genotypes (i.e. including ref calls) or just the variants?">
287 <option value="EMIT_VARIANTS_ONLY" selected="True">EMIT_VARIANTS_ONLY</option>
288 <option value="EMIT_ALL_CONFIDENT_SITES">EMIT_ALL_CONFIDENT_SITES</option>
289 <option value="EMIT_ALL_SITES">EMIT_ALL_SITES</option>
290 </param>
291 <param name="noSLOD" type="boolean" truevalue="--noSLOD" falsevalue="" label="Do not calculate the SLOD" />
292 <param name="min_base_quality_score" type="integer" value="17" label="Minimum base quality required to consider a base for calling" />
293 <param name="min_mapping_quality_score" type="integer" value="20" label="Minimum read mapping quality required to consider a read for calling" />
294 <param name="max_deletion_fraction" type="float" value="0.05" label="Maximum fraction of reads with deletions spanning this locus for it to be callable" help="to disable, set to &lt; 0 or &gt; 1" />
295 <param name="min_indel_count_for_genotyping" type="integer" value="5" label="Minimum number of consensus indels required to trigger genotyping run" />
296 <param name="indel_heterozygosity" type="float" value="0.000125" label="Heterozygosity for indel calling" help="1.0/8000==0.000125"/>
297 <param name="indelGapContinuationPenalty" type="float" value="10.0" label="Indel gap continuation penalty" />
298 <param name="indelGapOpenPenalty" type="float" value="45.0" label="Indel gap open penalty" />
299 <param name="indelHaplotypeSize" type="integer" value="80" label="Indel haplotype size" />
300 <param name="doContextDependentGapPenalties" type="boolean" truevalue="--doContextDependentGapPenalties" falsevalue="" label="Vary gap penalties by context" />
301 <param name="annotation" type="select" multiple="True" display="checkboxes" label="Annotation Types">
302 <option value="AlleleBalance">AlleleBalance</option>
303 <option value="BaseQualityRankSumTest">BaseQualityRankSumTest</option>
304 <option value="DepthOfCoverage">DepthOfCoverage</option>
305 <option value="HomopolymerRun">HomopolymerRun</option>
306 <option value="MappingQualityRankSumTest">MappingQualityRankSumTest</option>
307 <option value="MappingQualityZero">MappingQualityZero</option>
308 <option value="QualByDepth">QualByDepth</option>
309 <option value="RMSMappingQuality">RMSMappingQuality</option>
310 <option value="SpanningDeletions">SpanningDeletions</option>
311 <option value="HaplotypeScore">HaplotypeScore</option>
312 </param>
313 <param name="group" type="select" multiple="True" display="checkboxes" label="Annotation Interfaces/Groups">
314 <option value="Standard">Standard</option>
315 <option value="Experimental">Experimental</option>
316 <option value="WorkInProgress">WorkInProgress</option>
317 <!-- <option value="none">none</option> -->
318 </param>
319 </when>
320 </conditional>
321 </inputs>
322 <outputs>
323 <data format="vcf" name="output_vcf" label="${tool.name} on ${on_string} (VCF)" />
324 <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" />
325 </outputs>
326 <tests>
327 <test>
328 <param name="reference_source_selector" value="history" />
329 <param name="ref_file" value="phiX.fasta" ftype="fasta" />
330 <param name="input_bam" value="gatk/gatk_table_recalibration/gatk_table_recalibration_out_1.bam" ftype="bam" />
331 <param name="input_dbsnp_rod" />
332 <param name="rod_bind_type_selector" value="snps" />
333 <param name="input_rod" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
334 <param name="rodToIntervalTrackName" />
335 <param name="standard_min_confidence_threshold_for_calling" value="4" />
336 <param name="standard_min_confidence_threshold_for_emitting" value="4" />
337 <param name="gatk_param_type_selector" value="basic" />
338 <param name="analysis_param_type_selector" value="advanced" />
339 <param name="genotype_likelihoods_model" value="BOTH" />
340 <param name="p_nonref_model" value="EXACT" />
341 <param name="heterozygosity" value="0.001" />
342 <param name="pcr_error_rate" value="0.0001" />
343 <param name="genotyping_mode" value="DISCOVERY" />
344 <param name="output_mode" value="EMIT_ALL_CONFIDENT_SITES" />
345 <param name="noSLOD" />
346 <param name="min_base_quality_score" value="17" />
347 <param name="min_mapping_quality_score" value="20" />
348 <param name="max_deletion_fraction" value="-1" />
349 <param name="min_indel_count_for_genotyping" value="2" />
350 <param name="indel_heterozygosity" value="0.000125" />
351 <param name="indelGapContinuationPenalty" value="10" />
352 <param name="indelGapOpenPenalty" value="3" />
353 <param name="indelHaplotypeSize" value="80" />
354 <param name="doContextDependentGapPenalties" />
355 <!-- <param name="annotation" value="" />
356 <param name="group" value="" /> -->
357 <output name="output_interval" file="gatk/gatk_unified_genotyper/gatk_unified_genotyper_out_1.vcf" lines_diff="2"/>
358 <output name="output_log" file="gatk/gatk_unified_genotyper/gatk_unified_genotyper_out_1.log.contains" compare="contains"/>
359 </test>
360 </tests>
361 <help>
362 **What it does**
363
364 A variant caller which unifies the approaches of several disparate callers. Works for single-sample and
365 multi-sample data. The user can choose from several different incorporated calculation models.
366
367 ------
368
369 Please cite the website "http://addlink.here" as well as:
370
371 Add citation here 2011.
372
373 ------
374
375 **Input formats**
376
377 GenomeAnalysisTK: UnifiedGenotyper accepts an aligned BAM input file.
378
379 ------
380
381 **Outputs**
382
383 The output is in VCF format, see http://addlink.here for more details.
384
385 -------
386
387 **Settings**::
388
389 genotype_likelihoods_model Genotype likelihoods calculation model to employ -- BOTH is the default option, while INDEL is also available for calling indels and SNP is available for calling SNPs only (SNP|INDEL|BOTH)
390 p_nonref_model Non-reference probability calculation model to employ -- EXACT is the default option, while GRID_SEARCH is also available. (EXACT|GRID_SEARCH)
391 heterozygosity Heterozygosity value used to compute prior likelihoods for any locus
392 pcr_error_rate The PCR error rate to be used for computing fragment-based likelihoods
393 genotyping_mode Should we output confident genotypes (i.e. including ref calls) or just the variants? (DISCOVERY|GENOTYPE_GIVEN_ALLELES)
394 output_mode Should we output confident genotypes (i.e. including ref calls) or just the variants? (EMIT_VARIANTS_ONLY|EMIT_ALL_CONFIDENT_SITES|EMIT_ALL_SITES)
395 standard_min_confidence_threshold_for_calling The minimum phred-scaled confidence threshold at which variants not at 'trigger' track sites should be called
396 standard_min_confidence_threshold_for_emitting The minimum phred-scaled confidence threshold at which variants not at 'trigger' track sites should be emitted (and filtered if less than the calling threshold)
397 noSLOD If provided, we will not calculate the SLOD
398 min_base_quality_score Minimum base quality required to consider a base for calling
399 min_mapping_quality_score Minimum read mapping quality required to consider a read for calling
400 max_deletion_fraction Maximum fraction of reads with deletions spanning this locus for it to be callable [to disable, set to &lt; 0 or &gt; 1; default:0.05]
401 min_indel_count_for_genotyping Minimum number of consensus indels required to trigger genotyping run
402 indel_heterozygosity Heterozygosity for indel calling
403 indelGapContinuationPenalty Indel gap continuation penalty
404 indelGapOpenPenalty Indel gap open penalty
405 indelHaplotypeSize Indel haplotype size
406 doContextDependentGapPenalties Vary gap penalties by context
407 indel_recal_file Filename for the input covariates table recalibration .csv file - EXPERIMENTAL, DO NO USE
408 indelDebug Output indel debug info
409 out File to which variants should be written
410 annotation One or more specific annotations to apply to variant calls
411 group One or more classes/groups of annotations to apply to variant calls
412
413 </help>
414 </tool>