Mercurial > repos > devteam > freebayes
comparison freebayes.xml @ 14:91271de440f0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/freebayes commit cce7fcdd5e8ba8636c751f9f974bf07a6845ba1c"
author | iuc |
---|---|
date | Wed, 01 Dec 2021 21:49:34 +0000 |
parents | 5031b6656a2b |
children | c3da1614f96d |
comparison
equal
deleted
inserted
replaced
13:5031b6656a2b | 14:91271de440f0 |
---|---|
1 <tool id="freebayes" name="FreeBayes" version="@TOOL_VERSION@+galaxy1"> | 1 <tool id="freebayes" name="FreeBayes" version="@TOOL_VERSION@+galaxy0"> |
2 <description>bayesian genetic variant detector</description> | 2 <description>bayesian genetic variant detector</description> |
3 <xrefs> | 3 <xrefs> |
4 <xref type="bio.tools">freebayes</xref> | 4 <xref type="bio.tools">freebayes</xref> |
5 </xrefs> | 5 </xrefs> |
6 <macros> | 6 <macros> |
7 <import>macros.xml</import> | 7 <import>macros.xml</import> |
8 </macros> | 8 </macros> |
9 <expand macro="requirements"> | 9 <expand macro="requirements"> |
10 <requirement type="package" version="4.1.3">gawk</requirement> | 10 <requirement type="package" version="5.1.0">gawk</requirement> |
11 <requirement type="package" version="20170422">parallel</requirement> | 11 <requirement type="package" version="20211022">parallel</requirement> |
12 </expand> | 12 </expand> |
13 <command detect_errors="exit_code"><![CDATA[ | 13 <command detect_errors="exit_code"><![CDATA[ |
14 ##set up input files | 14 ##set up input files |
15 | 15 |
16 #set $reference_fasta_filename = "localref.fa" | 16 #set $reference_fasta_filename = "localref.fa" |
27 #else: | 27 #else: |
28 #set $input_bamfiles = [ $reference_source.batchmode.input_bams ] | 28 #set $input_bamfiles = [ $reference_source.batchmode.input_bams ] |
29 #end if | 29 #end if |
30 | 30 |
31 #for $bam_count, $input_bam in enumerate( $input_bamfiles ): | 31 #for $bam_count, $input_bam in enumerate( $input_bamfiles ): |
32 ln -s -f '${input_bam}' 'b_${bam_count}.bam' && | 32 #if $input_bam.ext == 'bam': |
33 ln -s -f '${input_bam.metadata.bam_index}' 'b_${bam_count}.bam.bai' && | 33 ln -s -f '${input_bam}' 'b_${bam_count}.bam' && |
34 ln -s -f '${input_bam.metadata.bam_index}' 'b_${bam_count}.bam.bai' && | |
35 #elif $input_bam.ext == 'cram': | |
36 ln -s -f '${input_bam}' 'b_${bam_count}.cram' && | |
37 ln -s -f '${input_bam.metadata.cram_index}' 'b_${bam_count}.cram.crai' && | |
38 #end if | |
34 #end for | 39 #end for |
35 | 40 |
36 ## Tabixize optional input_variant_vcf file (for --variant-input option) | 41 ## Tabixize optional input_variant_vcf file (for --variant-input option) |
37 #if ( str( $options_type.options_type_selector ) == 'cline' or str( $options_type.options_type_selector ) == 'full' ) and str( $options_type.optional_inputs.optional_inputs_selector ) == 'set' and str( $options_type.optional_inputs.input_variant_type.input_variant_type_selector ) == "provide_vcf": | 42 #if ( str( $options_type.options_type_selector ) == 'cline' or str( $options_type.options_type_selector ) == 'full' ) and str( $options_type.optional_inputs.optional_inputs_selector ) == 'set' and str( $options_type.optional_inputs.input_variant_type.input_variant_type_selector ) == "provide_vcf": |
38 ln -s -f '${options_type.optional_inputs.input_variant_type.input_variant_vcf}' input_variant_vcf.vcf.gz && | 43 ln -s -f '${options_type.optional_inputs.input_variant_type.input_variant_vcf}' input_variant_vcf.vcf.gz && |
45 #elif str( $target_limit_type.target_limit_type_selector ) == "limit_by_region": | 50 #elif str( $target_limit_type.target_limit_type_selector ) == "limit_by_region": |
46 printf '${target_limit_type.region_chromosome}\t${target_limit_type.region_start}\t${target_limit_type.region_end}' > regions_all.bed && | 51 printf '${target_limit_type.region_chromosome}\t${target_limit_type.region_start}\t${target_limit_type.region_end}' > regions_all.bed && |
47 #else | 52 #else |
48 ##divide up the regions in the bam file for efficient processing | 53 ##divide up the regions in the bam file for efficient processing |
49 #for $bam_count, $input_bam in enumerate( $input_bamfiles ): | 54 #for $bam_count, $input_bam in enumerate( $input_bamfiles ): |
50 samtools view -H b_${bam_count}.bam | | 55 samtools view -H b_${bam_count}.${input_bam.ext}| |
51 grep '^@SQ' | | 56 grep '^@SQ' | |
52 cut -f 2- | | 57 cut -f 2- | |
53 awk '{ gsub("^SN:","",$1); gsub("^LN:","",$2); print $1"\t0\t"$2; }' >> regions_all.bed && | 58 awk '{ gsub("^SN:","",$1); gsub("^LN:","",$2); print $1"\t0\t"$2; }' >> regions_all.bed && |
54 #end for | 59 #end for |
55 #end if | 60 #end if |
71 freebayes | 76 freebayes |
72 | 77 |
73 --region '\$i' | 78 --region '\$i' |
74 | 79 |
75 #for $bam_count, $input_bam in enumerate( $input_bamfiles ): | 80 #for $bam_count, $input_bam in enumerate( $input_bamfiles ): |
76 --bam 'b_${bam_count}.bam' | 81 --bam 'b_${bam_count}.${input_bam.ext}' |
77 #end for | 82 #end for |
78 --fasta-reference '${reference_fasta_filename}' | 83 --fasta-reference '${reference_fasta_filename}' |
79 | 84 |
80 ## Outputs | 85 ## Outputs |
81 --vcf './vcf_output/part_\$i.vcf' | 86 --vcf './vcf_output/part_\$i.vcf' |
133 --observation-bias '${options_type.optional_inputs.observation_bias}' | 138 --observation-bias '${options_type.optional_inputs.observation_bias}' |
134 #end if | 139 #end if |
135 #if $options_type.optional_inputs.contamination_estimates: | 140 #if $options_type.optional_inputs.contamination_estimates: |
136 --contamination-estimates '${options_type.optional_inputs.contamination_estimates}' | 141 --contamination-estimates '${options_type.optional_inputs.contamination_estimates}' |
137 #end if | 142 #end if |
143 $options_type.optional_inputs.trim_complex_tail | |
138 #end if | 144 #end if |
139 | 145 |
140 ## REPORTING | 146 ## REPORTING |
141 #if str( $options_type.reporting.reporting_selector ) == "set": | 147 #if str( $options_type.reporting.reporting_selector ) == "set": |
142 --pvar ${options_type.reporting.pvar} | 148 --pvar ${options_type.reporting.pvar} |
330 </param> | 336 </param> |
331 <when value="full"> | 337 <when value="full"> |
332 | 338 |
333 <conditional name="optional_inputs"> | 339 <conditional name="optional_inputs"> |
334 <param name="optional_inputs_selector" type="select" label="Additional inputs" | 340 <param name="optional_inputs_selector" type="select" label="Additional inputs" |
335 help="Sets --samples, --populations, --cnv-map, --trace, --failed-alleles, --variant-input, --only-use-input-alleles, --haplotype-basis-alleles, --report-all-haplotype-alleles, --report-monomorphic options, --observation-bias, and --contamination-estimates"> | 341 help="Sets --samples, --populations, --cnv-map, --trace, --failed-alleles, --variant-input, --only-use-input-alleles, --haplotype-basis-alleles, --report-all-haplotype-alleles, --report-monomorphic options, --observation-bias, --contamination-estimates and --trim-complex-tail"> |
336 <option value="do_not_set" selected="true">Do not provide additional inputs</option> | 342 <option value="do_not_set" selected="true">Do not provide additional inputs</option> |
337 <option value="set">Provide additional inputs</option> | 343 <option value="set">Provide additional inputs</option> |
338 </param> | 344 </param> |
339 <when value="set"> | 345 <when value="set"> |
340 <param name="output_failed_alleles_option" argument="--failed-alleles" type="boolean" truevalue="--failed-alleles" falsevalue="" checked="false" | 346 <param name="output_failed_alleles_option" argument="--failed-alleles" type="boolean" truevalue="--failed-alleles" falsevalue="" checked="false" |
373 label="Load read length-dependent allele observation biases from" | 379 label="Load read length-dependent allele observation biases from" |
374 help="The format is [length] [alignment efficiency relative to reference] where the efficiency is 1 if there is no relative observation bias" /> | 380 help="The format is [length] [alignment efficiency relative to reference] where the efficiency is 1 if there is no relative observation bias" /> |
375 <param name="contamination_estimates" argument="--contamination-estimates" type="data" format="tabular" optional="true" | 381 <param name="contamination_estimates" argument="--contamination-estimates" type="data" format="tabular" optional="true" |
376 label="Upload per-sample estimates of contamination from" | 382 label="Upload per-sample estimates of contamination from" |
377 help="The format should be: sample p(read=R|genotype=AR) p(read=A|genotype=AA) Sample '*' can be used to set default contamination estimates" /> | 383 help="The format should be: sample p(read=R|genotype=AR) p(read=A|genotype=AA) Sample '*' can be used to set default contamination estimates" /> |
384 <param name="trim_complex_tail" argument="--trim-complex-tail" type="boolean" truevalue="--trim-complex-tail" falsevalue="" | |
385 label="Trim trailing reference matches" /> | |
378 </when> | 386 </when> |
379 <when value="do_not_set" /> | 387 <when value="do_not_set" /> |
380 </conditional> | 388 </conditional> |
381 | 389 |
382 <!-- reporting --> | 390 <!-- reporting --> |
647 <param name="ref_file" ftype="fasta" value="freebayes-phix174.fasta"/> | 655 <param name="ref_file" ftype="fasta" value="freebayes-phix174.fasta"/> |
648 <param name="input_bams" ftype="bam" value="freebayes-phix174.bam"/> | 656 <param name="input_bams" ftype="bam" value="freebayes-phix174.bam"/> |
649 <param name="options_type_selector" value="full"/> | 657 <param name="options_type_selector" value="full"/> |
650 <param name="population_model_selector" value="set"/> | 658 <param name="population_model_selector" value="set"/> |
651 <param name="P" value="1"/> | 659 <param name="P" value="1"/> |
660 <param name="trim_complex_tail" value="--trim-complex-tail"/> | |
652 <output name="output_vcf" file="freebayes-phix174-test4.vcf" lines_diff="4" /> | 661 <output name="output_vcf" file="freebayes-phix174-test4.vcf" lines_diff="4" /> |
653 </test> | 662 </test> |
654 <test> | 663 <test> |
655 <param name="reference_source_selector" value="history" /> | 664 <param name="reference_source_selector" value="history" /> |
656 <param name="processmode" value="individual" /> | 665 <param name="processmode" value="individual" /> |
678 <param name="input_bams" ftype="bam" value="freebayes-hxb2.bam"/> | 687 <param name="input_bams" ftype="bam" value="freebayes-hxb2.bam"/> |
679 <param name="options_type_selector" value="simple"/> | 688 <param name="options_type_selector" value="simple"/> |
680 <param name="coverage_options_selector" value="set" /> | 689 <param name="coverage_options_selector" value="set" /> |
681 <param name="skip_coverage" value="100" /> | 690 <param name="skip_coverage" value="100" /> |
682 <output name="output_vcf" file="freebayes-hxb2-test7.vcf" lines_diff="4" /> | 691 <output name="output_vcf" file="freebayes-hxb2-test7.vcf" lines_diff="4" /> |
692 </test> | |
693 <test> <!-- Test with CRAM --> | |
694 <param name="reference_source_selector" value="history" /> | |
695 <param name="processmode" value="individual" /> | |
696 <param name="ref_file" ftype="fasta" value="freebayes-phix174.fasta"/> | |
697 <param name="input_bams" ftype="cram" value="freebayes-phix174.cram"/> | |
698 <param name="options_type_selector" value="simple"/> | |
699 <output name="output_vcf" file="freebayes-phix174-test1.vcf" lines_diff="4" /> | |
683 </test> | 700 </test> |
684 </tests> | 701 </tests> |
685 <help><![CDATA[ | 702 <help><![CDATA[ |
686 **What it does** | 703 **What it does** |
687 | 704 |