annotate bamedit.xml @ 15:eb166cebbe3c draft default tip

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