comparison tools/gatk/indel_realigner.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_indel_realigner" name="Indel Realigner" version="0.0.1">
2 <description>- perform local realignment</description>
3 <command interpreter="python">gatk_wrapper.py
4 --stdout "${output_log}"
5 -d "-I" "${reference_source.input_bam}" "${reference_source.input_bam.ext}" "gatk_input"
6 -d "" "${reference_source.input_bam.metadata.bam_index}" "bam_index" "gatk_input" ##hardcode galaxy ext type as bam_index
7 -p 'java
8 -jar "${GALAXY_DATA_INDEX_DIR}/shared/jars/gatk/GenomeAnalysisTK.jar"
9 -T "IndelRealigner"
10 ##-quiet ##this appears to have no effect...confirmed by gatk programmers
11 -o "${output_bam}"
12 -et "NO_ET" ##ET no phone home
13 ##-log "${output_log}" ##don't use this to log to file, instead directly capture stdout
14 #if $reference_source.reference_source_selector != "history":
15 -R "${reference_source.ref_file.fields.path}"
16 #end if
17 -LOD "${lod_threshold}"
18 ${knowns_only}
19 '
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 -p '--BTI_merge_rule "${gatk_param_type.BTI_merge_rule}"'
60 -p '--downsampling_type "${gatk_param_type.downsampling_type.downsampling_type_selector}"'
61 #if str( $gatk_param_type.downsampling_type.downsampling_type_selector ) != "NONE":
62 -p '--${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_type_selector} "${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_value}"'
63 #end if
64 -p '
65 --baq "${gatk_param_type.baq}"
66 --baqGapOpenPenalty "${gatk_param_type.baq_gap_open_penalty}"
67 ${gatk_param_type.use_original_qualities}
68 --defaultBaseQualities "${gatk_param_type.default_base_qualities}"
69 --validation_strictness "${gatk_param_type.validation_strictness}"
70 --interval_merging "${gatk_param_type.interval_merging}"
71 '
72 #if str( $gatk_param_type.read_group_black_list ) != "None":
73 -d "-read_group_black_list" "${gatk_param_type.read_group_black_list}" "txt" "input_read_group_black_list"
74 #end if
75 #end if
76 #if $reference_source.reference_source_selector == "history":
77 -d "-R" "${reference_source.ref_file}" "${reference_source.ref_file.ext}" "gatk_input"
78 #end if
79 ##end standard gatk options
80 ##start analysis specific options
81 -d "-targetIntervals" "${target_intervals}" "${target_intervals.ext}" "gatk_target_intervals"
82 -p '
83 -targetNotSorted ##always resort input intervals
84 --disable_bam_indexing
85 '
86 #if $analysis_param_type.analysis_param_type_selector == "advanced":
87 -p '
88 --entropyThreshold "${analysis_param_type.entropy_threshold}"
89 ${analysis_param_type.simplify_bam}
90 --maxIsizeForMovement "${analysis_param_type.max_insert_size_for_movement}"
91 --maxPositionalMoveAllowed "${analysis_param_type.max_positional_move_allowed}"
92 --maxConsensuses "${analysis_param_type.max_consensuses}"
93 --maxReadsForConsensuses "${analysis_param_type.max_reads_for_consensuses}"
94 --maxReadsForRealignment "${analysis_param_type.max_reads_for_realignment}"
95 "${analysis_param_type.no_original_alignment_tags}"
96 '
97 #end if
98 </command>
99 <inputs>
100
101 <conditional name="reference_source">
102 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
103 <option value="cached">Locally cached</option>
104 <option value="history">History</option>
105 </param>
106 <when value="cached">
107 <param name="input_bam" type="data" format="bam" label="BAM file">
108 <validator type="unspecified_build" />
109 <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 -->
110 </param>
111 <param name="ref_file" type="select" label="Using reference genome">
112 <options from_data_table="picard_indexes">
113 <filter type="data_meta" key="dbkey" ref="input_bam" column="dbkey"/>
114 </options>
115 </param>
116 </when>
117 <when value="history"> <!-- FIX ME!!!! -->
118 <param name="input_bam" type="data" format="bam" label="BAM file" />
119 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
120 </when>
121 </conditional>
122 <param name="target_intervals" type="data" format="gatk_interval,bed,picard_interval_list" label="Restrict realignment to provided intervals" />
123 <param name="input_dbsnp_rod" type="data" format="gatk_dbsnp" optional="True" label="dbSNP reference ordered data (ROD)" />
124 <repeat name="rod_bind" title="Binding for reference-ordered data">
125 <conditional name="rod_bind_type">
126 <param name="rod_bind_type_selector" type="select" label="Binding Type">
127 <option value="snps" selected="True">SNPs</option>
128 <option value="indels">INDELs</option>
129 <option value="custom">Custom</option>
130 </param>
131 <when value="snps">
132 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
133 <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" />
134 </when>
135 <when value="indels">
136 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
137 <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" />
138 </when>
139 <when value="custom">
140 <param name="custom_rod_name" type="text" value="Unknown" label="ROD Name"/>
141 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
142 <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" />
143 </when>
144 </conditional>
145 </repeat>
146 <param name="lod_threshold" type="float" value="5.0" label="LOD threshold above which the realigner will proceed to realign" />
147 <param name="knowns_only" type="boolean" checked="False" truevalue="-knownsOnly" falsevalue="" label="Use only known indels provided as RODs"/>
148
149 <conditional name="gatk_param_type">
150 <param name="gatk_param_type_selector" type="select" label="Basic or Advanced GATK options">
151 <option value="basic" selected="True">Basic</option>
152 <option value="advanced">Advanced</option>
153 </param>
154 <when value="basic">
155 <!-- Do nothing here -->
156 </when>
157 <when value="advanced">
158 <repeat name="sample_metadata" title="Sample Metadata">
159 <param name="sample_metadata_file" type="data" format="txt" label="Sample file(s) in JSON format" />
160 </repeat>
161 <repeat name="read_filter" title="Read Filter">
162 <conditional name="read_filter_type">
163 <param name="read_filter_type_selector" type="select" label="Read Filter Type">
164 <option value="MaxReadLength" selected="True">MaxReadLength</option>
165 <option value="ZeroMappingQualityRead">ZeroMappingQualityRead</option>
166 </param>
167 <when value="ZeroMappingQualityRead">
168 <!-- no extra options -->
169 </when>
170 <when value="MaxReadLength">
171 <param name="maxReadLength" type="integer" value="76" label="Max Read Length"/>
172 </when>
173 </conditional>
174 </repeat>
175 <param name="input_intervals" type="data" format="picard_interval_list" optional="True" label="A list of genomic intervals over which to operate" />
176 <param name="input_exclude_intervals" type="data" format="picard_interval_list" optional="True" label="A list of genomic intervals to exclude from processing" />
177 <param name="BTI_merge_rule" type="select" label="BTI merge rule">
178 <option value="UNION" selected="True">UNION</option>
179 <option value="INTERSECTION">INTERSECTION</option>
180 </param>
181 <conditional name="downsampling_type">
182 <param name="downsampling_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
183 <option value="NONE" selected="True">NONE</option>
184 <option value="ALL_READS">ALL_READS</option>
185 <option value="BY_SAMPLE">BY_SAMPLE</option>
186 </param>
187 <when value="NONE">
188 <!-- no more options here -->
189 </when>
190 <when value="ALL_READS">
191 <conditional name="downsample_to_type">
192 <param name="downsample_to_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
193 <option value="downsample_to_fraction" selected="True">Downsample by Fraction</option>
194 <option value="downsample_to_coverage">Downsample by Coverage</option>
195 </param>
196 <when value="downsample_to_fraction">
197 <param name="downsample_to_value" type="float" label="Fraction [0.0-1.0] of reads to downsample to" value="0.1"/>
198 </when>
199 <when value="downsample_to_coverage">
200 <param name="downsample_to_value" type="integer" label="Coverage to downsample to at any given locus" value="0"/>
201 </when>
202 </conditional>
203 </when>
204 <when value="BY_SAMPLE">
205 <conditional name="downsample_to_type">
206 <param name="downsample_to_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
207 <option value="downsample_to_fraction" selected="True">Downsample by Fraction</option>
208 <option value="downsample_to_coverage">Downsample by Coverage</option>
209 </param>
210 <when value="downsample_to_fraction">
211 <param name="downsample_to_value" type="float" label="Fraction [0.0-1.0] of reads to downsample to" value="0.1"/>
212 </when>
213 <when value="downsample_to_coverage">
214 <param name="downsample_to_value" type="integer" label="Coverage to downsample to at any given locus" value="0"/>
215 </when>
216 </conditional>
217 </when>
218 </conditional>
219 <param name="baq" type="select" label="Type of BAQ calculation to apply in the engine">
220 <option value="OFF" selected="True">OFF</option>
221 <option value="CALCULATE_AS_NECESSARY">CALCULATE_AS_NECESSARY</option>
222 <option value="RECALCULATE">RECALCULATE</option>
223 </param>
224 <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."/>
225 <param name="use_original_qualities" type="boolean" truevalue="--useOriginalQualities" falsevalue="" label="Use the original base quality scores from the OQ tag" />
226 <param name="default_base_qualities" type="integer" label="Value to be used for all base quality scores, when some are missing" value="-1"/>
227 <param name="validation_strictness" type="select" label="How strict should we be with validation">
228 <option value="STRICT" selected="True">STRICT</option>
229 <option value="LENIENT">LENIENT</option>
230 <option value="SILENT">SILENT</option>
231 </param>
232 <param name="interval_merging" type="select" label="Interval merging rule">
233 <option value="ALL" selected="True">ALL</option>
234 <option value="OVERLAPPING_ONLY">OVERLAPPING_ONLY</option>
235 </param>
236 <param name="read_group_black_list" type="data" format="txt" optional="True" label="Read group black list" />
237 </when>
238 </conditional>
239
240 <conditional name="analysis_param_type">
241 <param name="analysis_param_type_selector" type="select" label="Basic or Advanced Analysis options">
242 <option value="basic" selected="True">Basic</option>
243 <option value="advanced">Advanced</option>
244 </param>
245 <when value="basic">
246 <!-- Do nothing here -->
247 </when>
248 <when value="advanced">
249
250 <param name="entropy_threshold" type="float" value="0.15" label="percentage of mismatching base quality scores at a position to be considered having high entropy" />
251 <param name="simplify_bam" type="boolean" checked="False" truevalue="-simplifyBAM" falsevalue="" label="Simplify BAM"/>
252
253 <param name="max_insert_size_for_movement" type="integer" value="3000" label="Maximum insert size of read pairs that we attempt to realign" />
254 <param name="max_positional_move_allowed" type="integer" value="200" label="Maximum positional move in basepairs that a read can be adjusted during realignment" />
255 <param name="max_consensuses" type="integer" value="30" label="Max alternate consensuses to try" />
256 <param name="max_reads_for_consensuses" type="integer" value="120" label="Max reads (chosen randomly) used for finding the potential alternate consensuses" />
257 <param name="max_reads_for_realignment" type="integer" value="20000" label="Max reads allowed at an interval for realignment" />
258 <param name="no_original_alignment_tags" type="boolean" checked="False" truevalue="--noOriginalAlignmentTags" falsevalue="" label="Don't output the original cigar or alignment start tags for each realigned read in the output bam"/>
259 </when>
260 </conditional>
261 </inputs>
262 <outputs>
263 <data format="bam" name="output_bam" label="${tool.name} on ${on_string} (BAM)" />
264 <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" />
265 </outputs>
266 <tests>
267 <test>
268 <param name="reference_source_selector" value="history" />
269 <param name="ref_file" value="phiX.fasta" ftype="fasta" />
270 <param name="target_intervals" value="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.gatk_interval" ftype="gatk_interval" />
271 <param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" />
272 <param name="input_dbsnp_rod" />
273 <param name="rod_bind_type_selector" value="snps" />
274 <param name="rodToIntervalTrackName" />
275 <param name="input_rod" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
276 <param name="lod_threshold" value="5.0" />
277 <param name="knowns_only" />
278 <param name="gatk_param_type_selector" value="basic" />
279 <param name="analysis_param_type_selector" value="basic" />
280 <output name="output_bam" file="gatk/gatk_indel_realigner/gatk_indel_realigner_out_1.bam" ftype="bam" lines_diff="2" />
281 <output name="output_log" file="gatk/gatk_indel_realigner/gatk_indel_realigner_out_1.log.contains" compare="contains" />
282 </test>
283 </tests>
284 <help>
285 **What it does**
286
287 Performs local realignment of reads based on misalignments due to the presence of indels. Unlike most mappers, this
288 walker uses the full alignment context to determine whether an appropriate alternate reference (i.e. indel) exists
289 and updates SAMRecords accordingly.
290
291 ------
292
293 Please cite the website "http://addlink.here" as well as:
294
295 Add citation here 2011.
296
297 ------
298
299 **Input formats**
300
301 GenomeAnalysisTK: IndelRealigner accepts an aligned BAM and a list of intervals to realign as input files.
302
303 ------
304
305 **Outputs**
306
307 The output is in the BAM format, see http://addlink.here for more details.
308
309 -------
310
311 **Settings**::
312
313 targetIntervals intervals file output from RealignerTargetCreator
314 LODThresholdForCleaning LOD threshold above which the cleaner will clean
315 entropyThreshold percentage of mismatches at a locus to be considered having high entropy
316 out Output bam
317 bam_compression Compression level to use for writing BAM files
318 disable_bam_indexing Turn off on-the-fly creation of indices for output BAM files.
319 simplifyBAM If provided, output BAM files will be simplified to include just key reads for downstream variation discovery analyses (removing duplicates, PF-, non-primary reads), as well stripping all extended tags from the kept reads except the read group identifier
320 useOnlyKnownIndels Don't run 'Smith-Waterman' to generate alternate consenses; use only known indels provided as RODs for constructing the alternate references.
321 maxReadsInMemory max reads allowed to be kept in memory at a time by the SAMFileWriter. Keep it low to minimize memory consumption (but the tool may skip realignment on regions with too much coverage. If it is too low, it may generate errors during realignment); keep it high to maximize realignment (but make sure to give Java enough memory).
322 maxIsizeForMovement maximum insert size of read pairs that we attempt to realign
323 maxPositionalMoveAllowed maximum positional move in basepairs that a read can be adjusted during realignment
324 maxConsensuses max alternate consensuses to try (necessary to improve performance in deep coverage)
325 maxReadsForConsensuses max reads used for finding the alternate consensuses (necessary to improve performance in deep coverage)
326 maxReadsForRealignment max reads allowed at an interval for realignment; if this value is exceeded, realignment is not attempted and the reads are passed to the output file(s) as-is
327 noOriginalAlignmentTags Don't output the original cigar or alignment start tags for each realigned read in the output bam.
328 targetIntervalsAreNotSorted This tool assumes that the target interval list is sorted; if the list turns out to be unsorted, it will throw an exception. Use this argument when your interval list is not sorted to instruct the Realigner to first sort it in memory.
329
330
331 </help>
332 </tool>