annotate bowtie2_wrapper.xml @ 0:96d2e31a3938

Imported from capsule None
author devteam
date Mon, 27 Jan 2014 09:25:15 -0500
parents
children c1ec08cb34f9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
1 <tool id="bowtie2" name="Bowtie2" version="0.2">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
2 <!-- Wrapper compatible with Bowtie version 2.0.0 -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
3 <description>is a short-read aligner</description>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
4 <version_command>bowtie2 --version</version_command>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
5 <requirements>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
6 <requirement type="package" version="2.1.0">bowtie2</requirement>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
7 <requirement type="package" version="0.1.18">samtools</requirement>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
8 </requirements>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
9
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
10 <command>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
11 ## prepare bowtie2 index
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
12 #set index_path = ''
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
13 #if str($reference_genome.source) == "history":
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
14 bowtie2-build "$reference_genome.own_file" genome; ln -s "$reference_genome.own_file" genome.fa;
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
15 #set index_path = 'genome'
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
16 #else:
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
17 #set index_path = $reference_genome.index.fields.path
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
18 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
19
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
20 ## execute bowtie2
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
21 bowtie2
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
22
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
23 ## number of threads
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
24 -p \${GALAXY_SLOTS:-4}
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
25
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
26 ## index file path
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
27 -x $index_path
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
28
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
29 ## check for single/pair-end
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
30 #if str( $library.type ) == "single"
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
31 ## prepare inputs
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
32 -U $library.input_1
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
33
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
34 #if $output_unaligned_reads_l
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
35 --un $output_unaligned_reads_l
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
36 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
37 #else
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
38 ## prepare inputs
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
39 -1 $library.input_1
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
40 -2 $library.input_2
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
41 -I $library.min_insert
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
42 -X $library.max_insert
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
43
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
44 #if $output_unaligned_reads_l
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
45 --un-conc $output_unaligned_reads_l
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
46 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
47 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
48
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
49 ## configure settings
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
50 #if str($params.full) == "yes":
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
51 ## add alignment type
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
52 $params.align_type
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
53
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
54 ## add performance
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
55 $params.performance
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
56
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
57 ## add time flag
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
58 $params.time
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
59
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
60 ## add nofw/norc
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
61 $params.nofw_norc
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
62
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
63 ## set gbar
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
64 --gbar $params.gbar
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
65
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
66 ## check skip
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
67 #if str($params.skip) != "0":
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
68 -s $params.skip
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
69 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
70
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
71 ## check upto
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
72 #if str($params.upto) != "0":
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
73 -u $params.upto
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
74 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
75
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
76 ## check trim5
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
77 #if str($params.trim5) != "0":
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
78 -5 $params.trim5
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
79 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
80
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
81 ## check trim3
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
82 #if str($params.trim3) != "0":
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
83 -3 $params.trim3
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
84 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
85 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
86
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
87 ## read group information
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
88 #if str($read_group.selection) == "yes":
96d2e31a3938 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:
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
90 --rg-id "$read_group.rgid"
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
91 --rg "LB:$read_group.rglb"
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
92 --rg "PL:$read_group.rgpl"
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
93 --rg "SM:$read_group.rgsm"
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
94 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
95 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
96
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
97 ## view/sort and output file
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
98 | samtools view -Su - | samtools sort -o - - > $output
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
99
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
100 ## rename unaligned sequence files
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
101 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r:
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
102 #set left = str($output_unaligned_reads_l).replace( '.dat', '.1.dat' )
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
103 #set right = str($output_unaligned_reads_l).replace( '.dat', '.2.dat' )
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
104
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
105 ; mv $left $output_unaligned_reads_l;
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
106 mv $right $output_unaligned_reads_r
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
107 #end if
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
108 </command>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
109
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
110 <!-- basic error handling -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
111 <stdio>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
112 <exit_code range="1:" level="fatal" description="Tool exception" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
113 </stdio>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
114
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
115 <inputs>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
116 <!-- single/paired -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
117 <conditional name="library">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
118 <param name="type" type="select" label="Is this library mate-paired?">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
119 <option value="single">Single-end</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
120 <option value="paired">Paired-end</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
121 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
122 <when value="single">
96d2e31a3938 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"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
124 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
125 <when value="paired">
96d2e31a3938 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" />
96d2e31a3938 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" />
96d2e31a3938 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" />
96d2e31a3938 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" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
130 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
131 </conditional>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
132
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
133 <!-- unaligned file -->
96d2e31a3938 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)" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
135
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
136 <!-- reference genome -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
137 <conditional name="reference_genome">
96d2e31a3938 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">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
139 <option value="indexed">Use a built-in index</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
140 <option value="history">Use one from the history</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
141 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
142 <when value="indexed">
96d2e31a3938 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">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
144 <options from_data_table="bowtie2_indexes">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
145 <filter type="sort_by" column="2"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
146 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
147 </options>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
148 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
149 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
150 <when value="history">
96d2e31a3938 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" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
152 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
153 </conditional>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
154
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
155 <!-- group settings -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
156 <conditional name="read_group">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
157 <param name="selection" type="select" label="Specify the read group for this file?">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
158 <option value="yes">Yes</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
159 <option value="no" selected="True">No</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
160 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
161 <when value="yes">
96d2e31a3938 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." />
96d2e31a3938 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" />
96d2e31a3938 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" />
96d2e31a3938 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" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
166 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
167 <when value="no" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
168 </conditional>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
169
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
170 <!-- full/advanced params. -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
171 <conditional name="params">
96d2e31a3938 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.">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
173 <option value="no">Use defaults</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
174 <option value="yes">Full parameter list</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
175 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
176 <when value="yes">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
177 <param name="align_type" type="select" label="Type of alignment">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
178 <option value="" selected="true">End to end</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
179 <option value="--local">Local</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
180 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
181
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
182 <param name="performance" type="select" label="Preset option">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
183 <option value="">Default</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
184 <option value="--very-fast">Very fast</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
185 <option value="--fast">Fast</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
186 <option value="--sensitive" selected="true">Sensitive</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
187 <option value="--very-sensitive">Very sensitive</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
188 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
189
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
190 <param name="gbar" type="integer" value="4" label="Disallow gaps within n-positions of read" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
191
96d2e31a3938 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" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
193
96d2e31a3938 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" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
195
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
196 <param name="skip" type="integer" value="0" label="Skip the first n-reads" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
197
96d2e31a3938 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)" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
199
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
200 <param name="nofw_norc" type="select" label="Strand directions">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
201 <option value="">Both</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
202 <option value="--nofw">Disable forward</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
203 <option value="--norc">Disable reverse</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
204 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
205
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
206 <param name="time" type="select" label="Log mapping time">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
207 <option value="">No</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
208 <option value="--time">Yes</option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
209 </param>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
210
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
211 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
212 <when value="no" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
213 </conditional>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
214
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
215 </inputs>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
216
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
217 <!-- define outputs -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
218 <outputs>
96d2e31a3938 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)" >
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
220 <filter>unaligned_file is True</filter>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
221 <actions>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
222 <action type="format">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
223 <option type="from_param" name="library.input_1" param_attribute="ext" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
224 </action>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
225 </actions>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
226 </data>
96d2e31a3938 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)">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
228 <filter>library['type'] == "paired" and unaligned_file is True</filter>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
229 <actions>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
230 <action type="format">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
231 <option type="from_param" name="library.input_1" param_attribute="ext" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
232 </action>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
233 </actions>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
234 </data>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
235 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
236 <actions>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
237 <conditional name="reference_genome.source">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
238 <when value="indexed">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
239 <action type="metadata" name="dbkey">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
240 <option type="from_data_table" name="bowtie2_indexes" column="1" offset="0">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
241 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
242 <filter type="param_value" ref="reference_genome.index" column="0"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
243 </option>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
244 </action>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
245 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
246 <when value="history">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
247 <action type="metadata" name="dbkey">
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
248 <option type="from_param" name="reference_genome.own_file" param_attribute="dbkey" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
249 </action>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
250 </when>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
251 </conditional>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
252 </actions>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
253 </data>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
254 </outputs>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
255
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
256 <tests>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
257 <test>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
258 <!-- basic test on single paired default run -->
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
259 <param name="type" value="single"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
260 <param name="selection" value="no"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
261 <param name="full" value="no"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
262 <param name="unaligned_file" value="false"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
263 <param name="source" value="history" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
264 <param name="input_1" value="bowtie2/phix_reads.fastq" ftype="fastqsanger"/>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
265 <param name="own_file" value="bowtie2/phix_genome.fasta" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
266 <output name="output" file="bowtie2/phix_mapped.bam" />
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
267 </test>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
268 </tests>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
269
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
270 <help>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
271 **Bowtie2 Overview**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
272
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
274
96d2e31a3938 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)
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
276
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
277 .. _Bowtie: http://bowtie-bio.sourceforge.net/bowtie2/
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
278
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
279 ------
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
280
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
281 **Inputs**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
282
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
284
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
285 ------
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
286
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
287 **Outputs**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
288
96d2e31a3938 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::
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
290
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
291 20000 reads; of these:
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
292 20000 (100.00%) were unpaired; of these:
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
293 1247 (6.24%) aligned 0 times
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
294 18739 (93.69%) aligned exactly 1 time
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
295 14 (0.07%) aligned >1 times
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
296 93.77% overall alignment rate
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
297
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
298 ------
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
299
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
300 **Alignment options**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
301
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
302 *--end-to-end/--local*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
303
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
305
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
306 End-to-end alignment example::
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
307
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
308 Read GACTGGGCGATCTCGACTTCG
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
309 ||||| ||||||||||||||
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
310 Reference GACTG--CGATCTCGACATCG
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
311
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
312 Local alignment example::
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
313
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
314 Read ACGGTTGCGTTAA-TCCGCCACG
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
315 ||||||||| ||||||
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
316 Reference TAACTTGCGTTAAATCCGCCTGG
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
317
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
318 *-s/--skip (default: 0)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
319
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
320 Skip (i.e. do not align) the first n-reads or pairs in the input.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
321
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
322 *-u/--qupto (default: no limit)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
323
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
325
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
326 *-5/--trim5 (default: 0)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
327
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
328 Trim n-bases from 5' (left) end of each read before alignment.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
329
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
330 *-3/--trim3 (default: 0)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
331
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
332 Trim n-bases from 3' (right) end of each read before alignment.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
333
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
334 *--nofw/--norc (default: both strands enabled)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
335
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
337
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
338 *--gbar (default: 4)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
339
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
340 Disallow gaps within n-positions of the beginning or end of the read.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
341
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
342 ------
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
343
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
344 **Paired-end options**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
345
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
346 *-I/--minins (default: 0)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
347
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
349
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
351
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
352 *-X/--maxins (default: 0)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
353
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
355
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
357
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
358 ------
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
359
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
360 **SAM options**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
361
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
362 *--rg-id [text]*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
363
96d2e31a3938 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].
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
365
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
366 *--rg [text]*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
367
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
369
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
370 ------
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
371
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
372 **Output options**
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
373
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
374 *--un/--un-conc*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
375
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
377
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
378 *-t/--time (default: off)*
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
379
96d2e31a3938 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.
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
381
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
382 </help>
96d2e31a3938 Imported from capsule None
devteam
parents:
diff changeset
383 </tool>