Mercurial > repos > devteam > bowtie2
comparison bowtie2_wrapper.xml @ 18:121110a12cc9 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bowtie2 commit a887e11c533af3ed3734c26da2da33aa8acbbce9
author | iuc |
---|---|
date | Fri, 24 Nov 2017 07:44:07 -0500 |
parents | 66f992977578 |
children | 97d1923c8c4b |
comparison
equal
deleted
inserted
replaced
17:66f992977578 | 18:121110a12cc9 |
---|---|
1 <tool id="bowtie2" name="Bowtie2" version="2.3.2.2" profile="17.01"> | 1 <tool id="bowtie2" name="Bowtie2" version="2.3.3.1" profile="17.01"> |
2 <description>- map reads against reference genome</description> | 2 <description>- map reads against reference genome</description> |
3 <macros> | 3 <macros> |
4 <import>bowtie2_macros.xml</import> | 4 <import>bowtie2_macros.xml</import> |
5 </macros> | 5 </macros> |
6 <requirements> | 6 <requirements> |
7 <requirement type="package" version="2.3.2">bowtie2</requirement> | 7 <requirement type="package" version="2.3.3.1">bowtie2</requirement> |
8 <requirement type="package" version="1.3.1">samtools</requirement> | 8 <requirement type="package" version="1.6">samtools</requirement> |
9 </requirements> | 9 </requirements> |
10 <version_command>bowtie2 --version</version_command> | 10 <version_command>bowtie2 --version</version_command> |
11 <command detect_errors="exit_code"><![CDATA[ | 11 <command detect_errors="exit_code"><![CDATA[ |
12 ## prepare bowtie2 index | 12 ## prepare bowtie2 index |
13 #set index_path = '' | 13 #set index_path = '' |
14 #if str($reference_genome.source) == "history": | 14 #if str($reference_genome.source) == "history": |
15 bowtie2-build --threads \${GALAXY_SLOTS:-4} '$reference_genome.own_file' genome && | 15 bowtie2-build --threads \${GALAXY_SLOTS:-4} '$reference_genome.own_file' genome && |
16 ln -s -f '$reference_genome.own_file' genome.fa && | 16 ln -s -f '$reference_genome.own_file' genome.fa && |
17 #set index_path = 'genome' | 17 #set index_path = 'genome' |
18 #else: | |
19 #set index_path = $reference_genome.index.fields.path | |
20 #end if | |
21 | |
22 ## Link in the input files, so bowtie2 can tell their type | |
23 | |
24 #set compressed="False" | |
25 #set reads_are_fastq = True | |
26 #if str($library.type) == 'paired': | |
27 #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): | |
28 #set read1 = "input_f.fastq.gz" | |
29 #set compressed = "GZ" | |
30 #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
31 #set read1 = "input_f.fastq.bz2" | |
32 #set compressed = "BZ2" | |
33 #else if $library.input_1.is_of_type('fasta'): | |
34 #set reads_are_fastq = False | |
35 #set read1 = "input_f.fasta" | |
36 #else: | |
37 #set read1 = "input_f.fastq" | |
38 #end if | |
39 ln -f -s '${library.input_1}' ${read1} && | |
40 | |
41 #if $library.input_2.is_of_type("fastq.gz", "fastqsanger.gz"): | |
42 #set read2 = "input_r.fastq.gz" | |
43 #set compressed = "GZ" | |
44 #else if $library.input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
45 #set read2 = "input_r.fastq.bz2" | |
46 #set compressed = "BZ2" | |
47 #else if $library.input_2.is_of_type('fasta'): | |
48 #set read2 = "input_r.fasta" | |
49 #else: | |
50 #set read2 = "input_r.fastq" | |
51 #end if | |
52 ln -f -s '${library.input_2}' ${read2} && | |
53 #else if str($library.type) == 'paired_collection': | |
54 #if $library.input_1.forward.is_of_type("fastq.gz", "fastqsanger.gz"): | |
55 #set read1 = "input_f.fastq.gz" | |
56 #set compressed = "GZ" | |
57 #else if $library.input_1.forward.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
58 #set read1 = "input_f.fastq.bz2" | |
59 #set compressed = "BZ2" | |
60 #else if $library.input_1.forward.is_of_type('fasta'): | |
61 #set reads_are_fastq = False | |
62 #set read1 = "input_f.fasta" | |
63 #else: | |
64 #set read1 = "input_f.fastq" | |
65 #end if | |
66 ln -s '${library.input_1.forward}' ${read1} && | |
67 | |
68 #if $library.input_1.reverse.is_of_type("fastq.gz", "fastqsanger.gz"): | |
69 #set read2 = "input_r.fastq.gz" | |
70 #set compressed = "GZ" | |
71 #else if $library.input_1.reverse.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
72 #set read2 = "input_r.fastq.bz2" | |
73 #set compressed = "BZ2" | |
74 #else if $library.input_1.reverse.is_of_type("fasta"): | |
75 #set read2 = "input_r.fasta" | |
76 #else: | |
77 #set read2 = "input_r.fastq" | |
78 #end if | |
79 ln -s '${library.input_1.reverse}' ${read2} && | |
80 | |
81 #else if str($library.type) == 'paired_interleaved': | |
82 #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): | |
83 #set read1 = "input_il.fastq.gz" | |
84 #set compressed = "GZ" | |
85 #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
86 #set read1 = "input_il.fastq.bz2" | |
87 #set compressed = "BZ2" | |
88 #else if $library.input_1.is_of_type("fasta"): | |
89 #set reads_are_fastq = False | |
90 #set read1 = "input_il.fasta" | |
91 #else: | |
92 #set read1 = "input_il.fastq" | |
93 #end if | |
94 ln -s '${library.input_1}' ${read1} && | |
95 #else: | |
96 #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): | |
97 #set read1 = "input_f.fastq.gz" | |
98 #set compressed = "GZ" | |
99 #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
100 #set read1 = "input_f.fastq.bz2" | |
101 #set compressed = "BZ2" | |
102 #else if $library.input_1.is_of_type("fasta"): | |
103 #set reads_are_fastq = False | |
104 #set read1 = "input_f.fasta" | |
105 #else: | |
106 #set read1 = "input_f.fastq" | |
107 #end if | |
108 ln -s '${library.input_1}' ${read1} && | |
109 #end if | |
110 | |
111 ## execute bowtie2 | |
112 | |
113 bowtie2 | |
114 | |
115 ## number of threads | |
116 -p \${GALAXY_SLOTS:-4} | |
117 | |
118 ## index file path | |
119 -x '$index_path' | |
120 | |
121 ## Input reads are fasta? | |
122 #if not reads_are_fastq: | |
123 -f | |
124 #end if | |
125 | |
126 ## Input reads | |
127 #if str( $library.type ) == "single": | |
128 -U '${read1}' | |
129 #if str( $library.unaligned_file ) == "true": | |
130 #if $compressed == "GZ": | |
131 --un-gz '${output_unaligned_reads_l}' | |
132 #else if $compressed == "BZ2": | |
133 --un-bz2 '${output_unaligned_reads_l}' | |
18 #else: | 134 #else: |
19 #set index_path = $reference_genome.index.fields.path | 135 --un '${output_unaligned_reads_l}' |
20 #end if | 136 #end if |
21 | 137 #end if |
22 ## Link in the input files, so bowtie2 can tell their type | 138 #if str( $library.aligned_file ) == "true": |
23 | 139 #if $compressed == "GZ": |
24 #set compressed="False" | 140 --al-gz '${output_aligned_reads_l}' |
25 #set reads_are_fastq = True | 141 #else if $compressed == "BZ2": |
26 #if str($library.type) == 'paired': | 142 --al-bz2 '${output_aligned_reads_l}' |
27 #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): | |
28 #set read1 = "input_f.fastq.gz" | |
29 #set compressed = "GZ" | |
30 #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
31 #set read1 = "input_f.fastq.bz2" | |
32 #set compressed = "BZ2" | |
33 #else if $library.input_1.is_of_type('fasta'): | |
34 #set reads_are_fastq = False | |
35 #set read1 = "input_f.fasta" | |
36 #else: | |
37 #set read1 = "input_f.fastq" | |
38 #end if | |
39 ln -f -s '${library.input_1}' ${read1} && | |
40 | |
41 #if $library.input_2.is_of_type("fastq.gz", "fastqsanger.gz"): | |
42 #set read2 = "input_r.fastq.gz" | |
43 #set compressed = "GZ" | |
44 #else if $library.input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
45 #set read2 = "input_r.fastq.bz2" | |
46 #set compressed = "BZ2" | |
47 #else if $library.input_2.is_of_type('fasta'): | |
48 #set read2 = "input_r.fasta" | |
49 #else: | |
50 #set read2 = "input_r.fastq" | |
51 #end if | |
52 ln -f -s '${library.input_2}' ${read2} && | |
53 #else if str($library.type) == 'paired_collection': | |
54 #if $library.input_1.forward.is_of_type("fastq.gz", "fastqsanger.gz"): | |
55 #set read1 = "input_f.fastq.gz" | |
56 #set compressed = "GZ" | |
57 #else if $library.input_1.forward.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
58 #set read1 = "input_f.fastq.bz2" | |
59 #set compressed = "BZ2" | |
60 #else if $library.input_1.forward.is_of_type('fasta'): | |
61 #set reads_are_fastq = False | |
62 #set read1 = "input_f.fasta" | |
63 #else: | |
64 #set read1 = "input_f.fastq" | |
65 #end if | |
66 ln -s '${library.input_1.forward}' ${read1} && | |
67 | |
68 #if $library.input_1.reverse.is_of_type("fastq.gz", "fastqsanger.gz"): | |
69 #set read2 = "input_r.fastq.gz" | |
70 #set compressed = "GZ" | |
71 #else if $library.input_1.reverse.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
72 #set read2 = "input_r.fastq.bz2" | |
73 #set compressed = "BZ2" | |
74 #else if $library.input_1.reverse.is_of_type("fasta"): | |
75 #set read2 = "input_r.fasta" | |
76 #else: | |
77 #set read2 = "input_r.fastq" | |
78 #end if | |
79 ln -s '${library.input_1.reverse}' ${read2} && | |
80 | |
81 #else if str($library.type) == 'paired_interleaved': | |
82 #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): | |
83 #set read1 = "input_il.fastq.gz" | |
84 #set compressed = "GZ" | |
85 #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
86 #set read1 = "input_il.fastq.bz2" | |
87 #set compressed = "BZ2" | |
88 #else if $library.input_1.is_of_type("fasta"): | |
89 #set reads_are_fastq = False | |
90 #set read1 = "input_il.fasta" | |
91 #else: | |
92 #set read1 = "input_il.fastq" | |
93 #end if | |
94 ln -s '${library.input_1}' ${read1} && | |
95 #else: | 143 #else: |
96 #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): | 144 --al '${output_aligned_reads_l}' |
97 #set read1 = "input_f.fastq.gz" | |
98 #set compressed = "GZ" | |
99 #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): | |
100 #set read1 = "input_f.fastq.bz2" | |
101 #set compressed = "BZ2" | |
102 #else if $library.input_1.is_of_type("fasta"): | |
103 #set reads_are_fastq = False | |
104 #set read1 = "input_f.fasta" | |
105 #else: | |
106 #set read1 = "input_f.fastq" | |
107 #end if | |
108 ln -s '${library.input_1}' ${read1} && | |
109 #end if | 145 #end if |
110 | 146 #end if |
111 ## execute bowtie2 | 147 |
112 | 148 #elif str( $library.type ) == "paired_interleaved": |
113 bowtie2 | 149 --interleaved '${read1}' |
114 | 150 #if str( $library.unaligned_file ) == "true": |
115 ## number of threads | 151 #if $compressed == "GZ": |
116 -p \${GALAXY_SLOTS:-4} | 152 --un-gz '${output_unaligned_reads_l}' |
117 | 153 #else if $compressed == "BZ2": |
118 ## index file path | 154 --un-bz2 '${output_unaligned_reads_l}' |
119 -x '$index_path' | 155 #else: |
120 | 156 --un '${output_unaligned_reads_l}' |
121 ## Input reads are fasta? | |
122 #if not reads_are_fastq: | |
123 -f | |
124 #end if | 157 #end if |
125 | 158 #end if |
126 ## Input reads | 159 #if str( $library.aligned_file ) == "true": |
127 #if str( $library.type ) == "single": | 160 #if $compressed == "GZ": |
128 -U '${read1}' | 161 --al-gz '${output_aligned_reads_l}' |
129 #if str( $library.unaligned_file ) == "true": | 162 #else if $compressed == "BZ2": |
130 #if $compressed == "GZ": | 163 --al-bz2 '${output_aligned_reads_l}' |
131 --un-gz '${output_unaligned_reads_l}' | |
132 #else if $compressed == "BZ2": | |
133 --un-bz2 '${output_unaligned_reads_l}' | |
134 #else: | |
135 --un '${output_unaligned_reads_l}' | |
136 #end if | |
137 #end if | |
138 #if str( $library.aligned_file ) == "true": | |
139 #if $compressed == "GZ": | |
140 --al-gz '${output_aligned_reads_l}' | |
141 #else if $compressed == "BZ2": | |
142 --al-bz2 '${output_aligned_reads_l}' | |
143 #else: | |
144 --al '${output_aligned_reads_l}' | |
145 #end if | |
146 #end if | |
147 | |
148 #elif str( $library.type ) == "paired_interleaved": | |
149 --interleaved '${read1}' | |
150 #if str( $library.unaligned_file ) == "true": | |
151 #if $compressed == "GZ": | |
152 --un-gz '${output_unaligned_reads_l}' | |
153 #else if $compressed == "BZ2": | |
154 --un-bz2 '${output_unaligned_reads_l}' | |
155 #else: | |
156 --un '${output_unaligned_reads_l}' | |
157 #end if | |
158 #end if | |
159 #if str( $library.aligned_file ) == "true": | |
160 #if $compressed == "GZ": | |
161 --al-gz '${output_aligned_reads_l}' | |
162 #else if $compressed == "BZ2": | |
163 --al-bz2 '${output_aligned_reads_l}' | |
164 #else: | |
165 --al '${output_aligned_reads_l}' | |
166 #end if | |
167 #end if | |
168 #else: | 164 #else: |
169 -1 '${read1}' | 165 --al '${output_aligned_reads_l}' |
170 -2 '${read2}' | |
171 #if str( $library.unaligned_file ) == "true": | |
172 #if $compressed == "GZ": | |
173 --un-conc-gz '${output_unaligned_reads_l}' | |
174 #else if $compressed == "BZ2": | |
175 --un-conc-bz2 '${output_unaligned_reads_l}' | |
176 #else: | |
177 --un-conc '${output_unaligned_reads_l}' | |
178 #end if | |
179 #end if | |
180 #if str( $library.aligned_file ) == "true": | |
181 #if $compressed == "GZ": | |
182 --al-conc-gz '${output_aligned_reads_l}' | |
183 #else if $compressed == "BZ2": | |
184 --al-conc-bz2 '${output_aligned_reads_l}' | |
185 #else: | |
186 --al-conc '${output_aligned_reads_l}' | |
187 #end if | |
188 #end if | |
189 #if str( $library.paired_options.paired_options_selector ) == "yes": | |
190 -I "${library.paired_options.I}" | |
191 -X "${library.paired_options.X}" | |
192 ${library.paired_options.fr_rf_ff} | |
193 ${library.paired_options.no_mixed} | |
194 ${library.paired_options.no_discordant} | |
195 ${library.paired_options.dovetail} | |
196 ${library.paired_options.no_contain} | |
197 ${library.paired_options.no_overlap} | |
198 #end if | |
199 #end if | 166 #end if |
200 | 167 #end if |
201 ## Read group information. | 168 #else: |
202 @define_read_group_helpers@ | 169 -1 '${read1}' |
203 #if str( $library.type ) == "single": | 170 -2 '${read2}' |
204 #set $rg_auto_name = $read_group_name_default($library.input_1) | 171 #if str( $library.unaligned_file ) == "true": |
205 #elif str( $library.type ) == "paired": | 172 #if $compressed == "GZ": |
206 #set $rg_auto_name = $read_group_name_default($library.input_1, $library.input_2) | 173 --un-conc-gz '${output_unaligned_reads_l}' |
207 #else | 174 #else if $compressed == "BZ2": |
208 #set $rg_auto_name = $read_group_name_default($library.input_1) | 175 --un-conc-bz2 '${output_unaligned_reads_l}' |
176 #else: | |
177 --un-conc '${output_unaligned_reads_l}' | |
209 #end if | 178 #end if |
210 @set_use_rg_var@ | 179 #end if |
211 @set_read_group_vars@ | 180 #if str( $library.aligned_file ) == "true": |
212 #if $use_rg | 181 #if $compressed == "GZ": |
213 $format_read_group("", $rg_id, '"', arg='--rg-id ') | 182 --al-conc-gz '${output_aligned_reads_l}' |
214 $format_read_group("SM:", $rg_sm, '"', arg='--rg ') | 183 #else if $compressed == "BZ2": |
215 $format_read_group("PL:", $rg_pl, '"', arg='--rg ') | 184 --al-conc-bz2 '${output_aligned_reads_l}' |
216 $format_read_group("LB:", $rg_lb, '"', arg='--rg ') | 185 #else: |
217 $format_read_group("CN:", $rg_cn, '"', arg='--rg ') | 186 --al-conc '${output_aligned_reads_l}' |
218 $format_read_group("DS:", $rg_ds, '"', arg='--rg ') | |
219 $format_read_group("DT:", $rg_dt, '"', arg='--rg ') | |
220 $format_read_group("FO:", $rg_fo, '"', arg='--rg ') | |
221 $format_read_group("KS:", $rg_ks, '"', arg='--rg ') | |
222 $format_read_group("PG:", $rg_pg, '"', arg='--rg ') | |
223 $format_read_group("PI:", $rg_pi, '"', arg='--rg ') | |
224 $format_read_group("PU:", $rg_pu, '"', arg='--rg ') | |
225 #end if | 187 #end if |
226 | 188 #end if |
227 ## Analysis type | 189 #if str( $library.paired_options.paired_options_selector ) == "yes": |
228 #if ( str( $analysis_type.analysis_type_selector ) == "simple" and str( $analysis_type.presets ) != "no_presets" ): | 190 -I ${library.paired_options.I} |
229 $analysis_type.presets | 191 -X ${library.paired_options.X} |
230 #elif str( $analysis_type.analysis_type_selector ) == "full": | 192 ${library.paired_options.fr_rf_ff} |
231 #if str( $analysis_type.input_options.input_options_selector ) == "yes": | 193 ${library.paired_options.no_mixed} |
232 --skip "${analysis_type.input_options.skip}" | 194 ${library.paired_options.no_discordant} |
233 --qupto "${analysis_type.input_options.qupto}" | 195 ${library.paired_options.dovetail} |
234 --trim5 "${analysis_type.input_options.trim5}" | 196 ${library.paired_options.no_contain} |
235 --trim3 "${analysis_type.input_options.trim3}" | 197 ${library.paired_options.no_overlap} |
236 ${analysis_type.input_options.qv_encoding} | 198 #end if |
237 ${analysis_type.input_options.solexa_quals} | 199 #end if |
238 ${analysis_type.input_options.int_quals} | 200 |
239 #end if | 201 ## Read group information. |
240 | 202 @define_read_group_helpers@ |
241 #if str( $analysis_type.alignment_options.alignment_options_selector ) == "yes": | 203 #if str( $library.type ) == "single": |
242 -N "${analysis_type.alignment_options.N}" | 204 #set $rg_auto_name = $read_group_name_default($library.input_1) |
243 -L "${analysis_type.alignment_options.L}" | 205 #elif str( $library.type ) == "paired": |
244 -i "${analysis_type.alignment_options.i}" | 206 #set $rg_auto_name = $read_group_name_default($library.input_1, $library.input_2) |
245 --n-ceil "${analysis_type.alignment_options.n_ceil}" | 207 #else |
246 --dpad "${analysis_type.alignment_options.dpad}" | 208 #set $rg_auto_name = $read_group_name_default($library.input_1) |
247 --gbar "${analysis_type.alignment_options.gbar}" | 209 #end if |
248 ${analysis_type.alignment_options.ignore_quals} | 210 @set_use_rg_var@ |
249 ${analysis_type.alignment_options.nofw} | 211 @set_read_group_vars@ |
250 ${analysis_type.alignment_options.norc} | 212 #if $use_rg |
251 ${analysis_type.alignment_options.no_1mm_upfront} | 213 $format_read_group("", $rg_id, '"', arg='--rg-id ') |
252 #if str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "end-to-end": | 214 $format_read_group("SM:", $rg_sm, '"', arg='--rg ') |
253 --end-to-end | 215 $format_read_group("PL:", $rg_pl, '"', arg='--rg ') |
254 --score-min "${analysis_type.alignment_options.align_mode.score_min_ete}" | 216 $format_read_group("LB:", $rg_lb, '"', arg='--rg ') |
255 #elif str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "local": | 217 $format_read_group("CN:", $rg_cn, '"', arg='--rg ') |
256 --local | 218 $format_read_group("DS:", $rg_ds, '"', arg='--rg ') |
257 --score-min "${analysis_type.alignment_options.align_mode.score_min_loc}" | 219 $format_read_group("DT:", $rg_dt, '"', arg='--rg ') |
258 #end if | 220 $format_read_group("FO:", $rg_fo, '"', arg='--rg ') |
259 #end if | 221 $format_read_group("KS:", $rg_ks, '"', arg='--rg ') |
260 | 222 $format_read_group("PG:", $rg_pg, '"', arg='--rg ') |
261 #if str( $analysis_type.scoring_options.scoring_options_selector ) == "yes": | 223 $format_read_group("PI:", $rg_pi, '"', arg='--rg ') |
262 #if ( str( $analysis_type.alignment_options.alignment_options_selector ) == "yes" and str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "local" ): | 224 $format_read_group("PU:", $rg_pu, '"', arg='--rg ') |
263 --ma "${analysis_type.scoring_options.ma}" | 225 #end if |
264 #end if | 226 |
265 --mp "${analysis_type.scoring_options.mp}" | 227 ## Analysis type |
266 --np "${analysis_type.scoring_options.np}" | 228 #if ( str( $analysis_type.analysis_type_selector ) == "simple" and str( $analysis_type.presets ) != "no_presets" ): |
267 --rdg "${analysis_type.scoring_options.rdg_read_open},${analysis_type.scoring_options.rdg_read_extend}" | 229 $analysis_type.presets |
268 --rfg "${analysis_type.scoring_options.rfg_ref_open},${analysis_type.scoring_options.rfg_ref_extend}" | 230 #elif str( $analysis_type.analysis_type_selector ) == "full": |
269 #end if | 231 #if str( $analysis_type.input_options.input_options_selector ) == "yes": |
270 | 232 --skip ${analysis_type.input_options.skip} |
271 #if str( $analysis_type.reporting_options.reporting_options_selector ) == "k": | 233 --qupto ${analysis_type.input_options.qupto} |
272 -k "${analysis_type.reporting_options.k}" | 234 --trim5 ${analysis_type.input_options.trim5} |
273 #elif str( $analysis_type.reporting_options.reporting_options_selector ) == "a": | 235 --trim3 ${analysis_type.input_options.trim3} |
274 -a | 236 ${analysis_type.input_options.qv_encoding} |
275 #end if | 237 ${analysis_type.input_options.solexa_quals} |
276 | 238 ${analysis_type.input_options.int_quals} |
277 #if str( $analysis_type.effort_options.effort_options_selector ) == "yes": | 239 #end if |
278 -D "${analysis_type.effort_options.D}" | 240 |
279 -R "${analysis_type.effort_options.R}" | 241 #if str( $analysis_type.alignment_options.alignment_options_selector ) == "yes": |
280 #end if | 242 -N ${analysis_type.alignment_options.N} |
281 | 243 -L ${analysis_type.alignment_options.L} |
282 #if str( $analysis_type.sam_options.sam_options_selector ) == "yes": | 244 -i '${analysis_type.alignment_options.i}' |
283 ${analysis_type.sam_options.no_unal} | 245 --n-ceil '${analysis_type.alignment_options.n_ceil}' |
284 ${analysis_type.sam_options.omit_sec_seq} | 246 --dpad ${analysis_type.alignment_options.dpad} |
285 #end if | 247 --gbar ${analysis_type.alignment_options.gbar} |
286 | 248 ${analysis_type.alignment_options.ignore_quals} |
287 #if str( $analysis_type.other_options.other_options_selector ) == "yes": | 249 ${analysis_type.alignment_options.nofw} |
288 ${analysis_type.other_options.reorder} | 250 ${analysis_type.alignment_options.norc} |
289 ${analysis_type.other_options.non_deterministic} | 251 ${analysis_type.alignment_options.no_1mm_upfront} |
290 --seed "${analysis_type.other_options.seed}" | 252 #if str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "end-to-end": |
291 #end if | 253 --end-to-end |
292 | 254 --score-min '${analysis_type.alignment_options.align_mode.score_min_ete}' |
293 #elif str( $analysis_type.analysis_type_selector ) == "cline": | 255 #elif str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "local": |
294 ${analysis_type.cline} | 256 --local |
257 --score-min '${analysis_type.alignment_options.align_mode.score_min_loc}' | |
295 #end if | 258 #end if |
296 | 259 #end if |
297 ## mapping stats (i.e. stderr from bowtie2) | 260 |
298 #if $save_mapping_stats | 261 #if str( $analysis_type.scoring_options.scoring_options_selector ) == "yes": |
299 2> '$mapping_stats' | 262 #if ( str( $analysis_type.alignment_options.alignment_options_selector ) == "yes" and str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "local" ): |
263 --ma ${analysis_type.scoring_options.ma} | |
300 #end if | 264 #end if |
301 | 265 --mp '${analysis_type.scoring_options.mp}' |
302 ## output file | 266 --np ${analysis_type.scoring_options.np} |
303 #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ): | 267 --rdg ${analysis_type.scoring_options.rdg_read_open},${analysis_type.scoring_options.rdg_read_extend} |
304 | samtools sort -O bam -o '$output' | 268 --rfg ${analysis_type.scoring_options.rfg_ref_open},${analysis_type.scoring_options.rfg_ref_extend} |
305 #else | 269 #end if |
306 > '$output_sam' | 270 |
307 #end if | 271 #if str( $analysis_type.reporting_options.reporting_options_selector ) == "k": |
308 | 272 -k ${analysis_type.reporting_options.k} |
309 ## rename unaligned sequence files | 273 #elif str( $analysis_type.reporting_options.reporting_options_selector ) == "a": |
310 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r: | 274 -a |
311 #from os.path import splitext | 275 #end if |
312 #set _unaligned_root, _unaligned_ext = splitext( str( $output_unaligned_reads_l ) ) | 276 |
313 && mv "${ _unaligned_root }.1${_unaligned_ext}" '$output_unaligned_reads_l' | 277 #if str( $analysis_type.effort_options.effort_options_selector ) == "yes": |
314 && mv "${ _unaligned_root }.2${_unaligned_ext}" '$output_unaligned_reads_r' | 278 -D ${analysis_type.effort_options.D} |
315 #end if | 279 -R ${analysis_type.effort_options.R} |
316 #if $library.type == "paired" and $output_aligned_reads_l and $output_aligned_reads_r: | 280 #end if |
317 #from os.path import splitext | 281 |
318 #set _aligned_root, _aligned_ext = splitext( str( $output_aligned_reads_l ) ) | 282 #if str( $analysis_type.sam_options.sam_options_selector ) == "yes": |
319 && mv "${ _aligned_root }.1${_aligned_ext}" '$output_aligned_reads_l' | 283 ${analysis_type.sam_options.no_unal} |
320 && mv "${ _aligned_root }.2${_aligned_ext}" '$output_aligned_reads_r' | 284 ${analysis_type.sam_options.omit_sec_seq} |
321 #end if | 285 ${analysis_type.sam_options.sam-no-qname-trunc} |
286 ${analysis_type.sam_options.xeq} | |
287 ${analysis_type.sam_options.soft-clipped-unmapped-tlen} | |
288 #end if | |
289 | |
290 #if str( $analysis_type.other_options.other_options_selector ) == "yes": | |
291 ${analysis_type.other_options.reorder} | |
292 ${analysis_type.other_options.non_deterministic} | |
293 --seed ${analysis_type.other_options.seed} | |
294 #end if | |
295 | |
296 #elif str( $analysis_type.analysis_type_selector ) == "cline": | |
297 ${analysis_type.cline} | |
298 #end if | |
299 | |
300 ## mapping stats (i.e. stderr from bowtie2) | |
301 #if $save_mapping_stats | |
302 2> '$mapping_stats' | |
303 #end if | |
304 | |
305 ## output file | |
306 #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ): | |
307 | samtools sort -@\${GALAXY_SLOTS:-2} -O bam -o '$output' | |
308 #else | |
309 > '$output_sam' | |
310 #end if | |
311 | |
312 ## rename unaligned sequence files | |
313 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r: | |
314 #from os.path import splitext | |
315 #set _unaligned_root, _unaligned_ext = splitext( str( $output_unaligned_reads_l ) ) | |
316 && mv '${ _unaligned_root }.1${_unaligned_ext}' '$output_unaligned_reads_l' | |
317 && mv '${ _unaligned_root }.2${_unaligned_ext}' '$output_unaligned_reads_r' | |
318 #end if | |
319 #if $library.type == "paired" and $output_aligned_reads_l and $output_aligned_reads_r: | |
320 #from os.path import splitext | |
321 #set _aligned_root, _aligned_ext = splitext( str( $output_aligned_reads_l ) ) | |
322 && mv '${ _aligned_root }.1${_aligned_ext}' '$output_aligned_reads_l' | |
323 && mv '${ _aligned_root }.2${_aligned_ext}' '$output_aligned_reads_r' | |
324 #end if | |
322 | 325 |
323 ]]></command> | 326 ]]></command> |
324 <inputs> | 327 <inputs> |
325 <!-- single/paired --> | 328 <!-- single/paired --> |
326 <conditional name="library"> | 329 <conditional name="library"> |
331 <option value="paired_interleaved">Paired-end data from single interleaved dataset</option> | 334 <option value="paired_interleaved">Paired-end data from single interleaved dataset</option> |
332 </param> | 335 </param> |
333 | 336 |
334 <when value="single"> | 337 <when value="single"> |
335 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="FASTA/Q file" help="Must be of datatype "fastqsanger" or "fasta"" /> | 338 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="FASTA/Q file" help="Must be of datatype "fastqsanger" or "fasta"" /> |
336 | |
337 <expand macro="align_unalign" /> | 339 <expand macro="align_unalign" /> |
338 | |
339 </when> | 340 </when> |
340 <when value="paired"> | 341 <when value="paired"> |
341 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="FASTA/Q file #1" help="Must be of datatype "fastqsanger"or "fasta"" /> | 342 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="FASTA/Q file #1" help="Must be of datatype "fastqsanger"or "fasta"" /> |
342 <param name="input_2" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="FASTA/Q file #2" help="Must be of datatype "fastqsanger"or "fasta"" /> | 343 <param name="input_2" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="FASTA/Q file #2" help="Must be of datatype "fastqsanger"or "fasta"" /> |
343 | |
344 <expand macro="align_unalign" /> | 344 <expand macro="align_unalign" /> |
345 <expand macro="paired_end_options" /> | 345 <expand macro="paired_end_options" /> |
346 | |
347 </when> | 346 </when> |
348 <when value="paired_collection"> | 347 <when value="paired_collection"> |
349 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data_collection" collection_type="paired" label="FASTQ Paired Dataset" help="Must be of datatype "fastqsanger" or "fasta"" /> | 348 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data_collection" collection_type="paired" label="FASTQ Paired Dataset" help="Must be of datatype "fastqsanger" or "fasta"" /> |
350 | |
351 <expand macro="align_unalign" /> | 349 <expand macro="align_unalign" /> |
352 <expand macro="paired_end_options" /> | 350 <expand macro="paired_end_options" /> |
353 | |
354 </when> | 351 </when> |
355 <when value="paired_interleaved"> | 352 <when value="paired_interleaved"> |
356 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="Interleaved FASTQ file" help="Must be of datatype "fastqsanger" or "fasta". --interleaved"/> | 353 <param name="input_1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2,fasta" type="data" label="Interleaved FASTQ file" help="Must be of datatype "fastqsanger" or "fasta". --interleaved"/> |
357 | |
358 <expand macro="align_unalign" /> | 354 <expand macro="align_unalign" /> |
359 <expand macro="paired_end_options" /> | 355 <expand macro="paired_end_options" /> |
360 | |
361 </when> | 356 </when> |
362 </conditional> | 357 </conditional> |
363 | |
364 <!-- reference genome --> | 358 <!-- reference genome --> |
365 <conditional name="reference_genome"> | 359 <conditional name="reference_genome"> |
366 <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. See `Indexes` section of help below"> | 360 <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. See `Indexes` section of help below"> |
367 <option value="indexed">Use a built-in genome index</option> | 361 <option value="indexed">Use a built-in genome index</option> |
368 <option value="history">Use a genome from the history and build index</option> | 362 <option value="history">Use a genome from the history and build index</option> |
377 </when> | 371 </when> |
378 <when value="history"> | 372 <when value="history"> |
379 <param name="own_file" type="data" format="fasta" label="Select reference genome" /> | 373 <param name="own_file" type="data" format="fasta" label="Select reference genome" /> |
380 </when> | 374 </when> |
381 </conditional> | 375 </conditional> |
382 | |
383 <!-- read group settings --> | 376 <!-- read group settings --> |
384 <expand macro="read_group_conditional" /> | 377 <expand macro="read_group_conditional" /> |
385 <conditional name="analysis_type"> | 378 <conditional name="analysis_type"> |
386 <param name="analysis_type_selector" type="select" label="Select analysis mode"> | 379 <param name="analysis_type_selector" type="select" label="Select analysis mode"> |
387 <option value="simple">1: Default setting only</option> | 380 <option value="simple">1: Default setting only</option> |
500 </when> | 493 </when> |
501 <when value="no"> | 494 <when value="no"> |
502 <!-- do nothing --> | 495 <!-- do nothing --> |
503 </when> | 496 </when> |
504 </conditional> | 497 </conditional> |
505 | |
506 <conditional name="sam_options"> | 498 <conditional name="sam_options"> |
507 <param name="sam_options_selector" type="select" label="Do you want to tweak SAM/BAM Options?" help="See "Output Options" section of Help below for information"> | 499 <param name="sam_options_selector" type="select" label="Do you want to tweak SAM/BAM Options?" help="See "Output Options" section of Help below for information"> |
508 <option value="yes">Yes</option> | 500 <option value="yes">Yes</option> |
509 <option value="no" selected="true">No</option> | 501 <option value="no" selected="true">No</option> |
510 </param> | 502 </param> |
511 <when value="yes"> | 503 <when value="yes"> |
512 <param name="no_unal" type="boolean" truevalue="--no-unal" falsevalue="" label="Suppress SAM records for reads that failed to align" help="--no-unal; Default=False"/> | 504 <param name="no_unal" type="boolean" truevalue="--no-unal" falsevalue="" label="Suppress SAM records for reads that failed to align" help="--no-unal; Default=False"/> |
513 <param name="omit_sec_seq" type="boolean" truevalue="--omit-sec-seq" falsevalue="" label="Suppress SEQ and QUAL strings for secondary alignments" help="--omit-sec-seq; Default=False"/> | 505 <param name="omit_sec_seq" type="boolean" truevalue="--omit-sec-seq" falsevalue="" label="Suppress SEQ and QUAL strings for secondary alignments" help="--omit-sec-seq; Default=False"/> |
506 <param argument="--sam-no-qname-trunc" type="boolean" truevalue="--sam-no-qname-trunc" falsevalue="" label="Suppress standard behavior of truncating readname at first whitespace at the expense of generating non-standard SAM"/> | |
507 <param argument="--xeq" type="boolean" truevalue="--xeq" falsevalue="" label="Use '='/'X', instead of 'M,' to specify matches/mismatches in SAM record."/> | |
508 <param argument="--soft-clipped-unmapped-tlen" type="boolean" truevalue="--soft-clipped-unmapped-tlen" falsevalue="" label=" Exclude soft-clipped bases when reporting TLEN"/> | |
514 </when> | 509 </when> |
515 <when value="no"> | 510 <when value="no"> |
516 <!-- do nothing --> | 511 <!-- do nothing --> |
517 </when> | 512 </when> |
518 </conditional> | 513 </conditional> |
533 <param name="sam_opt" type="boolean" truevalue="true" falsevalue="false" label="Would you like the output to be a SAM file" help="By default, the output from this Bowtie2 wrapper is a sorted BAM file."/> | 528 <param name="sam_opt" type="boolean" truevalue="true" falsevalue="false" label="Would you like the output to be a SAM file" help="By default, the output from this Bowtie2 wrapper is a sorted BAM file."/> |
534 </when> | 529 </when> |
535 </conditional> | 530 </conditional> |
536 <param name="save_mapping_stats" type="boolean" checked="False" label="Save the bowtie2 mapping statistics to the history" /> | 531 <param name="save_mapping_stats" type="boolean" checked="False" label="Save the bowtie2 mapping statistics to the history" /> |
537 </inputs> | 532 </inputs> |
538 | |
539 <!-- define outputs --> | 533 <!-- define outputs --> |
540 | |
541 <outputs> | 534 <outputs> |
542 | |
543 <data format="fastqsanger" name="output_unaligned_reads_l" label="${tool.name} on ${on_string}: unaligned reads (L)" > | 535 <data format="fastqsanger" name="output_unaligned_reads_l" label="${tool.name} on ${on_string}: unaligned reads (L)" > |
544 <filter>library['unaligned_file'] is True</filter> | 536 <filter>library['unaligned_file'] is True</filter> |
545 <actions> | 537 <actions> |
546 <conditional name="library.type"> | 538 <conditional name="library.type"> |
547 <when value="single"> | 539 <when value="single"> |
616 </action> | 608 </action> |
617 </when> | 609 </when> |
618 </conditional> | 610 </conditional> |
619 </actions> | 611 </actions> |
620 </data> | 612 </data> |
621 | |
622 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)"> | 613 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)"> |
623 <filter>analysis_type['analysis_type_selector'] == "simple" or analysis_type['sam_opt'] is False</filter> | 614 <filter>analysis_type['analysis_type_selector'] == "simple" or analysis_type['sam_opt'] is False</filter> |
624 <actions> | 615 <actions> |
625 <conditional name="reference_genome.source"> | 616 <conditional name="reference_genome.source"> |
626 <when value="indexed"> | 617 <when value="indexed"> |
637 </action> | 628 </action> |
638 </when> | 629 </when> |
639 </conditional> | 630 </conditional> |
640 </actions> | 631 </actions> |
641 </data> | 632 </data> |
642 | |
643 <data format="sam" name="output_sam" label="${tool.name} on ${on_string}: aligned reads (SAM)"> | 633 <data format="sam" name="output_sam" label="${tool.name} on ${on_string}: aligned reads (SAM)"> |
644 <filter>analysis_type['analysis_type_selector'] == "full" and analysis_type['sam_opt'] is True</filter> | 634 <filter>analysis_type['analysis_type_selector'] == "full" and analysis_type['sam_opt'] is True</filter> |
645 <actions> | 635 <actions> |
646 <conditional name="reference_genome.source"> | 636 <conditional name="reference_genome.source"> |
647 <when value="indexed"> | 637 <when value="indexed"> |
661 </actions> | 651 </actions> |
662 </data> | 652 </data> |
663 <data format="txt" name="mapping_stats" label="${tool.name} on ${on_string}: mapping stats"> | 653 <data format="txt" name="mapping_stats" label="${tool.name} on ${on_string}: mapping stats"> |
664 <filter>save_mapping_stats is True</filter> | 654 <filter>save_mapping_stats is True</filter> |
665 </data> | 655 </data> |
666 | |
667 </outputs> | 656 </outputs> |
668 | |
669 <tests> | 657 <tests> |
670 <test> | 658 <test> |
671 <!-- test on paired-end datasets --> | 659 <!-- test on paired-end datasets --> |
672 <param name="type" value="paired"/> | 660 <param name="type" value="paired"/> |
673 <param name="paired_options_selector" value="no"/> | 661 <param name="paired_options_selector" value="no"/> |
777 <param name="input_2" value="bowtie2-fq2.fa" ftype="fasta"/> | 765 <param name="input_2" value="bowtie2-fq2.fa" ftype="fasta"/> |
778 <param name="own_file" value="bowtie2-ref.fasta" /> | 766 <param name="own_file" value="bowtie2-ref.fasta" /> |
779 <output name="output" file="bowtie2-test_fasta_in.bam" ftype="bam" lines_diff="2"/> | 767 <output name="output" file="bowtie2-test_fasta_in.bam" ftype="bam" lines_diff="2"/> |
780 </test> | 768 </test> |
781 </tests> | 769 </tests> |
782 | |
783 <help><![CDATA[ | 770 <help><![CDATA[ |
784 **Bowtie2 Overview** | 771 **Bowtie2 Overview** |
785 | 772 |
786 Bowtie2_ 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. Galaxy wrapper for Bowtie 2 outputs alignments in `BAM format`_, enabling interoperation with a large number of other tools available at this site. | 773 Bowtie2_ 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. Galaxy wrapper for Bowtie 2 outputs alignments in `BAM format`_, enabling interoperation with a large number of other tools available at this site. |
787 Majority of information in this page is derived from an excellent `Bowtie2 manual`_ written by Ben Langmead. | 774 Majority of information in this page is derived from an excellent `Bowtie2 manual`_ written by Ben Langmead. |