annotate bowtie2_wrapper.xml @ 0:a03a7ee6cdff draft

Imported from capsule None
author devteam
date Thu, 23 Jan 2014 12:30:45 -0500
parents
children aceaf1d94d2d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
1 <tool id="bowtie2" name="Bowtie2" version="0.2">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
2 <!-- Wrapper compatible with Bowtie version 2.0.0 -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
3 <description>is a short-read aligner</description>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
4 <version_command>bowtie2 --version</version_command>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
5 <requirements>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
6 <requirement type="package" version="2.1.0">bowtie2</requirement>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
7 <requirement type="package" version="0.1.18">samtools</requirement>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
8 </requirements>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
9
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
10 <command>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
11 ## prepare bowtie2 index
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
12 #set index_path = ''
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
13 #if str($reference_genome.source) == "history":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
14 bowtie2-build "$reference_genome.own_file" genome; ln -s "$reference_genome.own_file" genome.fa;
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
15 #set index_path = 'genome'
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
16 #else:
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
17 #set index_path = $reference_genome.index.fields.path
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
18 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
19
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
20 ## execute bowtie2
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
21 bowtie2
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
22
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
23 ## number of threads
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
24 -p \${GALAXY_SLOTS:-4}
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
25
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
26 ## index file path
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
27 -x $index_path
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
28
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
29 ## check for single/pair-end
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
30 #if str( $library.type ) == "single"
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
31 ## prepare inputs
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
32 -U $library.input_1
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
33
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
34 #if $output_unaligned_reads_l
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
35 --un $output_unaligned_reads_l
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
36 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
37 #else
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
38 ## prepare inputs
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
39 -1 $library.input_1
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
40 -2 $library.input_2
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
41 -I $library.min_insert
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
42 -X $library.max_insert
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
43
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
44 #if $output_unaligned_reads_l
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
45 --un-conc $output_unaligned_reads_l
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
46 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
47 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
48
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
49 ## configure settings
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
50 #if str($params.full) == "yes":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
51 ## add alignment type
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
52 $params.align_type
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
53
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
54 ## add performance
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
55 $params.performance
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
56
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
57 ## add time flag
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
58 $params.time
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
59
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
60 ## add nofw/norc
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
61 $params.nofw_norc
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
62
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
63 ## set gbar
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
64 --gbar $params.gbar
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
65
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
66 ## check skip
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
67 #if str($params.skip) != "0":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
68 -s $params.skip
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
69 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
70
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
71 ## check upto
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
72 #if str($params.upto) != "0":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
73 -u $params.upto
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
74 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
75
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
76 ## check trim5
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
77 #if str($params.trim5) != "0":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
78 -5 $params.trim5
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
79 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
80
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
81 ## check trim3
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
82 #if str($params.trim3) != "0":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
83 -3 $params.trim3
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
84 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
85 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
86
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
87 ## read group information
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
88 #if str($read_group.selection) == "yes":
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
89 #if $read_group.rgid and $read_group.rglb and $read_group.rgpl and $read_group.rgsm:
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
90 --rg-id "$read_group.rgid"
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
91 --rg "LB:$read_group.rglb"
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
92 --rg "PL:$read_group.rgpl"
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
93 --rg "SM:$read_group.rgsm"
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
94 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
95 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
96
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
97 ## view/sort and output file
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
98 | samtools view -Su - | samtools sort -o - - > $output
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
99
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
100 ## rename unaligned sequence files
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
101 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r:
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
102 #set left = str($output_unaligned_reads_l).replace( '.dat', '.1.dat' )
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
103 #set right = str($output_unaligned_reads_l).replace( '.dat', '.2.dat' )
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
104
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
105 ; mv $left $output_unaligned_reads_l;
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
106 mv $right $output_unaligned_reads_r
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
107 #end if
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
108 </command>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
109
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
110 <!-- basic error handling -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
111 <stdio>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
112 <exit_code range="1:" level="fatal" description="Tool exception" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
113 </stdio>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
114
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
115 <inputs>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
116 <!-- single/paired -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
117 <conditional name="library">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
118 <param name="type" type="select" label="Is this library mate-paired?">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
119 <option value="single">Single-end</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
120 <option value="paired">Paired-end</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
121 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
122 <when value="single">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
123 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
124 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
125 <when value="paired">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
126 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
127 <param name="input_2" format="fastqsanger" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
128 <param name="min_insert" type="integer" value="0" label="Minimum insert size for valid paired-end alignments" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
129 <param name="max_insert" type="integer" value="250" label="Maximum insert size for valid paired-end alignments" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
130 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
131 </conditional>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
132
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
133 <!-- unaligned file -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
134 <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads to separate file(s)" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
135
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
136 <!-- reference genome -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
137 <conditional name="reference_genome">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
138 <param name="source" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
139 <option value="indexed">Use a built-in index</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
140 <option value="history">Use one from the history</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
141 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
142 <when value="indexed">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
143 <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
144 <options from_data_table="bowtie2_indexes">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
145 <filter type="sort_by" column="2"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
146 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
147 </options>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
148 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
149 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
150 <when value="history">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
151 <param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
152 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
153 </conditional>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
154
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
155 <!-- group settings -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
156 <conditional name="read_group">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
157 <param name="selection" type="select" label="Specify the read group for this file?">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
158 <option value="yes">Yes</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
159 <option value="no" selected="True">No</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
160 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
161 <when value="yes">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
162 <param name="rgid" type="text" size="25" label="Read group identifier (ID). Each @RG line must have a unique ID. The value of ID is used in the RG tags of alignment records. Must be unique among all read groups in header section." help="Required if RG specified. Read group IDs may be modified when merging SAM files in order to handle collisions." />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
163 <param name="rglb" type="text" size="25" label="Library name (LB)" help="Required if RG specified" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
164 <param name="rgpl" type="text" size="25" label="Platform/technology used to produce the reads (PL)" help="Required if RG specified. Valid values : CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT and PACBIO" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
165 <param name="rgsm" type="text" size="25" label="Sample (SM)" help="Required if RG specified. Use pool name where a pool is being sequenced" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
166 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
167 <when value="no" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
168 </conditional>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
169
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
170 <!-- full/advanced params. -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
171 <conditional name="params">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
172 <param name="full" type="select" label="Parameter Settings" help="You can use the default settings or set custom values for any of Bowtie's parameters.">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
173 <option value="no">Use defaults</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
174 <option value="yes">Full parameter list</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
175 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
176 <when value="yes">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
177 <param name="align_type" type="select" label="Type of alignment">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
178 <option value="" selected="true">End to end</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
179 <option value="--local">Local</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
180 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
181
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
182 <param name="performance" type="select" label="Preset option">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
183 <option value="">Default</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
184 <option value="--very-fast">Very fast</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
185 <option value="--fast">Fast</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
186 <option value="--sensitive" selected="true">Sensitive</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
187 <option value="--very-sensitive">Very sensitive</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
188 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
189
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
190 <param name="gbar" type="integer" value="4" label="Disallow gaps within n-positions of read" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
191
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
192 <param name="trim5" type="integer" value="0" label="Trim n-bases from 5' of each read" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
193
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
194 <param name="trim3" type="integer" value="0" label="Trim n-bases from 3' of each read" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
195
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
196 <param name="skip" type="integer" value="0" label="Skip the first n-reads" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
197
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
198 <param name="upto" type="integer" value="0" label="Number of reads to be aligned (0 = unlimited)" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
199
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
200 <param name="nofw_norc" type="select" label="Strand directions">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
201 <option value="">Both</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
202 <option value="--nofw">Disable forward</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
203 <option value="--norc">Disable reverse</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
204 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
205
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
206 <param name="time" type="select" label="Log mapping time">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
207 <option value="">No</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
208 <option value="--time">Yes</option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
209 </param>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
210
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
211 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
212 <when value="no" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
213 </conditional>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
214
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
215 </inputs>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
216
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
217 <!-- define outputs -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
218 <outputs>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
219 <data format="fastqsanger" name="output_unaligned_reads_l" label="${tool.name} on ${on_string}: unaligned reads (L)" >
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
220 <filter>unaligned_file is True</filter>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
221 <actions>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
222 <action type="format">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
223 <option type="from_param" name="library.input_1" param_attribute="ext" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
224 </action>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
225 </actions>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
226 </data>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
227 <data format="fastqsanger" name="output_unaligned_reads_r" label="${tool.name} on ${on_string}: unaligned reads (R)">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
228 <filter>library['type'] == "paired" and unaligned_file is True</filter>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
229 <actions>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
230 <action type="format">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
231 <option type="from_param" name="library.input_1" param_attribute="ext" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
232 </action>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
233 </actions>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
234 </data>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
235 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
236 <actions>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
237 <conditional name="reference_genome.source">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
238 <when value="indexed">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
239 <action type="metadata" name="dbkey">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
240 <option type="from_data_table" name="bowtie2_indexes" column="1" offset="0">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
241 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
242 <filter type="param_value" ref="reference_genome.index" column="0"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
243 </option>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
244 </action>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
245 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
246 <when value="history">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
247 <action type="metadata" name="dbkey">
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
248 <option type="from_param" name="reference_genome.own_file" param_attribute="dbkey" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
249 </action>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
250 </when>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
251 </conditional>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
252 </actions>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
253 </data>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
254 </outputs>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
255
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
256 <tests>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
257 <test>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
258 <!-- basic test on single paired default run -->
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
259 <param name="type" value="single"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
260 <param name="selection" value="no"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
261 <param name="full" value="no"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
262 <param name="unaligned_file" value="false"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
263 <param name="source" value="history" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
264 <param name="input_1" value="bowtie2/phix_reads.fastq" ftype="fastqsanger"/>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
265 <param name="own_file" value="bowtie2/phix_genome.fasta" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
266 <output name="output" file="bowtie2/phix_mapped.bam" />
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
267 </test>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
268 </tests>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
269
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
270 <help>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
271 **Bowtie2 Overview**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
272
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
273 Bowtie_ is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters to relatively long (e.g. mammalian) genomes. Bowtie 2 supports gapped, local, and paired-end alignment modes. Bowtie 2 outputs alignments in SAM format, enabling interoperation with a large number of other tools.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
274
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
275 *Please cite:* Langmead, B., Trapnell, C., Pop, M. and Salzberg, S.L. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25 (2009)
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
276
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
277 .. _Bowtie: http://bowtie-bio.sourceforge.net/bowtie2/
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
278
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
279 ------
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
280
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
281 **Inputs**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
282
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
283 Bowtie 2 accepts files in Sanger FASTQ format (single or pair-end). Use the FASTQ Groomer to prepare your files.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
284
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
285 ------
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
286
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
287 **Outputs**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
288
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
289 The mapped sequence reads are provided as BAM file, while unmapped reads are optionally available as SAM records. When Bowtie 2 finishes running, it prints messages summarizing what happened. These messages are printed to the "standard error" ("stderr") filehandle. For datasets consisting of unpaired reads, the summary might look like this::
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
290
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
291 20000 reads; of these:
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
292 20000 (100.00%) were unpaired; of these:
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
293 1247 (6.24%) aligned 0 times
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
294 18739 (93.69%) aligned exactly 1 time
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
295 14 (0.07%) aligned >1 times
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
296 93.77% overall alignment rate
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
297
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
298 ------
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
299
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
300 **Alignment options**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
301
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
302 *--end-to-end/--local*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
303
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
304 By default, Bowtie 2 performs end-to-end read alignment. That is, it searches for alignments involving all of the read characters. This is also called an "untrimmed" or "unclipped" alignment. When the --local option is specified, Bowtie 2 performs local read alignment. In this mode, Bowtie 2 might "trim" or "clip" some read characters from one or both ends of the alignment if doing so maximizes the alignment score.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
305
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
306 End-to-end alignment example::
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
307
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
308 Read GACTGGGCGATCTCGACTTCG
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
309 ||||| ||||||||||||||
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
310 Reference GACTG--CGATCTCGACATCG
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
311
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
312 Local alignment example::
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
313
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
314 Read ACGGTTGCGTTAA-TCCGCCACG
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
315 ||||||||| ||||||
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
316 Reference TAACTTGCGTTAAATCCGCCTGG
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
317
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
318 *-s/--skip (default: 0)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
319
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
320 Skip (i.e. do not align) the first n-reads or pairs in the input.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
321
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
322 *-u/--qupto (default: no limit)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
323
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
324 Align the first n-reads or read pairs from the input (after the -s/--skip reads or pairs have been skipped), then stop.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
325
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
326 *-5/--trim5 (default: 0)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
327
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
328 Trim n-bases from 5' (left) end of each read before alignment.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
329
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
330 *-3/--trim3 (default: 0)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
331
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
332 Trim n-bases from 3' (right) end of each read before alignment.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
333
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
334 *--nofw/--norc (default: both strands enabled)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
335
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
336 If --nofw is specified, Bowtie 2 will not attempt to align unpaired reads to the forward (Watson) reference strand. If --norc is specified, bowtie2 will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, --nofw and --norc pertain to the fragments; i.e. specifying --nofw causes Bowtie 2 to explore only those paired-end configurations corresponding to fragments from the reverse-complement (Crick) strand. Default: both strands enabled.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
337
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
338 *--gbar (default: 4)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
339
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
340 Disallow gaps within n-positions of the beginning or end of the read.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
341
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
342 ------
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
343
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
344 **Paired-end options**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
345
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
346 *-I/--minins (default: 0)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
347
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
348 The minimum fragment length for valid paired-end alignments. E.g. if -I 60 is specified and a paired-end alignment consists of two 20-bp alignments in the appropriate orientation with a 20-bp gap between them, that alignment is considered valid (as long as -X is also satisfied). A 19-bp gap would not be valid in that case. If trimming options -3 or -5 are also used, the -I constraint is applied with respect to the untrimmed mates.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
349
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
350 The larger the difference between -I and -X, the slower Bowtie 2 will run. This is because larger differences bewteen -I and -X require that Bowtie 2 scan a larger window to determine if a concordant alignment exists. For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very efficient.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
351
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
352 *-X/--maxins (default: 0)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
353
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
354 The maximum fragment length for valid paired-end alignments. E.g. if -X 100 is specified and a paired-end alignment consists of two 20-bp alignments in the proper orientation with a 60-bp gap between them, that alignment is considered valid (as long as -I is also satisfied). A 61-bp gap would not be valid in that case. If trimming options -3 or -5 are also used, the -X constraint is applied with respect to the untrimmed mates, not the trimmed mates.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
355
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
356 The larger the difference between -I and -X, the slower Bowtie 2 will run. This is because larger differences bewteen -I and -X require that Bowtie 2 scan a larger window to determine if a concordant alignment exists. For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very efficient.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
357
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
358 ------
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
359
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
360 **SAM options**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
361
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
362 *--rg-id [text]*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
363
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
364 Set the read group ID to [text]. This causes the SAM @RG header line to be printed, with [text] as the value associated with the ID: tag. It also causes the RG:Z: extra field to be attached to each SAM output record, with value set to [text].
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
365
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
366 *--rg [text]*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
367
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
368 Add [text] as a field on the @RG header line. Note: in order for the @RG line to appear, --rg-id must also be specified. This is because the ID tag is required by the SAM Spec. Specify --rg multiple times to set multiple fields. See the SAM Spec for details about what fields are legal.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
369
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
370 ------
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
371
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
372 **Output options**
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
373
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
374 *--un/--un-conc*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
375
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
376 Write reads that fail to align concordantly to file(s). These reads correspond to the SAM records.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
377
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
378 *-t/--time (default: off)*
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
379
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
380 Print the wall-clock time required to load the index files and align the reads. This is printed to the "standard error" ("stderr") filehandle.
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
381
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
382 </help>
a03a7ee6cdff Imported from capsule None
devteam
parents:
diff changeset
383 </tool>