comparison leftalign.xml @ 23:52aed7d9ed2b draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/freebayes commit cf4a70e780f104bc724323912b3b87fb37f887dd
author devteam
date Sun, 25 Sep 2016 09:48:24 -0400
parents 978760187fe2
children bf27106652f3
comparison
equal deleted inserted replaced
22:99684adf84de 23:52aed7d9ed2b
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bamleftalign" name="BamLeftAlign" version="0.4"> 2 <tool id="bamleftalign" name="BamLeftAlign" version="1.0.2.29">
3 <requirements> 3 <description> indels in BAM datasets</description>
4 <requirement type="package" version="0_9_20_b040236">freebayes</requirement> 4 <requirements>
5 <requirement type="package" version="0.1.18">samtools</requirement> 5 <requirement type="package" version="1.0.2.29">freebayes</requirement>
6 </requirements> 6 <requirement type="package" version="0.1.19">samtools</requirement>
7 <description> indels in BAM datasets</description> 7 </requirements>
8 <command> 8 <stdio>
9 ##set up input files 9 <exit_code range="1:" />
10 #set $reference_fasta_filename = "localref.fa" 10 </stdio>
11 #if str( $reference_source.reference_source_selector ) == "history": 11 <command>
12 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp; 12 ##set up input files
13 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for leftalign" &gt;&amp;2 &amp;&amp; 13 #set $reference_fasta_filename = "localref.fa"
14 #else: 14 #if str( $reference_source.reference_source_selector ) == "history":
15 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) 15 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
16 #end if 16 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for leftalign" &gt;&amp;2 &amp;&amp;
17 #else:
18 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
19 #end if
17 20
18 ##finished setting up inputs 21 ##finished setting up inputs
19 22
20 ##start leftalign commandline 23 ##start leftalign commandline
21 samtools view -bh "${input_bam}" | bamleftalign 24 samtools view -bh "${input_bam}" | bamleftalign
22 --fasta-reference "${reference_fasta_filename}" 25 --fasta-reference "${reference_fasta_filename}"
23 -c 26 -c
24 --max-iterations "${iterations}" 27 --max-iterations "${iterations}"
25 ##outputs 28 ##outputs
26 > "${output_bam}" 29 > "${output_bam}"
27 </command> 30 </command>
28 <inputs> 31 <inputs>
29 <conditional name="reference_source"> 32 <conditional name="reference_source">
30 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> 33 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
31 <option value="cached">Locally cached</option> 34 <option value="cached">Locally cached</option>
32 <option value="history">History</option> 35 <option value="history">History</option>
33 </param>
34 <when value="cached">
35 <param name="input_bam" type="data" format="bam" label="Select BAM dataset to leftalign">
36 <validator type="unspecified_build" />
37 <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />
38 </param> 36 </param>
39 <param name="ref_file" type="select" label="Using reference genome"> 37 <when value="cached">
40 <options from_data_table="fasta_indexes"></options> 38 <param name="input_bam" type="data" format="bam" label="Select BAM dataset to leftalign">
41 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> 39 <validator type="unspecified_build" />
42 </param> 40 <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />
43 </when> 41 </param>
44 <when value="history"> 42 <param name="ref_file" type="select" label="Using reference genome">
45 <param name="input_bam" type="data" format="bam" label="BAM dataset to re-align" /> 43 <options from_data_table="fasta_indexes"></options>
46 <param name="ref_file" type="data" format="fasta" label="Using reference file" /> 44 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
47 </when> 45 </param>
48 </conditional> 46 </when>
49 <param name="iterations" type="integer" value="5" label="Maximum number of iterations" help="Iterate the left-realignment no more than this many times" /> 47 <when value="history">
50 </inputs> 48 <param name="input_bam" type="data" format="bam" label="BAM dataset to re-align" />
51 <outputs> 49 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
52 <data format="bam" name="output_bam" label="${tool.name} on ${on_string} (alignments)" /> 50 </when>
53 </outputs> 51 </conditional>
54 <tests> 52 <param name="iterations" type="integer" value="5" label="Maximum number of iterations" help="Iterate the left-realignment no more than this many times" />
55 <test> 53 </inputs>
56 <param name="reference_source_selector" value="history" /> 54 <outputs>
57 <param name="ref_file" ftype="fasta" value="leftalign.fa"/> 55 <data format="bam" name="output_bam" label="${tool.name} on ${on_string} (alignments)" />
58 <param name="input_bam" ftype="bam" value="left-align-input.bam"/> 56 </outputs>
59 <param name="iterations" value="5"/> 57 <tests>
60 <output name="output_bam" file="left-align-output.bam" /> 58 <test>
61 </test> 59 <param name="reference_source_selector" value="history" />
62 </tests> 60 <param name="ref_file" ftype="fasta" value="leftalign.fa"/>
63 <stdio> 61 <param name="input_bam" ftype="bam" value="left-align-input.bam"/>
64 <exit_code range="1:" /> 62 <param name="iterations" value="5"/>
65 </stdio> 63 <output name="output_bam" file="left-align-output.bam" />
66 <help> 64 </test>
65 </tests>
66 <help>
67 67
68 When calling indels, it is important to homogenize the positional distribution of insertions and deletions in the input by using left realignment. Left realignment will place all indels in homopolymer and microsatellite repeats at the same position, provided that doing so does not introduce mismatches between the read and reference other than the indel. This method is computationally inexpensive and handles the most common classes of alignment inconsistency. 68 When calling indels, it is important to homogenize the positional distribution of insertions and deletions in the input by using left realignment. Left realignment will place all indels in homopolymer and microsatellite repeats at the same position, provided that doing so does not introduce mismatches between the read and reference other than the indel. This method is computationally inexpensive and handles the most common classes of alignment inconsistency.
69 69
70 This is leftalign utility from FreeBayes package developed and maintained by Erik Garrison (https://github.com/ekg/freebayes). 70 This is leftalign utility from FreeBayes package developed and maintained by Erik Garrison (https://github.com/ekg/freebayes).
71 </help> 71 </help>
72 72 <citations>
73 <citations> 73 <citation type="bibtex">
74 <citation type="bibtex"> 74 @misc{1207.3907,
75 @misc{1207.3907, 75 Author = {Erik Garrison},
76 Author = {Erik Garrison}, 76 Title = {Haplotype-based variant detection from short-read sequencing},
77 Title = {Haplotype-based variant detection from short-read sequencing}, 77 Year = {2012},
78 Year = {2012}, 78 Eprint = {arXiv:1207.3907},
79 Eprint = {arXiv:1207.3907}, 79 url = {http://arxiv.org/abs/1207.3907}
80 url = {http://arxiv.org/abs/1207.3907} 80 }
81 } 81 </citation>
82 </citation> 82 </citations>
83 </citations>
84
85 </tool> 83 </tool>