annotate bamedit.xml @ 4:a4b7eb9c87d9 draft

Uploaded
author modencode-dcc
date Fri, 18 Jan 2013 10:59:13 -0500
parents bbe14234ccdb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
1 <!--
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
2 purpose: xml file for BAMEdit tool
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
3 author: Ziru Zhou
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
4 date: October, 2012
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
5 -->
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
6 <tool id="BAM_Editor" name="BAMEdit" version="1.1.0">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
7 <requirements>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
8 <requirement type="package" version="0.1.12">samtools</requirement>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
9 </requirements>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
10 <description>Merging, splitting, filtering, and QC of BAM files</description>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
11 <command interpreter="python">bamedit.py $options_file </command>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
12 <inputs>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
13 <conditional name="input_type">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
14 <param name="input_type_selector" type="select" label="Select your BAM command">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
15 <option value="merge">Merge BAM files</option>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
16 <option value="split">Split BAM file</option>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
17 <option value="filter">Filter BAM file</option>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
18 <option value="pileup">Calculate coverage QC</option>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
19 </param>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
20
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
21 <when value="merge">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
22 <param format="bam" name="input1" type="data" label="Select your first input BAM file"/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
23 <param format="bam" name="input2" type="data" label="Select your second input BAM file"/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
24 <param format="bam" name="input3" type="data" optional="True" label="Select your third input BAM file (optional)" help="Optional third BAM file to be merged."/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
25 </when>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
26
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
27 <when value="split">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
28 <param format="bam" name="input1" type="data" label="Select your input BAM file"/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
29 </when>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
30
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
31 <when value="filter">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
32 <param format="bam" name="input1" type="data" label="Select your input BAM file"/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
33 <param name="quality" type="integer" min="1" value="1" label="Minimum Mapping Quality (MMQ)" help="Quality filter should be 1 or higher."/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
34 </when>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
35
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
36 <when value="pileup">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
37 <param format="bam" name="input1" type="data" label="Select your input BAM file"/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
38 <param format="fasta" name="input2" type="data" label="Select your fasta reference file"/>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
39 <!--<param name="outopt" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Alternatative output format" help="format: BAM_FILE, REFERENCE_FILE, GENOME_COVERAGE_PERCENTAGE, AVERAGE_COVERAGE_OF_BASES_COVERED"/>-->
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
40 </when>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
41 </conditional>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
42
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
43 <!--<param name="output_name" type="text" value="output" size="30" label="Output file name"/>-->
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
44 </inputs>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
45
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
46 <outputs>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
47 <data format="bam" name="bamoutm" label="${tool.name}: merge on ${on_string}">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
48 <filter>input_type['input_type_selector'] == 'merge'</filter>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
49 </data>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
50 <data format="bam" name="bamoutf" label="${tool.name}: filter on ${on_string}">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
51 <filter> input_type['input_type_selector'] == 'filter'</filter>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
52 </data>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
53 <data format="bam" name="bamouts1" label="${tool.name}: split on ${on_string} (part 1)">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
54 <filter>input_type['input_type_selector'] == 'split'</filter>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
55 </data>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
56 <data format="bam" name="bamouts2" label="${tool.name}: split on ${on_string} (part2)">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
57 <filter>input_type['input_type_selector'] == 'split'</filter>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
58 </data>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
59 <data format="txt" name="bamoutp" label="${tool.name}: pileup on ${on_string}">
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
60 <filter>input_type['input_type_selector'] == 'pileup'</filter>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
61 </data>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
62 </outputs>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
63
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
64 <configfiles>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
65 <configfile name="options_file">&lt;%
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
66 import simplejson
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
67 %&gt;
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
68 #if str($input_type.input_type_selector) == 'merge':
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
69 #if str($input_type.input3) != 'None':
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
70 #set $__options = { 'action':str("merge"), 'bamout':str($bamoutm), 'input1':str($input1), 'input2':str($input2), 'input3':str($input3) }
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
71 #else:
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
72 #set $__options = { 'action':str("merge"), 'bamout':str($bamoutm), 'input1':str($input1), 'input2':str($input2) }
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
73 #end if
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
74 #end if
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
75 #if str($input_type.input_type_selector) == 'split':
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
76 #set $__options = { 'action':str("split"), 'bamout':str($bamouts1), 'bamout2':str($bamouts2), 'input1':str($input1) }
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
77 #end if
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
78 #if str($input_type.input_type_selector) == 'filter':
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
79 #set $__options = { 'action':str("filter"), 'bamout':str($bamoutf), 'input1':str($input1), 'quality':int($input_type.quality) }
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
80 #end if
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
81 #if str($input_type.input_type_selector) == 'pileup':
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
82 #set $__options = { 'action':str("pileup"), 'bamout':str($bamoutp), 'input1':str($input1), 'input2':str($input2), 'bamname':str($input1.name), 'refname':str($input2.name) }
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
83 #end if
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
84 ${ simplejson.dumps( __options )}
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
85 </configfile>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
86 </configfiles>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
87 <tests>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
88 <test>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
89 <!--none -->
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
90 </test>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
91 </tests>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
92
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
93 <help>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
94 **What it does**
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
95
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
96 Simple interface to manipulate BAM files through the use of SAMtools.
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
97
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
98 View the original SAMtools documentation: http://samtools.sourceforge.net/
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
99
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
100 ------
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
101
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
102 **Usage**
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
103
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
104 **Merge BAM files**: Merges 2 or 3 input BAM files into a single BAM file.
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
105
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
106 **Split BAM file**: Randomly split input BAM file into 2 BAM files.
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
107
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
108 **Filter BAM file**: Removes aligned reads from input BAM files with mapping quality lower than entered Minimum Mapping Quality (MMQ) value.
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
109
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
110 **Calculate coverage QC**: Calculates QC metrics such as percentage of genome covered and average coverage of bases covered for the input BAM and reference files.
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
111
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
112
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
113 ------
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
114
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
115 **Citation**
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
116
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
117 Li H.*, Handsaker B.*, Wysoker A., Fennell T., Ruan J., Homer N., Marth G., Abecasis G., Durbin R. and 1000 Genome Project Data Processing Subgroup (2009) The Sequence alignment/map (SAM) format and SAMtools. Bioinformatics, 25, 2078-9. [PMID: 19505943]
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
118
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
119 Written by Ziru Zhou ( ziruzhou@gmail.com ). Please send your comments/questions to modENCODE DCC at help@modencode.org.
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
120
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
121 </help>
bbe14234ccdb Uploaded
modencode-dcc
parents:
diff changeset
122 </tool>