Mercurial > repos > devteam > freebayes
annotate freebayes.xml @ 11:e9ebed0c12f6 draft
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
author | soranzo |
---|---|
date | Mon, 17 Feb 2014 10:53:56 -0500 |
parents | fcb60273c710 |
children |
rev | line source |
---|---|
0 | 1 <?xml version="1.0"?> |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
2 <tool id="freebayes" name="FreeBayes" version="0.0.3"> |
0 | 3 <requirements> |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
4 <requirement type="package" version="0.9.6_9608597d12e127c847ae03aa03440ab63992fedf">freebayes</requirement> |
6
fcb60273c710
Add version string to samtools requirement
Daniel Blankenberg <dan@bx.psu.edu>
parents:
5
diff
changeset
|
5 <requirement type="package" version="0.1.18">samtools</requirement> |
0 | 6 </requirements> |
7 <description> - Bayesian genetic variant detector</description> | |
8 <command> | |
9 ##set up input files | |
10 #set $reference_fasta_filename = "localref.fa" | |
11 #if str( $reference_source.reference_source_selector ) == "history": | |
12 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && | |
13 samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for FreeBayes" >&2 && | |
14 #else: | |
15 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) | |
16 #end if | |
17 #for $bam_count, $input_bam in enumerate( $reference_source.input_bams ): | |
18 ln -s "${input_bam.input_bam}" "localbam_${bam_count}.bam" && | |
19 ln -s "${input_bam.input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" && | |
20 #end for | |
21 ##finished setting up inputs | |
22 | |
23 ##start FreeBayes commandline | |
24 freebayes | |
25 #for $bam_count, $input_bam in enumerate( $reference_source.input_bams ): | |
26 --bam "localbam_${bam_count}.bam" | |
27 #end for | |
28 --fasta-reference "${reference_fasta_filename}" | |
29 | |
30 ##outputs | |
31 --vcf "${output_vcf}" | |
32 | |
33 ##advanced options | |
34 #if str( $options_type.options_type_selector ) == "advanced": | |
35 ##additional outputs | |
36 #if $options_type.output_trace_option: | |
37 --trace "${output_trace}" | |
38 #end if | |
39 #if $options_type.output_failed_alleles_option: | |
40 --failed-alleles "${output_failed_alleles_bed}" | |
41 #end if | |
42 | |
43 ##additional inputs | |
44 #if str( $options_type.target_limit_type.target_limit_type_selector ) == "limit_by_target_file": | |
45 --targets "${options_type.target_limit_type.input_target_bed}" | |
46 #elif str( $options_type.target_limit_type.target_limit_type_selector ) == "limit_by_region": | |
47 --region "${options_type.target_limit_type.region_chromosome}:${options_type.target_limit_type.region_start}..${options_type.target_limit_type.region_end}" | |
48 #end if | |
49 #if $options_type.input_sample_file: | |
50 --samples "${options_type.input_sample_file}" | |
51 #end if | |
52 #if $options_type.input_populations_file: | |
53 --populations "${options_type.input_populations_file}" | |
54 #end if | |
55 #if $options_type.input_cnv_map_bed: | |
56 --cnv-map "${options_type.input_cnv_map_bed}" | |
57 #end if | |
58 #if str( $options_type.input_variant_type.input_variant_type_selector ) == "provide_vcf": | |
59 --variant-input "${options_type.input_variant_type.input_variant_vcf}" | |
60 ${options_type.input_variant_type.only_use_input_alleles} | |
61 #end if | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
62 #if $options_type.haplotype_basis_alleles: |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
63 --haplotype-basis-alleles "${options_type.haplotype_basis_alleles}" |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
64 #end if |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
65 |
0 | 66 |
67 ##reporting | |
68 #if str( $options_type.section_reporting_type.section_reporting_type_selector ) == "set": | |
69 --pvar "${options_type.section_reporting_type.pvar}" | |
70 ${options_type.section_reporting_type.show_reference_repeats} | |
71 #end if | |
72 | |
73 ##population model | |
74 #if str( $options_type.section_population_model_type.section_population_model_type_selector ) == "set": | |
75 --theta "${options_type.section_population_model_type.theta}" | |
76 --ploidy "${options_type.section_population_model_type.ploidy}" | |
77 ${options_type.section_population_model_type.pooled} | |
78 #end if | |
79 | |
80 ##reference allele | |
81 #if str( $options_type.use_reference_allele_type.use_reference_allele_type_selector ) == "include_reference_allele": | |
82 --use-reference-allele | |
83 ${options_type.use_reference_allele_type.diploid_reference} | |
84 --reference-quality "${options_type.use_reference_allele_type.reference_quality_mq},${options_type.use_reference_allele_type.reference_quality_bq}" | |
85 #end if | |
86 | |
87 ##allele scope | |
88 #if str( $options_type.section_allele_scope_type.section_allele_scope_type_selector ) == "set": | |
89 ${options_type.section_allele_scope_type.no_snps} | |
90 ${options_type.section_allele_scope_type.no_indels} | |
91 ${options_type.section_allele_scope_type.no_mnps} | |
92 ${options_type.section_allele_scope_type.no_complex} | |
93 --use-best-n-alleles "${options_type.section_allele_scope_type.use_best_n_alleles}" | |
94 #if $options_type.section_allele_scope_type.max_complex_gap: | |
95 --max-complex-gap "${options_type.section_allele_scope_type.max_complex_gap}" | |
96 #end if | |
97 #end if | |
98 | |
99 ##indel realignment | |
100 ${options_type.left_align_indels} | |
101 | |
102 ##input filters | |
103 #if str( $options_type.section_input_filters_type.section_input_filters_type_selector ) == "set": | |
104 ${options_type.section_input_filters_type.use_duplicate_reads} | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
105 #if str( $options_type.section_input_filters_type.quality_filter_type.quality_filter_type_selector ) == "apply_filters": |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
106 --min-mapping-quality "${options_type.section_input_filters_type.quality_filter_type.min_mapping_quality}" |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
107 --min-base-quality "${options_type.section_input_filters_type.quality_filter_type.min_base_quality}" |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
108 --min-supporting-quality "${options_type.section_input_filters_type.quality_filter_type.min_supporting_quality_mq},${options_type.section_input_filters_type.quality_filter_type.min_supporting_quality_bq}" |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
109 #elif str( $options_type.section_input_filters_type.quality_filter_type.quality_filter_type_selector ) == "standard_filters": |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
110 --standard-filters |
0 | 111 #end if |
112 --mismatch-base-quality-threshold "${options_type.section_input_filters_type.mismatch_base_quality_threshold}" | |
113 #if $options_type.section_input_filters_type.read_mismatch_limit: | |
114 --read-mismatch-limit "${options_type.section_input_filters_type.read_mismatch_limit}" | |
115 #end if | |
116 --read-max-mismatch-fraction "${options_type.section_input_filters_type.read_max_mismatch_fraction}" | |
117 #if $options_type.section_input_filters_type.read_snp_limit: | |
118 --read-snp-limit "${options_type.section_input_filters_type.read_snp_limit}" | |
119 #end if | |
120 #if $options_type.section_input_filters_type.read_indel_limit: | |
121 --read-indel-limit "${options_type.section_input_filters_type.read_indel_limit}" | |
122 #end if | |
123 --indel-exclusion-window "${options_type.section_input_filters_type.indel_exclusion_window}" | |
124 --min-alternate-fraction "${options_type.section_input_filters_type.min_alternate_fraction}" | |
125 --min-alternate-count "${options_type.section_input_filters_type.min_alternate_count}" | |
126 --min-alternate-qsum "${options_type.section_input_filters_type.min_alternate_qsum}" | |
127 --min-alternate-total "${options_type.section_input_filters_type.min_alternate_total}" | |
128 --min-coverage "${options_type.section_input_filters_type.min_coverage}" | |
129 #end if | |
130 | |
131 ##bayesian priors | |
132 #if str( $options_type.section_bayesian_priors_type.section_bayesian_priors_type_selector ) == "set": | |
133 ${options_type.section_bayesian_priors_type.no_ewens_priors} | |
134 ${options_type.section_bayesian_priors_type.no_population_priors} | |
135 ${options_type.section_bayesian_priors_type.hwe_priors} | |
136 #end if | |
137 | |
138 ##observation prior expectations | |
139 #if str( $options_type.section_observation_prior_expectations_type.section_observation_prior_expectations_type_selector ) == "set": | |
140 ${options_type.section_observation_prior_expectations_type.binomial_obs_priors} | |
141 ${options_type.section_observation_prior_expectations_type.allele_balance_priors} | |
142 #end if | |
143 | |
144 ##algorithmic features | |
145 #if str( $options_type.section_algorithmic_features_type.section_algorithmic_features_type_selector ) == "set": | |
146 --site-selection-max-iterations "${options_type.section_algorithmic_features_type.site_selection_max_iterations}" | |
147 --genotyping-max-iterations "${options_type.section_algorithmic_features_type.genotyping_max_iterations}" | |
148 --genotyping-max-banddepth "${options_type.section_algorithmic_features_type.genotyping_max_banddepth}" | |
149 --posterior-integration-limits "${options_type.section_algorithmic_features_type.posterior_integration_limits_n},${options_type.section_algorithmic_features_type.posterior_integration_limits_m}" | |
150 ${options_type.section_algorithmic_features_type.no_permute} | |
151 ${options_type.section_algorithmic_features_type.exclude_unobserved_genotypes} | |
152 #if $options_type.section_algorithmic_features_type.genotype_variant_threshold: | |
153 --genotype-variant-threshold "${options_type.section_algorithmic_features_type.genotype_variant_threshold}" | |
154 #end if | |
155 ${options_type.section_algorithmic_features_type.use_mapping_quality} | |
156 --read-dependence-factor "${options_type.section_algorithmic_features_type.read_dependence_factor}" | |
157 ${options_type.section_algorithmic_features_type.no_marginals} | |
158 #end if | |
159 #end if | |
160 </command> | |
161 <inputs> | |
162 <conditional name="reference_source"> | |
163 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> | |
164 <option value="cached">Locally cached</option> | |
165 <option value="history">History</option> | |
166 </param> | |
167 <when value="cached"> | |
168 <repeat name="input_bams" title="Sample BAM file" min="1"> | |
169 <param name="input_bam" type="data" format="bam" label="BAM file"> | |
170 <validator type="unspecified_build" /> | |
11
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
171 <validator type="dataset_metadata_in_data_table" table_name="sam_fa_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." /> |
0 | 172 </param> |
173 </repeat> | |
174 <param name="ref_file" type="select" label="Using reference genome"> | |
175 <options from_data_table="sam_fa_indexes"> | |
176 <!-- <filter type="sam_fa_indexes" key="dbkey" ref="input_bam" column="value"/> does not yet work in a repeat...--> | |
177 </options> | |
178 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | |
179 </param> | |
180 </when> | |
181 <when value="history"> <!-- FIX ME!!!! --> | |
182 <repeat name="input_bams" title="Sample BAM file" min="1"> | |
183 <param name="input_bam" type="data" format="bam" label="BAM file" /> | |
184 </repeat> | |
185 <param name="ref_file" type="data" format="fasta" label="Using reference file" /> | |
186 </when> | |
187 </conditional> | |
188 | |
189 <conditional name="options_type"> | |
190 <param name="options_type_selector" type="select" label="Basic or Advanced options"> | |
191 <option value="basic" selected="True">Basic</option> | |
192 <option value="advanced">Advanced</option> | |
193 </param> | |
194 <when value="basic"> | |
195 <!-- Do nothing here --> | |
196 </when> | |
197 <when value="advanced"> | |
198 | |
199 <!-- output --> | |
200 <param name="output_failed_alleles_option" type="boolean" truevalue="--failed-alleles" falsevalue="" checked="False" label="Write out failed alleles file" /> | |
201 <param name="output_trace_option" type="boolean" truevalue="--trace" falsevalue="" checked="False" label="Write out algorithm trace file" /> | |
202 | |
203 | |
204 <!-- input --> | |
205 <conditional name="target_limit_type"> | |
206 <param name="target_limit_type_selector" type="select" label="Limit analysis to listed targets"> | |
207 <option value="do_not_limit" selected="True">Do not limit</option> | |
208 <option value="limit_by_target_file">Limit by target file</option> | |
209 <option value="limit_by_region">Limit to region</option> | |
210 </param> | |
211 <when value="do_not_limit"> | |
212 <!-- Do nothing here --> | |
213 </when> | |
214 <when value="limit_by_target_file"> | |
215 <param name="input_target_bed" type="data" format="bed" label="Limit analysis to targets listed in the BED-format FILE." /> | |
216 </when> | |
217 <when value="limit_by_region"> | |
218 <param name="region_chromosome" type="text" label="Region Chromosome" value="" /> <!--only once? --> | |
219 <param name="region_start" type="integer" label="Region Start" value="" /> | |
220 <param name="region_end" type="integer" label="Region End" value="" /> | |
221 </when> | |
222 </conditional> | |
223 <param name="input_sample_file" type="data" format="txt" label="Limit analysis to samples listed (one per line) in the FILE" optional="True" /> | |
224 <param name="input_populations_file" type="data" format="txt" label="Populations File" optional="True" /> | |
225 <param name="input_cnv_map_bed" type="data" format="bed" label="Read a copy number map from the BED file FILE" optional="True" /> | |
226 <conditional name="input_variant_type"> | |
227 <param name="input_variant_type_selector" type="select" label="Provide variants file"> | |
228 <option value="do_not_provide" selected="True">Do not provide</option> | |
229 <option value="provide_vcf">Provide VCF file</option> | |
230 </param> | |
231 <when value="do_not_provide"> | |
232 <!-- Do nothing here --> | |
233 </when> | |
234 <when value="provide_vcf"> | |
235 <param name="input_variant_vcf" type="data" format="vcf" label="Use variants reported in VCF file as input to the algorithm" /> | |
236 <param name="only_use_input_alleles" type="boolean" truevalue="--only-use-input-alleles" falsevalue="" checked="False" label="Only provide variant calls and genotype likelihoods for sites in VCF" /> | |
237 </when> | |
238 </conditional> | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
239 <param name="haplotype_basis_alleles" type="data" format="vcf" label="Only use variant alleles provided in this input VCF for the construction of complex or haplotype alleles" optional="True" /> |
0 | 240 |
241 <!-- reporting --> | |
242 <conditional name="section_reporting_type"> | |
243 <param name="section_reporting_type_selector" type="select" label="Set Reporting options"> | |
244 <option value="do_not_set" selected="True">Do not set</option> | |
245 <option value="set">Set</option> | |
246 </param> | |
247 <when value="do_not_set"> | |
248 <!-- do nothing here --> | |
249 </when> | |
250 <when value="set"> | |
251 <param name="pvar" type="float" label="Report sites if the probability that there is a polymorphism at the site is greater" value="0.0001" /> | |
252 <param name="show_reference_repeats" type="boolean" truevalue="--show-reference-repeats" falsevalue="" checked="False" label="Calculate and show information about reference repeats" /> | |
253 </when> | |
254 </conditional> | |
255 | |
256 | |
257 <!-- population model --> | |
258 <conditional name="section_population_model_type"> | |
259 <param name="section_population_model_type_selector" type="select" label="Set population model options"> | |
260 <option value="do_not_set" selected="True">Do not set</option> | |
261 <option value="set">Set</option> | |
262 </param> | |
263 <when value="do_not_set"> | |
264 <!-- do nothing here --> | |
265 </when> | |
266 <when value="set"> | |
267 <param name="theta" type="float" label="expected mutation rate or pairwise nucleotide diversity among the population" value="0.001" help="This serves as the single parameter to the Ewens Sampling Formula prior model"/> | |
268 <param name="ploidy" type="integer" label="default ploidy for the analysis" value="2" /> | |
269 <param name="pooled" type="boolean" truevalue="--pooled" falsevalue="" checked="False" label="Assume that samples result from pooled sequencing" help="When using this flag, set --ploidy to the number of alleles in each sample." /> | |
270 </when> | |
271 </conditional> | |
272 | |
273 <!-- reference allele --> | |
274 <conditional name="use_reference_allele_type"> | |
275 <param name="use_reference_allele_type_selector" type="select" label="Include the reference allele in the analysis"> | |
276 <option value="do_not_include_reference_allele" selected="True">Do not include</option> | |
277 <option value="include_reference_allele">Include</option> | |
278 </param> | |
279 <when value="do_not_include_reference_allele"> | |
280 <!-- Do nothing here --> | |
281 </when> | |
282 <when value="include_reference_allele"> | |
283 <param name="diploid_reference" type="boolean" truevalue="--diploid-reference" falsevalue="" checked="False" label="Treat reference as diploid" /> | |
284 <param name="reference_quality_mq" type="integer" label="Assign mapping quality" value="100" /> | |
285 <param name="reference_quality_bq" type="integer" label="Assign base quality" value="60" /> | |
286 </when> | |
287 </conditional> | |
288 | |
289 <!-- allele scope --> | |
290 <conditional name="section_allele_scope_type"> | |
291 <param name="section_allele_scope_type_selector" type="select" label="Set allele scope options"> | |
292 <option value="do_not_set" selected="True">Do not set</option> | |
293 <option value="set">Set</option> | |
294 </param> | |
295 <when value="do_not_set"> | |
296 <!-- do nothing here --> | |
297 </when> | |
298 <when value="set"> | |
299 <param name="no_snps" type="boolean" truevalue="--no-snps" falsevalue="" checked="False" label="Ignore SNP alleles" /> | |
300 <param name="no_indels" type="boolean" truevalue="--no-indels" falsevalue="" checked="False" label="Ignore insertion and deletion alleles" /> | |
301 <param name="no_mnps" type="boolean" truevalue="--no-mnps" falsevalue="" checked="False" label="Ignore multi-nuceotide polymorphisms, MNPs" /> | |
302 <param name="no_complex" type="boolean" truevalue="--no-complex" falsevalue="" checked="False" label="Ignore complex events (composites of other classes)" /> | |
303 <param name="use_best_n_alleles" type="integer" label="Evaluate only the best N SNP alleles" value="0" min="0" help="Ranked by sum of supporting quality scores; Set to 0 to use all" /> | |
304 <param name="max_complex_gap" type="integer" label="Allow complex alleles with contiguous embedded matches of up to this length" value="" optional="True"/> | |
305 </when> | |
306 </conditional> | |
307 | |
308 <!-- indel realignment --> | |
11
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
309 <!-- in FreeBayes < 0.9.9 the default is to not left-align indels and the available option is - -left-align-indels, |
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
310 in FreeBayes >= 0.9.9 the default is to left-align indels and the available option is - -dont-left-align-indels --> |
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
311 <param name="left_align_indels" type="boolean" truevalue="--left-align-indels" falsevalue="" checked="False" label="Left align indels" /> |
0 | 312 |
313 <!-- input filters --> | |
314 <conditional name="section_input_filters_type"> | |
315 <param name="section_input_filters_type_selector" type="select" label="Set input filters options"> | |
316 <option value="do_not_set" selected="True">Do not set</option> | |
317 <option value="set">Set</option> | |
318 </param> | |
319 <when value="do_not_set"> | |
320 <!-- do nothing here --> | |
321 </when> | |
322 <when value="set"> | |
323 <param name="use_duplicate_reads" type="boolean" truevalue="--use-duplicate-reads" falsevalue="" checked="False" label="Include duplicate-marked alignments in the analysis" /> | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
324 <conditional name="quality_filter_type"> |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
325 <param name="quality_filter_type_selector" type="select" label="Apply Quality filters"> |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
326 <option value="standard_filters" selected="True">Apply standard</option> |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
327 <option value="apply_filters">Apply specified</option> |
0 | 328 </param> |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
329 <when value="standard_filters"> |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
330 <!-- Do nothing here --> <!-- standard-filters --> |
0 | 331 </when> |
332 <when value="apply_filters"> | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
333 <param name="min_mapping_quality" type="integer" label="Exclude alignments from analysis if they have a mapping quality less than" value="0" /> |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
334 <param name="min_base_quality" type="integer" label="Exclude alleles from analysis if their supporting base quality less than" value="0" /> |
0 | 335 <param name="min_supporting_quality_mq" type="integer" label="In order to consider an alternate allele, at least one supporting alignment must have mapping quality" value="0" /> |
336 <param name="min_supporting_quality_bq" type="integer" label="In order to consider an alternate allele, at least one supporting alignment must have base quality" value="0" /> | |
337 </when> | |
338 </conditional> | |
339 <param name="mismatch_base_quality_threshold" type="integer" label="Count mismatches toward read-mismatch-limit if the base quality of the mismatch is >=" value="10" /> | |
340 <param name="read_mismatch_limit" type="integer" label="Exclude reads with more than N mismatches where each mismatch has base quality >= mismatch-base-quality-threshold" value="" optional="True" /> | |
341 <param name="read_max_mismatch_fraction" type="float" label="Exclude reads with more than N [0,1] fraction of mismatches where each mismatch has base quality >= mismatch-base-quality-threshold" value="1.0" /> | |
342 <param name="read_snp_limit" type="integer" label="Exclude reads with more than N base mismatches, ignoring gaps with quality >= mismatch-base-quality-threshold" value="" optional="True" /> | |
343 <param name="read_indel_limit" type="integer" label="Exclude reads with more than N separate gaps" value="" optional="True" /> | |
344 <param name="indel_exclusion_window" type="integer" label="Ignore portions of alignments this many bases from a putative insertion or deletion allele" value="0" /> | |
345 <param name="min_alternate_fraction" type="float" label="Require at least this fraction of observations supporting an alternate allele within a single individual in the in order to evaluate the position" value="0" /> | |
346 <param name="min_alternate_count" type="integer" label="Require at least this count of observations supporting an alternate allele within a single individual in order to evaluate the position" value="1" /> | |
347 <param name="min_alternate_qsum" type="integer" label="Require at least this sum of quality of observations supporting an alternate allele within a single individual in order to evaluate the position" value="0" /> | |
348 <param name="min_alternate_total" type="integer" label="Require at least this count of observations supporting an alternate allele within the total population in order to use the allele in analysis" value="1" /> | |
349 <param name="min_coverage" type="integer" label="Require at least this coverage to process a site" value="0" /> | |
350 </when> | |
351 </conditional> | |
352 | |
353 | |
354 <!-- bayesian priors --> | |
355 <conditional name="section_bayesian_priors_type"> | |
356 <param name="section_bayesian_priors_type_selector" type="select" label="Set bayesian priors options"> | |
357 <option value="do_not_set" selected="True">Do not set</option> | |
358 <option value="set">Set</option> | |
359 </param> | |
360 <when value="do_not_set"> | |
361 <!-- do nothing here --> | |
362 </when> | |
363 <when value="set"> | |
364 <param name="no_ewens_priors" type="boolean" truevalue="--no-ewens-priors" falsevalue="" checked="False" label="Turns off the Ewens' Sampling Formula component of the priors" /> | |
365 <param name="no_population_priors" type="boolean" truevalue="--no-population-priors" falsevalue="" checked="False" label="No population priors" help="Equivalent to --pooled --no-ewens-priors" /> | |
366 <param name="hwe_priors" type="boolean" truevalue="--hwe-priors" falsevalue="" checked="False" label="Use the probability of the combination arising under HWE given the allele frequency as estimated by observation frequency" /> | |
367 </when> | |
368 </conditional> | |
369 | |
370 <!-- observation prior expectations --> | |
371 <conditional name="section_observation_prior_expectations_type"> | |
372 <param name="section_observation_prior_expectations_type_selector" type="select" label="Set observation prior expectations options"> | |
373 <option value="do_not_set" selected="True">Do not set</option> | |
374 <option value="set">Set</option> | |
375 </param> | |
376 <when value="do_not_set"> | |
377 <!-- do nothing here --> | |
378 </when> | |
379 <when value="set"> | |
380 <param name="binomial_obs_priors" type="boolean" truevalue="--binomial-obs-priors" falsevalue="" checked="False" label="Incorporate expectations about osbervations into the priors, Uses read placement probability, strand balance probability, and read position (5'-3') probability" /> | |
381 <param name="allele_balance_priors" type="boolean" truevalue="--allele-balance-priors" falsevalue="" checked="False" label="Use aggregate probability of observation balance between alleles as a component of the priors. Best for observations with minimal inherent reference bias" /> | |
382 </when> | |
383 </conditional> | |
384 | |
385 | |
386 <!-- algorithmic features --> | |
387 <conditional name="section_algorithmic_features_type"> | |
388 <param name="section_algorithmic_features_type_selector" type="select" label="Set algorithmic features options"> | |
389 <option value="do_not_set" selected="True">Do not set</option> | |
390 <option value="set">Set</option> | |
391 </param> | |
392 <when value="do_not_set"> | |
393 <!-- do nothing here --> | |
394 </when> | |
395 <when value="set"> | |
396 <param name="site_selection_max_iterations" type="integer" label="Uses hill-climbing algorithm to search posterior space for N iterations to determine if the site should be evaluated." value="5" help="Set to 0 to prevent use of this algorithm for site selection, and to a low integer for improvide site selection at a slight performance penalty" /> | |
397 <param name="genotyping_max_iterations" type="integer" label="Iterate no more than N times during genotyping step" value="25" /> | |
398 <param name="genotyping_max_banddepth" type="integer" label="Integrate no deeper than the Nth best genotype by likelihood when genotyping" value="6" /> | |
399 <param name="posterior_integration_limits_n" type="integer" label="Posteriror integration limit N" help="Integrate all genotype combinations in our posterior space which include no more than N samples with their Mth best data likelihood." value="1" /> | |
400 <param name="posterior_integration_limits_m" type="integer" label="Posteriror integration limit M" help="Integrate all genotype combinations in our posterior space which include no more than N samples with their Mth best data likelihood." value="3" /> | |
401 <param name="no_permute" type="boolean" truevalue="--no-permute" falsevalue="" checked="False" label="Do not scale prior probability of genotype combination given allele frequency by the number of permutations of included genotypes" /> | |
402 <param name="exclude_unobserved_genotypes" type="boolean" truevalue="--exclude-unobserved-genotypes" falsevalue="" checked="False" label="Skip sample genotypings for which the sample has no supporting reads" /> | |
403 <param name="genotype_variant_threshold" type="integer" label="Limit posterior integration to samples where the second-best genotype likelihood is no more than log(N) from the highest genotype likelihood for the sample" value="" optional="True" /> | |
404 <param name="use_mapping_quality" type="boolean" truevalue="--use-mapping-quality" falsevalue="" checked="False" label="Use mapping quality of alleles when calculating data likelihoods" /> | |
405 <param name="read_dependence_factor" type="float" label="Incorporate non-independence of reads by scaling successive observations by this factor during data likelihood calculations" value="0.9" /> | |
406 <param name="no_marginals" type="boolean" truevalue="--no-marginals" falsevalue="" checked="False" label="Do not calculate the marginal probability of genotypes. Saves time and improves scaling performance in large populations" /> | |
407 </when> | |
408 </conditional> | |
409 | |
410 | |
411 </when> | |
412 </conditional> | |
413 | |
414 </inputs> | |
415 <outputs> | |
416 <data format="vcf" name="output_vcf" label="${tool.name} on ${on_string} (variants)" /> | |
417 <data format="bed" name="output_failed_alleles_bed" label="${tool.name} on ${on_string} (failed alleles)"> | |
418 <filter>options_type['options_type_selector'] == "advanced" and options_type['output_failed_alleles_option'] is True</filter> | |
419 </data> | |
420 <data format="txt" name="output_trace" label="${tool.name} on ${on_string} (trace)"> | |
421 <filter>options_type['options_type_selector'] == "advanced" and options_type['output_trace_option'] is True</filter> | |
422 </data> | |
423 </outputs> | |
424 <tests> | |
425 <test> | |
426 <param name="reference_source_selector" value="history" /> | |
427 <param name="ref_file" ftype="fasta" value="phiX.fasta"/> | |
4
e54bb199a47b
Fixed git revision string in tool_dependencies.xml and added functional test data
greg <greg@bx.psu.edu>
parents:
2
diff
changeset
|
428 <param name="input_bam" ftype="bam" value="fake_phiX_reads_1.bam"/> |
0 | 429 <param name="options_type_selector" value="basic"/> |
4
e54bb199a47b
Fixed git revision string in tool_dependencies.xml and added functional test data
greg <greg@bx.psu.edu>
parents:
2
diff
changeset
|
430 <output name="output_vcf" file="freebayes_out_1.vcf.contains" compare="contains"/> |
0 | 431 </test> |
432 </tests> | |
11
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
433 <stdio> |
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
434 <exit_code range="1:" /> |
e9ebed0c12f6
Check exit code instead of stderr, since FreeBayes writes warnings there (e.g. "Could not find any mapped reads in target region chr1:955302..955952"). Also document change of available options in FreeBayes >= 0.9.9.
soranzo
parents:
6
diff
changeset
|
435 </stdio> |
0 | 436 <help> |
437 **What it does** | |
438 | |
439 This tool uses FreeBayes to call SNPS given a reference sequence and a BAM alignment file. | |
440 | |
441 FreeBayes is a high-performance, flexible, and open-source Bayesian genetic variant detector. It operates on BAM alignment files, which are produced by most contemporary short-read aligners. | |
442 | |
443 In addition to substantial performance improvements over its predecessors (PolyBayes, GigaBayes, and BamBayes), it expands the scope of SNP and small-indel variant calling to populations of individuals with heterogeneous copy number. FreeBayes is currently under active development. | |
444 | |
445 Go `here <http://bioinformatics.bc.edu/marthlab/FreeBayes>`_ for details on FreeBayes. | |
446 | |
447 ------ | |
448 | |
449 **Inputs** | |
450 | |
451 FreeBayes accepts an input aligned BAM file. | |
452 | |
453 | |
454 **Outputs** | |
455 | |
456 The output is in the VCF format. | |
457 | |
458 ------- | |
459 | |
460 **Settings**:: | |
461 | |
462 input and output: | |
463 | |
464 -b --bam FILE Add FILE to the set of BAM files to be analyzed. | |
465 -c --stdin Read BAM input on stdin. | |
466 -v --vcf FILE Output VCF-format results to FILE. | |
467 -f --fasta-reference FILE | |
468 Use FILE as the reference sequence for analysis. | |
469 An index file (FILE.fai) will be created if none exists. | |
470 If neither --targets nor --region are specified, FreeBayes | |
471 will analyze every position in this reference. | |
472 -t --targets FILE | |
473 Limit analysis to targets listed in the BED-format FILE. | |
474 -r --region <chrom>:<start_position>..<end_position> | |
475 Limit analysis to the specified region, 0-base coordinates, | |
476 end_position not included (same as BED format). | |
477 -s --samples FILE | |
478 Limit analysis to samples listed (one per line) in the FILE. | |
479 By default FreeBayes will analyze all samples in its input | |
480 BAM files. | |
481 --populations FILE | |
482 Each line of FILE should list a sample and a population which | |
483 it is part of. The population-based bayesian inference model | |
484 will then be partitioned on the basis of the populations. | |
485 -A --cnv-map FILE | |
486 Read a copy number map from the BED file FILE, which has | |
487 the format: | |
488 reference sequence, start, end, sample name, copy number | |
489 ... for each region in each sample which does not have the | |
490 default copy number as set by --ploidy. | |
491 -L --trace FILE Output an algorithmic trace to FILE. | |
492 --failed-alleles FILE | |
493 Write a BED file of the analyzed positions which do not | |
494 pass --pvar to FILE. | |
495 -@ --variant-input VCF | |
496 Use variants reported in VCF file as input to the algorithm. | |
497 A report will be generated for every record in the VCF file. | |
498 -l --only-use-input-alleles | |
499 Only provide variant calls and genotype likelihoods for sites | |
500 and alleles which are provided in the VCF input, and provide | |
501 output in the VCF for all input alleles, not just those which | |
502 have support in the data. | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
503 --haplotype-basis-alleles VCF |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
504 When specified, only variant alleles provided in this input |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
505 VCF will be used for the construction of complex or haplotype |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
506 alleles. |
0 | 507 |
508 reporting: | |
509 | |
510 -P --pvar N Report sites if the probability that there is a polymorphism | |
511 at the site is greater than N. default: 0.0001 | |
512 -_ --show-reference-repeats | |
513 Calculate and show information about reference repeats in | |
514 the VCF output. | |
515 | |
516 population model: | |
517 | |
518 -T --theta N The expected mutation rate or pairwise nucleotide diversity | |
519 among the population under analysis. This serves as the | |
520 single parameter to the Ewens Sampling Formula prior model | |
521 default: 0.001 | |
522 -p --ploidy N Sets the default ploidy for the analysis to N. default: 2 | |
523 -J --pooled Assume that samples result from pooled sequencing. | |
524 When using this flag, set --ploidy to the number of | |
525 alleles in each sample. | |
526 | |
527 reference allele: | |
528 | |
529 -Z --use-reference-allele | |
530 This flag includes the reference allele in the analysis as | |
531 if it is another sample from the same population. | |
532 -H --diploid-reference | |
533 If using the reference sequence as a sample (-Z), | |
534 treat it as diploid. default: false (reference is haploid) | |
535 --reference-quality MQ,BQ | |
536 Assign mapping quality of MQ to the reference allele at each | |
537 site and base quality of BQ. default: 100,60 | |
538 | |
539 allele scope: | |
540 | |
541 -I --no-snps Ignore SNP alleles. | |
542 -i --no-indels Ignore insertion and deletion alleles. | |
543 -X --no-mnps Ignore multi-nuceotide polymorphisms, MNPs. | |
544 -u --no-complex Ignore complex events (composites of other classes). | |
545 -n --use-best-n-alleles N | |
546 Evaluate only the best N SNP alleles, ranked by sum of | |
547 supporting quality scores. (Set to 0 to use all; default: all) | |
548 -E --max-complex-gap N | |
549 Allow complex alleles with contiguous embedded matches of up | |
550 to this length. | |
551 | |
552 indel realignment: | |
553 | |
554 -O --left-align-indels | |
555 Left-realign and merge gaps embedded in reads. default: false | |
556 | |
557 input filters: | |
558 | |
559 -4 --use-duplicate-reads | |
560 Include duplicate-marked alignments in the analysis. | |
561 default: exclude duplicates | |
562 -m --min-mapping-quality Q | |
563 Exclude alignments from analysis if they have a mapping | |
564 quality less than Q. default: 30 | |
565 -q --min-base-quality Q | |
566 Exclude alleles from analysis if their supporting base | |
567 quality is less than Q. default: 20 | |
568 -R --min-supporting-quality MQ,BQ | |
569 In order to consider an alternate allele, at least one supporting | |
570 alignment must have mapping quality MQ, and one supporting | |
571 allele must have base quality BQ. default: 0,0, unset | |
572 -Q --mismatch-base-quality-threshold Q | |
573 Count mismatches toward --read-mismatch-limit if the base | |
574 quality of the mismatch is >= Q. default: 10 | |
575 -U --read-mismatch-limit N | |
576 Exclude reads with more than N mismatches where each mismatch | |
577 has base quality >= mismatch-base-quality-threshold. | |
578 default: ~unbounded | |
579 -z --read-max-mismatch-fraction N | |
580 Exclude reads with more than N [0,1] fraction of mismatches where | |
581 each mismatch has base quality >= mismatch-base-quality-threshold | |
582 default: 1.0 | |
583 -$ --read-snp-limit N | |
584 Exclude reads with more than N base mismatches, ignoring gaps | |
585 with quality >= mismatch-base-quality-threshold. | |
586 default: ~unbounded | |
587 -e --read-indel-limit N | |
588 Exclude reads with more than N separate gaps. | |
589 default: ~unbounded | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
590 -0 --standard-filters Use stringent input base and mapping quality filters |
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
591 Equivalent to -m 30 -q 20 -R 0 -S 0 |
0 | 592 -x --indel-exclusion-window |
593 Ignore portions of alignments this many bases from a | |
594 putative insertion or deletion allele. default: 0 | |
595 -F --min-alternate-fraction N | |
596 Require at least this fraction of observations supporting | |
597 an alternate allele within a single individual in the | |
598 in order to evaluate the position. default: 0.0 | |
599 -C --min-alternate-count N | |
600 Require at least this count of observations supporting | |
601 an alternate allele within a single individual in order | |
602 to evaluate the position. default: 1 | |
603 -3 --min-alternate-qsum N | |
604 Require at least this sum of quality of observations supporting | |
605 an alternate allele within a single individual in order | |
606 to evaluate the position. default: 0 | |
607 -G --min-alternate-total N | |
608 Require at least this count of observations supporting | |
609 an alternate allele within the total population in order | |
610 to use the allele in analysis. default: 1 | |
611 -! --min-coverage N | |
612 Require at least this coverage to process a site. default: 0 | |
613 | |
614 bayesian priors: | |
615 | |
616 -Y --no-ewens-priors | |
617 Turns off the Ewens' Sampling Formula component of the priors. | |
618 -k --no-population-priors | |
619 Equivalent to --pooled --no-ewens-priors | |
620 -w --hwe-priors Use the probability of the combination arising under HWE given | |
621 the allele frequency as estimated by observation frequency. | |
622 | |
623 observation prior expectations: | |
624 | |
625 -V --binomial-obs-priors | |
626 Incorporate expectations about osbervations into the priors, | |
627 Uses read placement probability, strand balance probability, | |
628 and read position (5'-3') probability. | |
629 -a --allele-balance-priors | |
630 Use aggregate probability of observation balance between alleles | |
631 as a component of the priors. Best for observations with minimal | |
632 inherent reference bias. | |
633 | |
634 algorithmic features: | |
635 | |
636 -M --site-selection-max-iterations N | |
637 Uses hill-climbing algorithm to search posterior space for N | |
638 iterations to determine if the site should be evaluated. Set to 0 | |
639 to prevent use of this algorithm for site selection, and | |
640 to a low integer for improvide site selection at a slight | |
641 performance penalty. default: 5. | |
642 -B --genotyping-max-iterations N | |
643 Iterate no more than N times during genotyping step. default: 25. | |
644 --genotyping-max-banddepth N | |
645 Integrate no deeper than the Nth best genotype by likelihood when | |
646 genotyping. default: 6. | |
647 -W --posterior-integration-limits N,M | |
648 Integrate all genotype combinations in our posterior space | |
649 which include no more than N samples with their Mth best | |
650 data likelihood. default: 1,3. | |
651 -K --no-permute | |
652 Do not scale prior probability of genotype combination given allele | |
653 frequency by the number of permutations of included genotypes. | |
654 -N --exclude-unobserved-genotypes | |
655 Skip sample genotypings for which the sample has no supporting reads. | |
656 -S --genotype-variant-threshold N | |
657 Limit posterior integration to samples where the second-best | |
658 genotype likelihood is no more than log(N) from the highest | |
659 genotype likelihood for the sample. default: ~unbounded | |
660 -j --use-mapping-quality | |
661 Use mapping quality of alleles when calculating data likelihoods. | |
662 -D --read-dependence-factor N | |
663 Incorporate non-independence of reads by scaling successive | |
664 observations by this factor during data likelihood | |
665 calculations. default: 0.9 | |
666 -= --no-marginals | |
667 Do not calculate the marginal probability of genotypes. Saves | |
668 time and improves scaling performance in large populations. | |
669 | |
670 | |
671 ------ | |
672 | |
673 **Citation** | |
674 | |
5
949ac66308a7
Update FreeBayes to 0.9.6_9608597d12e127c847ae03aa03440ab63992fedf.
Daniel Blankenberg <dan@bx.psu.edu>
parents:
4
diff
changeset
|
675 For the underlying tool, please cite `Erik Garrison and Gabor Marth. Haplotype-based variant detection from short-read sequencing <http://arxiv.org/abs/1207.3907>`_. |
0 | 676 |
677 If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.* | |
678 | |
679 </help> | |
680 </tool> |