annotate leftalign.xml @ 19:55c06df02168 draft

Uploaded
author devteam
date Thu, 05 Mar 2015 21:57:58 -0500
parents 6d9407020066
children 978760187fe2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
6d9407020066 Uploaded
devteam
parents:
diff changeset
1 <?xml version="1.0"?>
19
55c06df02168 Uploaded
devteam
parents: 16
diff changeset
2 <tool id="bamleftalign" name="BamLeftAlign" version="0.4">
16
6d9407020066 Uploaded
devteam
parents:
diff changeset
3 <requirements>
19
55c06df02168 Uploaded
devteam
parents: 16
diff changeset
4 <requirement type="package" version="0_9_20_b040236">freebayes</requirement>
16
6d9407020066 Uploaded
devteam
parents:
diff changeset
5 <requirement type="package" version="0.1.18">samtools</requirement>
6d9407020066 Uploaded
devteam
parents:
diff changeset
6 </requirements>
6d9407020066 Uploaded
devteam
parents:
diff changeset
7 <description> indels in BAM datasets</description>
6d9407020066 Uploaded
devteam
parents:
diff changeset
8 <command>
6d9407020066 Uploaded
devteam
parents:
diff changeset
9 ##set up input files
6d9407020066 Uploaded
devteam
parents:
diff changeset
10 #set $reference_fasta_filename = "localref.fa"
6d9407020066 Uploaded
devteam
parents:
diff changeset
11 #if str( $reference_source.reference_source_selector ) == "history":
6d9407020066 Uploaded
devteam
parents:
diff changeset
12 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
6d9407020066 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;
6d9407020066 Uploaded
devteam
parents:
diff changeset
14 #else:
6d9407020066 Uploaded
devteam
parents:
diff changeset
15 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
6d9407020066 Uploaded
devteam
parents:
diff changeset
16 #end if
6d9407020066 Uploaded
devteam
parents:
diff changeset
17
6d9407020066 Uploaded
devteam
parents:
diff changeset
18 ##finished setting up inputs
6d9407020066 Uploaded
devteam
parents:
diff changeset
19
6d9407020066 Uploaded
devteam
parents:
diff changeset
20 ##start leftalign commandline
6d9407020066 Uploaded
devteam
parents:
diff changeset
21 samtools view -bh "${input_bam}" | bamleftalign
6d9407020066 Uploaded
devteam
parents:
diff changeset
22 --fasta-reference "${reference_fasta_filename}"
6d9407020066 Uploaded
devteam
parents:
diff changeset
23 -c
6d9407020066 Uploaded
devteam
parents:
diff changeset
24 --max-iterations "${iterations}"
6d9407020066 Uploaded
devteam
parents:
diff changeset
25 ##outputs
6d9407020066 Uploaded
devteam
parents:
diff changeset
26 > "${output_bam}"
6d9407020066 Uploaded
devteam
parents:
diff changeset
27 </command>
6d9407020066 Uploaded
devteam
parents:
diff changeset
28 <inputs>
6d9407020066 Uploaded
devteam
parents:
diff changeset
29 <conditional name="reference_source">
6d9407020066 Uploaded
devteam
parents:
diff changeset
30 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
6d9407020066 Uploaded
devteam
parents:
diff changeset
31 <option value="cached">Locally cached</option>
6d9407020066 Uploaded
devteam
parents:
diff changeset
32 <option value="history">History</option>
6d9407020066 Uploaded
devteam
parents:
diff changeset
33 </param>
6d9407020066 Uploaded
devteam
parents:
diff changeset
34 <when value="cached">
6d9407020066 Uploaded
devteam
parents:
diff changeset
35 <param name="input_bam" type="data" format="bam" label="Select BAM dataset to leftalign">
6d9407020066 Uploaded
devteam
parents:
diff changeset
36 <validator type="unspecified_build" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
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." />
6d9407020066 Uploaded
devteam
parents:
diff changeset
38 </param>
6d9407020066 Uploaded
devteam
parents:
diff changeset
39 <param name="ref_file" type="select" label="Using reference genome">
6d9407020066 Uploaded
devteam
parents:
diff changeset
40 <options from_data_table="fasta_indexes"></options>
6d9407020066 Uploaded
devteam
parents:
diff changeset
41 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
6d9407020066 Uploaded
devteam
parents:
diff changeset
42 </param>
6d9407020066 Uploaded
devteam
parents:
diff changeset
43 </when>
6d9407020066 Uploaded
devteam
parents:
diff changeset
44 <when value="history">
6d9407020066 Uploaded
devteam
parents:
diff changeset
45 <param name="input_bam" type="data" format="bam" label="BAM dataset to re-align" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
46 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
47 </when>
6d9407020066 Uploaded
devteam
parents:
diff changeset
48 </conditional>
6d9407020066 Uploaded
devteam
parents:
diff changeset
49 <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" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
50 </inputs>
6d9407020066 Uploaded
devteam
parents:
diff changeset
51 <outputs>
6d9407020066 Uploaded
devteam
parents:
diff changeset
52 <data format="bam" name="output_bam" label="${tool.name} on ${on_string} (alignments)" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
53 </outputs>
6d9407020066 Uploaded
devteam
parents:
diff changeset
54 <tests>
6d9407020066 Uploaded
devteam
parents:
diff changeset
55 <test>
6d9407020066 Uploaded
devteam
parents:
diff changeset
56 <param name="reference_source_selector" value="history" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
57 <param name="ref_file" ftype="fasta" value="leftalign.fa"/>
6d9407020066 Uploaded
devteam
parents:
diff changeset
58 <param name="input_bam" ftype="bam" value="left-align-input.bam"/>
6d9407020066 Uploaded
devteam
parents:
diff changeset
59 <param name="iterations" value="5"/>
6d9407020066 Uploaded
devteam
parents:
diff changeset
60 <output name="output_bam" file="left-align-output.bam" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
61 </test>
6d9407020066 Uploaded
devteam
parents:
diff changeset
62 </tests>
6d9407020066 Uploaded
devteam
parents:
diff changeset
63 <stdio>
6d9407020066 Uploaded
devteam
parents:
diff changeset
64 <exit_code range="1:" />
6d9407020066 Uploaded
devteam
parents:
diff changeset
65 </stdio>
6d9407020066 Uploaded
devteam
parents:
diff changeset
66 <help>
6d9407020066 Uploaded
devteam
parents:
diff changeset
67
6d9407020066 Uploaded
devteam
parents:
diff changeset
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.
6d9407020066 Uploaded
devteam
parents:
diff changeset
69
6d9407020066 Uploaded
devteam
parents:
diff changeset
70 This is leftalign utility from FreeBayes package developed and maintained by Erik Garrison (https://github.com/ekg/freebayes).
6d9407020066 Uploaded
devteam
parents:
diff changeset
71 </help>
6d9407020066 Uploaded
devteam
parents:
diff changeset
72
6d9407020066 Uploaded
devteam
parents:
diff changeset
73 <citations>
6d9407020066 Uploaded
devteam
parents:
diff changeset
74 <citation type="bibtex">
6d9407020066 Uploaded
devteam
parents:
diff changeset
75 @misc{1207.3907,
6d9407020066 Uploaded
devteam
parents:
diff changeset
76 Author = {Erik Garrison},
6d9407020066 Uploaded
devteam
parents:
diff changeset
77 Title = {Haplotype-based variant detection from short-read sequencing},
6d9407020066 Uploaded
devteam
parents:
diff changeset
78 Year = {2012},
6d9407020066 Uploaded
devteam
parents:
diff changeset
79 Eprint = {arXiv:1207.3907},
6d9407020066 Uploaded
devteam
parents:
diff changeset
80 url = {http://arxiv.org/abs/1207.3907}
6d9407020066 Uploaded
devteam
parents:
diff changeset
81 }
6d9407020066 Uploaded
devteam
parents:
diff changeset
82 </citation>
6d9407020066 Uploaded
devteam
parents:
diff changeset
83 </citations>
6d9407020066 Uploaded
devteam
parents:
diff changeset
84
6d9407020066 Uploaded
devteam
parents:
diff changeset
85 </tool>