annotate bamedit.xml @ 2:5f4cb6ee3427 draft

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