annotate bamleftalign.xml @ 0:e65540a91b87 draft default tip

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