comparison indel_realigner.xml @ 15:01ff8dd37d4d draft default tip

Uploaded
author lz_hust
date Sat, 01 Jun 2019 07:20:41 -0400
parents
children
comparison
equal deleted inserted replaced
14:68426930d59c 15:01ff8dd37d4d
1 <tool id="gatk2_indel_realigner" name="Indel Realigner" version="@VERSION@.1">
2 <description>- perform local realignment</description>
3 <macros>
4 <import>gatk2_macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <expand macro="version_command" />
8 <command interpreter="python">
9 gatk2_wrapper.py
10 --stdout "${output_log}"
11 -d "-I" "${reference_source.input_bam}" "${reference_source.input_bam.ext}" "gatk_input"
12 #if str( $reference_source.input_bam.metadata.bam_index ) != "None":
13 -d "" "${reference_source.input_bam.metadata.bam_index}" "bam_index" "gatk_input" ##hardcode galaxy ext type as bam_index
14 #end if
15 -p '
16 @JAR_PATH@
17 -T "IndelRealigner"
18 -o "${output_bam}"
19
20 \$GATK2_SITE_OPTIONS
21
22 ## according to http://www.broadinstitute.org/gatk/guide/article?id=1975
23 --num_cpu_threads_per_data_thread 1
24
25 #if $reference_source.reference_source_selector != "history":
26 -R "${reference_source.ref_file.fields.path}"
27 #end if
28 -LOD "${lod_threshold}"
29 ${knowns_only}
30 '
31
32 #set $rod_binding_names = dict()
33 #for $rod_binding in $rod_bind:
34 #if str( $rod_binding.rod_bind_type.rod_bind_type_selector ) == 'custom':
35 #set $rod_bind_name = $rod_binding.rod_bind_type.custom_rod_name
36 #else
37 #set $rod_bind_name = $rod_binding.rod_bind_type.rod_bind_type_selector
38 #end if
39 #set $rod_binding_names[$rod_bind_name] = $rod_binding_names.get( $rod_bind_name, -1 ) + 1
40 -d "-known:${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]}"
41 #end for
42
43 $allow_n_cigar_reads
44 #include source=$standard_gatk_options#
45 ##start analysis specific options
46 -d "-targetIntervals" "${target_intervals}" "${target_intervals.ext}" "gatk_target_intervals"
47 -p '
48 --disable_bam_indexing
49 '
50 #if $analysis_param_type.analysis_param_type_selector == "advanced":
51 -p '
52 --entropyThreshold "${analysis_param_type.entropy_threshold}"
53 ${analysis_param_type.simplify_bam}
54 --consensusDeterminationModel "${analysis_param_type.consensus_determination_model}"
55 --maxIsizeForMovement "${analysis_param_type.max_insert_size_for_movement}"
56 --maxPositionalMoveAllowed "${analysis_param_type.max_positional_move_allowed}"
57 --maxConsensuses "${analysis_param_type.max_consensuses}"
58 --maxReadsForConsensuses "${analysis_param_type.max_reads_for_consensuses}"
59 --maxReadsForRealignment "${analysis_param_type.max_reads_for_realignment}"
60 ${analysis_param_type.no_original_alignment_tags}
61 '
62 #end if
63 </command>
64 <inputs>
65
66 <conditional name="reference_source">
67 <expand macro="reference_source_selector_param" />
68 <when value="cached">
69 <param name="input_bam" type="data" format="bam" label="BAM file" help="-I,--input_file &amp;lt;input_file&amp;gt;">
70 <validator type="unspecified_build" />
71 <validator type="dataset_metadata_in_data_table" table_name="gatk2_picard_indexes" metadata_name="dbkey" metadata_column="dbkey" message="Sequences are not currently available for the specified build." /> <!-- fixme!!! this needs to be a select -->
72 </param>
73 <param name="ref_file" type="select" label="Using reference genome" help="-R,--reference_sequence &amp;lt;reference_sequence&amp;gt;" >
74 <options from_data_table="gatk2_picard_indexes">
75 <filter type="data_meta" key="dbkey" ref="input_bam" column="dbkey"/>
76 </options>
77 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
78 </param>
79 </when>
80 <when value="history">
81 <param name="input_bam" type="data" format="bam" label="BAM file" help="-I,--input_file &amp;lt;input_file&amp;gt;" />
82 <param name="ref_file" type="data" format="fasta" label="Using reference file" help="-R,--reference_sequence &amp;lt;reference_sequence&amp;gt;">
83 <options>
84 <filter type="data_meta" key="dbkey" ref="input_bam" />
85 </options>
86 </param>
87 </when>
88 </conditional>
89 <param name="target_intervals" type="data" format="gatk_interval,bed,picard_interval_list" label="Restrict realignment to provided intervals" help="-targetIntervals,--targetIntervals &amp;lt;targetIntervals&amp;gt;" />
90 <repeat name="rod_bind" title="Known Variants" help="Using data sets of known variants (-known,--knownAlleles &amp;lt;knownAlleles&amp;gt;)">
91 <conditional name="rod_bind_type">
92 <param name="rod_bind_type_selector" type="select" label="Variant Type">
93 <option value="dbsnp" selected="True">dbSNP</option>
94 <option value="snps">SNPs</option>
95 <option value="indels">INDELs</option>
96 <option value="custom">Custom</option>
97 </param>
98 <when value="dbsnp">
99 <param name="input_rod" type="data" format="vcf" label="Variant file (VCF format)" />
100 </when>
101 <when value="snps">
102 <param name="input_rod" type="data" format="vcf" label="Variant file (VCF format)" />
103 </when>
104 <when value="indels">
105 <param name="input_rod" type="data" format="vcf" label="Variant file (VCF format)" />
106 </when>
107 <when value="custom">
108 <param name="custom_rod_name" type="text" value="Unknown" label="Customer's variant file"/>
109 <param name="input_rod" type="data" format="vcf" label="Variant file (VCF format)" />
110 </when>
111 </conditional>
112 </repeat>
113 <param name="lod_threshold" type="float" value="5.0" label="LOD threshold above which the realigner will proceed to realign" help="-LOD,--LODThresholdForCleaning &amp;lt;LODThresholdForCleaning&amp;gt;" />
114 <param name="knowns_only" type="boolean" checked="False" truevalue="-knownsOnly" falsevalue="" label="Use only known indels provided as RODs" help="-knownsOnly"/>
115
116 <expand macro="allow_n_cigar_reads" />
117 <expand macro="gatk_param_type_conditional" />
118
119 <expand macro="analysis_type_conditional">
120
121 <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" help="-entropy,--entropyThreshold &amp;lt;entropyThreshold&amp;gt;" />
122 <param name="simplify_bam" type="boolean" checked="False" truevalue="-simplifyBAM" falsevalue="" label="Simplify BAM" help="-simplifyBAM,--simplifyBAM"/>
123 <param name="consensus_determination_model" type="select" label="Consensus Determination Model" help="-model,--consensusDeterminationModel &amp;lt;consensusDeterminationModel&amp;gt;">
124 <option value="KNOWNS_ONLY">KNOWNS_ONLY</option>
125 <option value="USE_READS" selected="True">USE_READS</option>
126 <option value="USE_SW">USE_SW</option>
127 </param>
128 <param name="max_insert_size_for_movement" type="integer" value="3000" label="Maximum insert size of read pairs that we attempt to realign" help="-maxIsize,--maxIsizeForMovement &amp;lt;maxIsizeForMovement&amp;gt;" />
129 <param name="max_positional_move_allowed" type="integer" value="200" label="Maximum positional move in basepairs that a read can be adjusted during realignment" help="-maxPosMove,--maxPositionalMoveAllowed &amp;lt;maxPositionalMoveAllowed&amp;gt;" />
130 <param name="max_consensuses" type="integer" value="30" label="Max alternate consensuses to try" help="-maxConsensuses,--maxConsensuses &amp;lt;maxConsensuses&amp;gt;" />
131 <param name="max_reads_for_consensuses" type="integer" value="120" label="Max reads (chosen randomly) used for finding the potential alternate consensuses" help="-greedy,--maxReadsForConsensuses &amp;lt;maxReadsForConsensuses&amp;gt;" />
132 <param name="max_reads_for_realignment" type="integer" value="20000" label="Max reads allowed at an interval for realignment" help="-maxReads,--maxReadsForRealignment &amp;lt;maxReadsForRealignment&amp;gt;" />
133 <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" help="-noTags,--noOriginalAlignmentTags"/>
134 </expand>
135 </inputs>
136 <outputs>
137 <data format="bam" name="output_bam" label="${tool.name} on ${on_string} (BAM)" />
138 <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" />
139 </outputs>
140 <tests>
141 <test>
142 <param name="reference_source_selector" value="history" />
143 <param name="ref_file" value="phiX.fasta" ftype="fasta" />
144 <param name="target_intervals" value="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.gatk_interval" ftype="gatk_interval" />
145 <param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" />
146 <param name="rod_bind_type_selector" value="snps" />
147 <param name="input_rod" value="gatk/fake_phiX_variant_locations.vcf" ftype="vcf" />
148 <param name="lod_threshold" value="5.0" />
149 <param name="knowns_only" />
150 <param name="gatk_param_type_selector" value="basic" />
151 <param name="analysis_param_type_selector" value="advanced" />
152 <param name="entropy_threshold" value="0.15" />
153 <param name="simplify_bam" />
154 <param name="consensus_determination_model" value="USE_SW" />
155 <param name="max_insert_size_for_movement" value="3000" />
156 <param name="max_positional_move_allowed" value="200" />
157 <param name="max_consensuses" value="30" />
158 <param name="max_reads_for_consensuses" value="120" />
159 <param name="max_reads_for_realignment" value="20000" />
160 <param name="no_original_alignment_tags" />
161 <output name="output_bam" file="gatk/gatk_indel_realigner/gatk_indel_realigner_out_1.bam" ftype="bam" lines_diff="2" />
162 <output name="output_log" file="gatk/gatk_indel_realigner/gatk_indel_realigner_out_1.log.contains" compare="contains" />
163 </test>
164 </tests>
165 <help>
166 **What it does**
167
168 Performs local realignment of reads based on misalignments due to the presence of indels. Unlike most mappers, this walker uses the full alignment context to determine whether an appropriate alternate reference (i.e. indel) exists and updates SAMRecords accordingly.
169
170 For more information on local realignment around indels using the GATK, see this `tool specific page &lt;http://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_sting_gatk_walkers_indels_IndelRealigner.html&gt;`_.
171
172 To learn about best practices for variant detection using GATK, see this `overview &lt;http://www.broadinstitute.org/gatk/guide/topic?name=best-practices&gt;`_.
173
174 If you encounter errors, please view the `GATK FAQ &lt;http://www.broadinstitute.org/gatk/guide/topic?name=faqs&gt;`_.
175
176 ------
177
178 **Inputs**
179
180 GenomeAnalysisTK: IndelRealigner accepts an aligned BAM and a list of intervals to realign as input files.
181
182
183 **Outputs**
184
185 The output is in the BAM format.
186
187
188 Go `here &lt;http://www.broadinstitute.org/gatk/guide/topic?name=intro&gt;`_ for details on GATK file formats.
189
190 -------
191
192 **Settings**::
193
194 targetIntervals intervals file output from RealignerTargetCreator
195 LODThresholdForCleaning LOD threshold above which the cleaner will clean
196 entropyThreshold percentage of mismatches at a locus to be considered having high entropy
197 out Output bam
198 bam_compression Compression level to use for writing BAM files
199 disable_bam_indexing Turn off on-the-fly creation of indices for output BAM files.
200 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
201 useOnlyKnownIndels Don't run 'Smith-Waterman' to generate alternate consenses; use only known indels provided as RODs for constructing the alternate references.
202 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).
203 maxIsizeForMovement maximum insert size of read pairs that we attempt to realign
204 maxPositionalMoveAllowed maximum positional move in basepairs that a read can be adjusted during realignment
205 maxConsensuses max alternate consensuses to try (necessary to improve performance in deep coverage)
206 maxReadsForConsensuses max reads used for finding the alternate consensuses (necessary to improve performance in deep coverage)
207 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
208 noOriginalAlignmentTags Don't output the original cigar or alignment start tags for each realigned read in the output bam.
209
210 @CITATION_SECTION@
211 </help>
212 <expand macro="citations" />
213 </tool>