0
|
1 <tool id="gatk_realigner_target_creator" name="Realigner Target Creator" version="0.0.1">
|
|
2 <description>for use in 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 "RealignerTargetCreator"
|
|
10 -o "${output_interval}"
|
|
11 -et "NO_ET" ##ET no phone home
|
|
12 ##-log "${output_log}" ##don't use this to log to file, instead directly capture stdout
|
|
13 #if $reference_source.reference_source_selector != "history":
|
|
14 -R "${reference_source.ref_file.fields.path}"
|
|
15 #end if
|
|
16 '
|
|
17 #set $rod_binding_names = dict()
|
|
18 #if str( $input_dbsnp_rod ) != "None":
|
|
19 -d "-D" "${input_dbsnp_rod}" "${input_dbsnp_rod.ext}" "dbsnp_rod"
|
|
20 #end if
|
|
21 #for $rod_binding in $rod_bind:
|
|
22 #if str( $rod_binding.rod_bind_type.rod_bind_type_selector ) == 'custom':
|
|
23 #set $rod_bind_name = $rod_binding.rod_bind_type.custom_rod_name
|
|
24 #else
|
|
25 #set $rod_bind_name = $rod_binding.rod_bind_type.rod_bind_type_selector
|
|
26 #end if
|
|
27 #set $rod_binding_names[$rod_bind_name] = $rod_binding_names.get( $rod_bind_name, -1 ) + 1
|
|
28 -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]}"
|
|
29 #if str( $rod_binding.rod_bind_type.rodToIntervalTrackName ):
|
|
30 -p '--rodToIntervalTrackName "${rod_bind_name}"'
|
|
31 #end if
|
|
32 #end for
|
|
33
|
|
34 ##start standard gatk options
|
|
35 #if $gatk_param_type.gatk_param_type_selector == "advanced":
|
|
36 #for $sample_metadata in $gatk_param_type.sample_metadata:
|
|
37 -p '--sample_metadata "${sample_metadata.sample_metadata_file}"'
|
|
38 #end for
|
|
39 #for $read_filter in $gatk_param_type.read_filter:
|
|
40 -p '--read_filter "${read_filter.read_filter_type.read_filter_type_selector}"
|
|
41 ###raise Exception( str( dir( $read_filter ) ) )
|
|
42 #for $name, $param in $read_filter.read_filter_type.iteritems():
|
|
43 #if $name not in [ "__current_case__", "read_filter_type_selector" ]:
|
|
44 --${name} "${param}"
|
|
45 #end if
|
|
46 #end for
|
|
47 '
|
|
48 #end for
|
|
49 #if str( $gatk_param_type.input_intervals ) != "None":
|
|
50 -d "-L" "${gatk_param_type.input_intervals}" "${gatk_param_type.input_intervals.ext}" "input_intervals"
|
|
51 #end if
|
|
52 #if str( $gatk_param_type.input_exclude_intervals ) != "None":
|
|
53 -d "-XL" "${gatk_param_type.input_exclude_intervals}" "${gatk_param_type.input_exclude_intervals.ext}" "input_intervals"
|
|
54 #end if
|
|
55
|
|
56 -p '--BTI_merge_rule "${gatk_param_type.BTI_merge_rule}"'
|
|
57
|
|
58 -p '--downsampling_type "${gatk_param_type.downsampling_type.downsampling_type_selector}"'
|
|
59 #if str( $gatk_param_type.downsampling_type.downsampling_type_selector ) != "NONE":
|
|
60 -p '--${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_type_selector} "${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_value}"'
|
|
61 #end if
|
|
62 -p '
|
|
63 --baq "${gatk_param_type.baq}"
|
|
64 --baqGapOpenPenalty "${gatk_param_type.baq_gap_open_penalty}"
|
|
65 ${gatk_param_type.use_original_qualities}
|
|
66 --defaultBaseQualities "${gatk_param_type.default_base_qualities}"
|
|
67 --validation_strictness "${gatk_param_type.validation_strictness}"
|
|
68 --interval_merging "${gatk_param_type.interval_merging}"
|
|
69 '
|
|
70 #if str( $gatk_param_type.read_group_black_list ) != "None":
|
|
71 -d "-read_group_black_list" "${gatk_param_type.read_group_black_list}" "txt" "input_read_group_black_list"
|
|
72 #end if
|
|
73 #end if
|
|
74 #if $reference_source.reference_source_selector == "history":
|
|
75 -d "-R" "${reference_source.ref_file}" "${reference_source.ref_file.ext}" "gatk_input"
|
|
76 #end if
|
|
77 ##end standard gatk options
|
|
78 ##start analysis specific options
|
|
79 #if $analysis_param_type.analysis_param_type_selector == "advanced":
|
|
80 -p '
|
|
81 --minReadsAtLocus "${analysis_param_type.minReadsAtLocus}"
|
|
82 --windowSize "${analysis_param_type.windowSize}"
|
|
83 --mismatchFraction "${analysis_param_type.mismatchFraction}"
|
|
84 --maxIntervalSize "${analysis_param_type.maxIntervalSize}"
|
|
85 '
|
|
86 #end if
|
|
87 </command>
|
|
88 <inputs>
|
|
89 <conditional name="reference_source">
|
|
90 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
|
|
91 <option value="cached">Locally cached</option>
|
|
92 <option value="history">History</option>
|
|
93 </param>
|
|
94 <when value="cached">
|
|
95 <param name="input_bam" type="data" format="bam" label="BAM file">
|
|
96 <validator type="unspecified_build" />
|
|
97 <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 -->
|
|
98 </param>
|
|
99 <param name="ref_file" type="select" label="Using reference genome">
|
|
100 <options from_data_table="picard_indexes">
|
|
101 <filter type="data_meta" key="dbkey" ref="input_bam" column="dbkey"/>
|
|
102 </options>
|
|
103 </param>
|
|
104 </when>
|
|
105 <when value="history"> <!-- FIX ME!!!! -->
|
|
106 <param name="input_bam" type="data" format="bam" label="BAM file" />
|
|
107 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
|
|
108 </when>
|
|
109 </conditional>
|
|
110
|
|
111 <param name="input_dbsnp_rod" type="data" format="gatk_dbsnp" optional="True" label="dbSNP reference ordered data (ROD)" />
|
|
112 <repeat name="rod_bind" title="Binding for reference-ordered data">
|
|
113 <conditional name="rod_bind_type">
|
|
114 <param name="rod_bind_type_selector" type="select" label="Binding Type">
|
|
115 <option value="snps" selected="True">SNPs</option>
|
|
116 <option value="indels">INDELs</option>
|
|
117 <option value="custom">Custom</option>
|
|
118 </param>
|
|
119 <when value="snps">
|
|
120 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
|
|
121 <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" />
|
|
122 </when>
|
|
123 <when value="indels">
|
|
124 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
|
|
125 <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" />
|
|
126 </when>
|
|
127 <when value="custom">
|
|
128 <param name="custom_rod_name" type="text" value="Unknown" label="ROD Name"/>
|
|
129 <param name="input_rod" type="data" format="vcf,gatk_dbsnp,bed" label="ROD file" />
|
|
130 <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" />
|
|
131 </when>
|
|
132 </conditional>
|
|
133 </repeat>
|
|
134
|
|
135 <conditional name="gatk_param_type">
|
|
136 <param name="gatk_param_type_selector" type="select" label="Basic or Advanced GATK options">
|
|
137 <option value="basic" selected="True">Basic</option>
|
|
138 <option value="advanced">Advanced</option>
|
|
139 </param>
|
|
140 <when value="basic">
|
|
141 <!-- Do nothing here -->
|
|
142 </when>
|
|
143 <when value="advanced">
|
|
144 <repeat name="sample_metadata" title="Sample Metadata">
|
|
145 <param name="sample_metadata_file" type="data" format="txt" label="Sample file(s) in JSON format" />
|
|
146 </repeat>
|
|
147 <repeat name="read_filter" title="Read Filter">
|
|
148 <conditional name="read_filter_type">
|
|
149 <param name="read_filter_type_selector" type="select" label="Read Filter Type">
|
|
150 <option value="MaxReadLength" selected="True">MaxReadLength</option>
|
|
151 <option value="ZeroMappingQualityRead">ZeroMappingQualityRead</option>
|
|
152 </param>
|
|
153 <when value="ZeroMappingQualityRead">
|
|
154 <!-- no extra options -->
|
|
155 </when>
|
|
156 <when value="MaxReadLength">
|
|
157 <param name="maxReadLength" type="integer" value="76" label="Max Read Length"/>
|
|
158 </when>
|
|
159 </conditional>
|
|
160 </repeat>
|
|
161 <param name="input_intervals" type="data" format="picard_interval_list" optional="True" label="A list of genomic intervals over which to operate" />
|
|
162 <param name="input_exclude_intervals" type="data" format="picard_interval_list" optional="True" label="A list of genomic intervals to exclude from processing" />
|
|
163
|
|
164 <param name="BTI_merge_rule" type="select" label="BTI merge rule">
|
|
165 <option value="UNION" selected="True">UNION</option>
|
|
166 <option value="INTERSECTION">INTERSECTION</option>
|
|
167 </param>
|
|
168
|
|
169 <conditional name="downsampling_type">
|
|
170 <param name="downsampling_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
|
|
171 <option value="NONE" selected="True">NONE</option>
|
|
172 <option value="ALL_READS">ALL_READS</option>
|
|
173 <option value="BY_SAMPLE">BY_SAMPLE</option>
|
|
174 </param>
|
|
175 <when value="NONE">
|
|
176 <!-- no more options here -->
|
|
177 </when>
|
|
178 <when value="ALL_READS">
|
|
179 <conditional name="downsample_to_type">
|
|
180 <param name="downsample_to_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
|
|
181 <option value="downsample_to_fraction" selected="True">Downsample by Fraction</option>
|
|
182 <option value="downsample_to_coverage">Downsample by Coverage</option>
|
|
183 </param>
|
|
184 <when value="downsample_to_fraction">
|
|
185 <param name="downsample_to_value" type="float" label="Fraction [0.0-1.0] of reads to downsample to" value="0.1"/>
|
|
186 </when>
|
|
187 <when value="downsample_to_coverage">
|
|
188 <param name="downsample_to_value" type="integer" label="Coverage to downsample to at any given locus" value="0"/>
|
|
189 </when>
|
|
190 </conditional>
|
|
191 </when>
|
|
192 <when value="BY_SAMPLE">
|
|
193 <conditional name="downsample_to_type">
|
|
194 <param name="downsample_to_type_selector" type="select" label="Type of reads downsampling to employ at a given locus" help="Downsampling Type">
|
|
195 <option value="downsample_to_fraction" selected="True">Downsample by Fraction</option>
|
|
196 <option value="downsample_to_coverage">Downsample by Coverage</option>
|
|
197 </param>
|
|
198 <when value="downsample_to_fraction">
|
|
199 <param name="downsample_to_value" type="float" label="Fraction [0.0-1.0] of reads to downsample to" value="0.1"/>
|
|
200 </when>
|
|
201 <when value="downsample_to_coverage">
|
|
202 <param name="downsample_to_value" type="integer" label="Coverage to downsample to at any given locus" value="0"/>
|
|
203 </when>
|
|
204 </conditional>
|
|
205 </when>
|
|
206 </conditional>
|
|
207 <param name="baq" type="select" label="Type of BAQ calculation to apply in the engine">
|
|
208 <option value="OFF" selected="True">OFF</option>
|
|
209 <option value="CALCULATE_AS_NECESSARY">CALCULATE_AS_NECESSARY</option>
|
|
210 <option value="RECALCULATE">RECALCULATE</option>
|
|
211 </param>
|
|
212 <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."/>
|
|
213 <param name="use_original_qualities" type="boolean" truevalue="--useOriginalQualities" falsevalue="" label="Use the original base quality scores from the OQ tag" />
|
|
214 <param name="default_base_qualities" type="integer" label="Value to be used for all base quality scores, when some are missing" value="-1"/>
|
|
215 <param name="validation_strictness" type="select" label="How strict should we be with validation">
|
|
216 <option value="STRICT" selected="True">STRICT</option>
|
|
217 <option value="LENIENT">LENIENT</option>
|
|
218 <option value="SILENT">SILENT</option>
|
|
219 </param>
|
|
220 <param name="interval_merging" type="select" label="Interval merging rule">
|
|
221 <option value="ALL" selected="True">ALL</option>
|
|
222 <option value="OVERLAPPING_ONLY">OVERLAPPING_ONLY</option>
|
|
223 </param>
|
|
224 <param name="read_group_black_list" type="data" format="txt" optional="True" label="Read group black list" />
|
|
225 </when>
|
|
226 </conditional>
|
|
227
|
|
228 <conditional name="analysis_param_type">
|
|
229 <param name="analysis_param_type_selector" type="select" label="Basic or Advanced Analysis options">
|
|
230 <option value="basic" selected="True">Basic</option>
|
|
231 <option value="advanced">Advanced</option>
|
|
232 </param>
|
|
233 <when value="basic">
|
|
234 <!-- Do nothing here -->
|
|
235 </when>
|
|
236 <when value="advanced">
|
|
237 <param name="windowSize" type="integer" value="10" label="Window size for calculating entropy or SNP clusters (windowSize)" />
|
|
238 <param name="mismatchFraction" type="float" value="0.15" label="Fraction of base qualities needing to mismatch for a position to have high entropy (mismatchFraction)" help="to disable set to <= 0 or > 1"/>
|
|
239 <param name="minReadsAtLocus" type="integer" value="4" label="Minimum reads at a locus to enable using the entropy calculation (minReadsAtLocus)" />
|
|
240 <param name="maxIntervalSize" type="integer" value="500" label="Maximum interval size" />
|
|
241 </when>
|
|
242 </conditional>
|
|
243 </inputs>
|
|
244 <outputs>
|
|
245 <data format="gatk_interval" name="output_interval" label="${tool.name} on ${on_string} (GATK intervals)" />
|
|
246 <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" />
|
|
247 </outputs>
|
|
248 <tests>
|
|
249 <test>
|
|
250 <param name="reference_source_selector" value="history" />
|
|
251 <param name="ref_file" value="phiX.fasta" ftype="fasta" />
|
|
252 <param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" />
|
|
253 <param name="input_dbsnp_rod" />
|
|
254 <param name="rod_bind_type_selector" value="snps" />
|
|
255 <param name="rodToIntervalTrackName" />
|
|
256 <param name="input_rod" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
|
|
257 <param name="gatk_param_type_selector" value="basic" />
|
|
258 <param name="analysis_param_type_selector" value="basic" />
|
|
259 <output name="output_interval" file="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.gatk_interval" />
|
|
260 <output name="output_log" file="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.log.contains" compare="contains"/>
|
|
261 </test>
|
|
262 </tests>
|
|
263 <help>
|
|
264 **What it does**
|
|
265
|
|
266 Emits intervals for the Local Indel Realigner to target for cleaning. Ignores 454 reads, MQ0 reads, and reads with consecutive indel operators in the CIGAR string.
|
|
267
|
|
268 ------
|
|
269
|
|
270 Please cite the website "http://addlink.here" as well as:
|
|
271
|
|
272 Add citation here 2011.
|
|
273
|
|
274 ------
|
|
275
|
|
276 **Input formats**
|
|
277
|
|
278 GenomeAnalysisTK: RealignerTargetCreator accepts an aligned BAM input file.
|
|
279
|
|
280 ------
|
|
281
|
|
282 **Outputs**
|
|
283
|
|
284 The output is in GATK Interval format, see http://addlink.here for more details.
|
|
285
|
|
286 -------
|
|
287
|
|
288 **Settings**::
|
|
289
|
|
290 windowSize window size for calculating entropy or SNP clusters
|
|
291 mismatchFraction fraction of base qualities needing to mismatch for a position to have high entropy; to disable set to <= 0 or > 1
|
|
292 minReadsAtLocus minimum reads at a locus to enable using the entropy calculation
|
|
293 maxIntervalSize maximum interval size
|
|
294
|
|
295 </help>
|
|
296 </tool>
|