comparison bamleftalign.xml @ 0:e65540a91b87 draft default tip

Uploaded
author devteam
date Tue, 24 Jun 2014 11:53:09 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e65540a91b87
1 <?xml version="1.0"?>
2 <tool id="bamleftalign" name="BamLeftAlign" version="0.0.2">
3 <requirements>
4 <requirement type="package" version="freebayes-0.9.14_8a407cf5f4">freebayes</requirement>
5 <requirement type="package" version="0.1.18">samtools</requirement>
6 </requirements>
7 <description> indels in BAM datasets</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}" &amp;&amp;
13 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for leftalign" &gt;&amp;2 &amp;&amp;
14 #else:
15 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
16 #end if
17
18 ##finished setting up inputs
19
20 ##start leftalign commandline
21 samtools view -bh "${input_bam}" | bamleftalign
22 --fasta-reference "${reference_fasta_filename}"
23 -c
24 --max-iterations "${iterations}"
25 ##outputs
26 > "${output_bam}"
27 </command>
28 <inputs>
29 <conditional name="reference_source">
30 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
31 <option value="cached">Locally cached</option>
32 <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="sam_fa_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />
38 </param>
39 <param name="ref_file" type="select" label="Using reference genome">
40 <options from_data_table="sam_fa_indexes">
41 <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>-->
42 </options>
43 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
44 </param>
45 </when>
46 <when value="history"> <!-- FIX ME!!!! -->
47 <param name="input_bam" type="data" format="bam" label="BAM dataset to re-align" />
48 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
49 </when>
50 </conditional>
51 <param name="iterations" type="integer" size="3" value="5" label="Maximum number of iterations" help="Iterate the left-realignment no more than this many times" />
52 </inputs>
53 <outputs>
54 <data format="bam" name="output_bam" label="${tool.name} on ${on_string} (alignments)" />
55 </outputs>
56 <tests>
57 <test>
58 <param name="reference_source_selector" value="history" />
59 <param name="ref_file" ftype="fasta" value="leftalign.fa"/>
60 <param name="input_bam" ftype="bam" value="left-align-input.bam"/>
61 <param name="iterations" value="5"/>
62 <output name="output_bam" file="left-align-output.bam" />
63 </test>
64 </tests>
65 <stdio>
66 <exit_code range="1:" />
67 </stdio>
68 <help>
69
70 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.
71
72 This is leftalign utility from FreeBayes package developed and maintained by Erik Garrison (https://github.com/ekg/freebayes).
73
74 </help>
75 </tool>