line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Config.pm kortsch $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# BioPerl module for Bio::Tools::Run::Bowtie::Config |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Please direct questions and support issues to |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Cared for by Dan Kortschak |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Copyright Dan Kortschak and Mark A. Jensen |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# You may distribute this module under the same terms as perl itself |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Bio::Tools::Run::Bowtie::Config - Configuration data for bowtie commands |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Used internally by L. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This package exports information describing bowtie commands, parameters, |
26
|
|
|
|
|
|
|
switches, and input and output filetypes for individual bowtie commands. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 FEEDBACK |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 Mailing Lists |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
User feedback is an integral part of the evolution of this and other |
33
|
|
|
|
|
|
|
Bioperl modules. Send your comments and suggestions preferably to |
34
|
|
|
|
|
|
|
the Bioperl mailing list. Your participation is much appreciated. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
bioperl-l@bioperl.org - General discussion |
37
|
|
|
|
|
|
|
http://bioperl.org/wiki/Mailing_lists - About the mailing lists |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 Support |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Please direct usage questions or support issues to the mailing list: |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
L |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
rather than to the module maintainer directly. Many experienced and |
46
|
|
|
|
|
|
|
reponsive experts will be able look at the problem and quickly |
47
|
|
|
|
|
|
|
address it. Please include a thorough description of the problem |
48
|
|
|
|
|
|
|
with code and data examples if at all possible. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 Reporting Bugs |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Report bugs to the Bioperl bug tracking system to help us keep track |
53
|
|
|
|
|
|
|
of the bugs and their resolution. Bug reports can be submitted via |
54
|
|
|
|
|
|
|
the web: |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
http://redmine.open-bio.org/projects/bioperl/ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR - Dan Kortschak |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Email dan.kortschak adelaide.edu.au |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Describe contact details here |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 CONTRIBUTORS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Additional contributors names and emails here |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 APPENDIX |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The rest of the documentation details each of the object methods. |
71
|
|
|
|
|
|
|
Internal methods are usually preceded with a _ |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# Let the code begin... |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
package Bio::Tools::Run::Bowtie::Config; |
79
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
80
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
81
|
1
|
|
|
1
|
|
4
|
no warnings qw(qw); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
82
|
1
|
|
|
1
|
|
256
|
use Bio::Root::Root; |
|
1
|
|
|
|
|
19473
|
|
|
1
|
|
|
|
|
46
|
|
83
|
1
|
|
|
1
|
|
18
|
use Exporter; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
51
|
|
84
|
1
|
|
|
1
|
|
6
|
use base qw(Bio::Root::Root); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1023
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
our (@ISA, @EXPORT, @EXPORT_OK); |
87
|
|
|
|
|
|
|
push @ISA, 'Exporter'; |
88
|
|
|
|
|
|
|
@EXPORT = qw( |
89
|
|
|
|
|
|
|
@program_commands |
90
|
|
|
|
|
|
|
%command_executables |
91
|
|
|
|
|
|
|
%format_lookup |
92
|
|
|
|
|
|
|
%command_prefixes |
93
|
|
|
|
|
|
|
%composite_commands |
94
|
|
|
|
|
|
|
@program_params |
95
|
|
|
|
|
|
|
@program_switches |
96
|
|
|
|
|
|
|
%incompat_params |
97
|
|
|
|
|
|
|
%corequisite_switches |
98
|
|
|
|
|
|
|
%param_translation |
99
|
|
|
|
|
|
|
%command_files |
100
|
|
|
|
|
|
|
%accepted_types |
101
|
|
|
|
|
|
|
); |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
@EXPORT_OK = qw(); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
our @program_commands = qw( |
108
|
|
|
|
|
|
|
single |
109
|
|
|
|
|
|
|
paired |
110
|
|
|
|
|
|
|
crossbow |
111
|
|
|
|
|
|
|
build |
112
|
|
|
|
|
|
|
inspect |
113
|
|
|
|
|
|
|
); |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
our %command_executables = ( |
117
|
|
|
|
|
|
|
'single' => 'bowtie', |
118
|
|
|
|
|
|
|
'paired' => 'bowtie', |
119
|
|
|
|
|
|
|
'crossbow' => 'bowtie', |
120
|
|
|
|
|
|
|
'build' => 'bowtie-build', |
121
|
|
|
|
|
|
|
'inspect' => 'bowtie-inspect' |
122
|
|
|
|
|
|
|
); |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
# These should be in clobbering order - more delicate formats first |
125
|
|
|
|
|
|
|
our %format_lookup = ( |
126
|
|
|
|
|
|
|
'sam_format' => 'sam', |
127
|
|
|
|
|
|
|
'refidx' => 'bowtie', |
128
|
|
|
|
|
|
|
'concise' => undef, |
129
|
|
|
|
|
|
|
'suppress_columns' => undef, |
130
|
|
|
|
|
|
|
'refout' => undef |
131
|
|
|
|
|
|
|
); |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
# composite commands: pseudo-commands that run a |
135
|
|
|
|
|
|
|
# sequence of commands |
136
|
|
|
|
|
|
|
# composite command prefix => list of prefixes of commands this |
137
|
|
|
|
|
|
|
# composite command runs |
138
|
|
|
|
|
|
|
# |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
our %composite_commands = ( |
141
|
|
|
|
|
|
|
); |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
# prefixes only for commands that take params/switches... |
144
|
|
|
|
|
|
|
our %command_prefixes = ( |
145
|
|
|
|
|
|
|
'single' => 'one', |
146
|
|
|
|
|
|
|
'paired' => 'par', |
147
|
|
|
|
|
|
|
'crossbow' => 'crb', |
148
|
|
|
|
|
|
|
'build' => 'bld', |
149
|
|
|
|
|
|
|
'inspect' => 'ins' |
150
|
|
|
|
|
|
|
); |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
our @program_params = qw( |
153
|
|
|
|
|
|
|
command |
154
|
|
|
|
|
|
|
one|qualities |
155
|
|
|
|
|
|
|
one|skip |
156
|
|
|
|
|
|
|
one|upto |
157
|
|
|
|
|
|
|
one|trim5 |
158
|
|
|
|
|
|
|
one|trim3 |
159
|
|
|
|
|
|
|
one|max_seed_mismatches |
160
|
|
|
|
|
|
|
one|max_qual_mismatch |
161
|
|
|
|
|
|
|
one|max_quality_sum |
162
|
|
|
|
|
|
|
one|snp_penalty |
163
|
|
|
|
|
|
|
one|snp_frac |
164
|
|
|
|
|
|
|
one|seed_length |
165
|
|
|
|
|
|
|
one|max_mismatches |
166
|
|
|
|
|
|
|
one|max_backtracks |
167
|
|
|
|
|
|
|
one|max_search_ram |
168
|
|
|
|
|
|
|
one|report_n_alignments |
169
|
|
|
|
|
|
|
one|supress |
170
|
|
|
|
|
|
|
one|supress_random |
171
|
|
|
|
|
|
|
one|offset_base |
172
|
|
|
|
|
|
|
one|defaul_mapq |
173
|
|
|
|
|
|
|
one|sam_rg |
174
|
|
|
|
|
|
|
one|suppress_columns |
175
|
|
|
|
|
|
|
one|alignmed_file |
176
|
|
|
|
|
|
|
one|unaligned_file |
177
|
|
|
|
|
|
|
one|excess_file |
178
|
|
|
|
|
|
|
one|threads |
179
|
|
|
|
|
|
|
one|offrate |
180
|
|
|
|
|
|
|
one|random_seed |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
par|qualities1 |
183
|
|
|
|
|
|
|
par|qualities2 |
184
|
|
|
|
|
|
|
par|min_insert_size |
185
|
|
|
|
|
|
|
par|max_insert_size |
186
|
|
|
|
|
|
|
par|max_mate_attempts |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
bld|max_bucket_block |
189
|
|
|
|
|
|
|
bld|max_bucket_div |
190
|
|
|
|
|
|
|
bld|diff_cover |
191
|
|
|
|
|
|
|
bld|off_rate |
192
|
|
|
|
|
|
|
bld|ftabchars |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
bld|seed |
195
|
|
|
|
|
|
|
bld|cutoff |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
ins|seq_width |
198
|
|
|
|
|
|
|
); |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
our @program_switches = qw( |
201
|
|
|
|
|
|
|
one|fastq |
202
|
|
|
|
|
|
|
one|fasta |
203
|
|
|
|
|
|
|
one|raw |
204
|
|
|
|
|
|
|
one|inline |
205
|
|
|
|
|
|
|
one|color_space |
206
|
|
|
|
|
|
|
one|phred33 |
207
|
|
|
|
|
|
|
one|phred64 |
208
|
|
|
|
|
|
|
one|solexa |
209
|
|
|
|
|
|
|
one|solexa1_3 |
210
|
|
|
|
|
|
|
one|integer_qual |
211
|
|
|
|
|
|
|
one|no_maq_rounding |
212
|
|
|
|
|
|
|
one|no_forward_alignment |
213
|
|
|
|
|
|
|
one|no_reverse_alignment |
214
|
|
|
|
|
|
|
one|try_hard |
215
|
|
|
|
|
|
|
one|all |
216
|
|
|
|
|
|
|
one|best |
217
|
|
|
|
|
|
|
one|strata |
218
|
|
|
|
|
|
|
one|fix_strand_bias |
219
|
|
|
|
|
|
|
one|print_color |
220
|
|
|
|
|
|
|
one|color_quals |
221
|
|
|
|
|
|
|
one|color_keep_ends |
222
|
|
|
|
|
|
|
one|sam_format |
223
|
|
|
|
|
|
|
one|sam_no_head |
224
|
|
|
|
|
|
|
one|sam_no_sq |
225
|
|
|
|
|
|
|
one|concise |
226
|
|
|
|
|
|
|
one|time |
227
|
|
|
|
|
|
|
one|be_quiet |
228
|
|
|
|
|
|
|
one|ref_map |
229
|
|
|
|
|
|
|
one|ref_index |
230
|
|
|
|
|
|
|
one|full_ref_name |
231
|
|
|
|
|
|
|
one|memory_mapped_io |
232
|
|
|
|
|
|
|
one|shared_memory |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
par|forward_reverse |
235
|
|
|
|
|
|
|
par|reverse_reverse |
236
|
|
|
|
|
|
|
par|forward_forward |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
bld|fasta |
239
|
|
|
|
|
|
|
bld|inline |
240
|
|
|
|
|
|
|
bld|color_space |
241
|
|
|
|
|
|
|
bld|both |
242
|
|
|
|
|
|
|
bld|no_auto |
243
|
|
|
|
|
|
|
bld|packed |
244
|
|
|
|
|
|
|
bld|no_diff_cover |
245
|
|
|
|
|
|
|
bld|no_ref |
246
|
|
|
|
|
|
|
bld|just_ref |
247
|
|
|
|
|
|
|
bld|NtoA |
248
|
|
|
|
|
|
|
bld|big_endian |
249
|
|
|
|
|
|
|
bld|little_endian |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
ins|names_only |
252
|
|
|
|
|
|
|
ins|summary |
253
|
|
|
|
|
|
|
ins|reconstruct |
254
|
|
|
|
|
|
|
); |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
# be careful of collisions here - this could do with command specification |
257
|
|
|
|
|
|
|
our %incompat_params = ( |
258
|
|
|
|
|
|
|
qualities => [qw( qualities1 qualities2 )], |
259
|
|
|
|
|
|
|
qualities1 => [qw( qualities )], |
260
|
|
|
|
|
|
|
qualities2 => [qw( qualities )], |
261
|
|
|
|
|
|
|
max_seed_mismatches => [qw( max_mismatches )], |
262
|
|
|
|
|
|
|
max_mismatches => [qw( max_seed_mismatches )], |
263
|
|
|
|
|
|
|
fastq => [qw( fasta raw inline )], |
264
|
|
|
|
|
|
|
fasta => [qw( fastq raw inline )], |
265
|
|
|
|
|
|
|
raw => [qw( fastq fasta inline )], |
266
|
|
|
|
|
|
|
inline => [qw( fastq fasta raw )], |
267
|
|
|
|
|
|
|
phred33 => [qw( phred64 solexa solexa1_3 integer_qual )], |
268
|
|
|
|
|
|
|
phred64 => [qw( phred33 solexa solexa1_3 integer_qual )], |
269
|
|
|
|
|
|
|
solexa => [qw( phred33 phred64 solexa1_3 integer_qual )], |
270
|
|
|
|
|
|
|
solexa1_3 => [qw( phred33 phred64 solexa integer_qual )], |
271
|
|
|
|
|
|
|
integer_qual => [qw( phred33 phred64 solexa solexa1_3 )], |
272
|
|
|
|
|
|
|
no_forward_alignment => [qw( no_reverse_alignment )], |
273
|
|
|
|
|
|
|
no_reverse_alignment => [qw( no_forward_alignment )], |
274
|
|
|
|
|
|
|
all => [qw( report_n_alignments )], |
275
|
|
|
|
|
|
|
report_n_alignments => [qw( all )], |
276
|
|
|
|
|
|
|
forward_reverse => [qw( reverse_reverse forward_forward )], |
277
|
|
|
|
|
|
|
reverse_reverse => [qw( forward_reverse forward_forward )], |
278
|
|
|
|
|
|
|
forward_forward => [qw( reverse_reverse forward_forward )], |
279
|
|
|
|
|
|
|
color_space => [qw( both )], |
280
|
|
|
|
|
|
|
both => [qw( color_space)] |
281
|
|
|
|
|
|
|
); |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
our %corequisite_switches = ( |
284
|
|
|
|
|
|
|
qualities1 => [qw( qualities2 )], |
285
|
|
|
|
|
|
|
qualities2 => [qw( qualities1 )], |
286
|
|
|
|
|
|
|
strata => [qw( best )], |
287
|
|
|
|
|
|
|
suppress_random => [qw( best )], |
288
|
|
|
|
|
|
|
snp_penalty => [qw( color_space )], |
289
|
|
|
|
|
|
|
snp_frac => [qw( color_space )], |
290
|
|
|
|
|
|
|
print_color => [qw( color_space )], |
291
|
|
|
|
|
|
|
color_quals => [qw( color_space )], |
292
|
|
|
|
|
|
|
color_keep_ends => [qw( color_space )], |
293
|
|
|
|
|
|
|
defaul_mapq => [qw( sam_format )], |
294
|
|
|
|
|
|
|
sam_no_head => [qw( sam_format )], |
295
|
|
|
|
|
|
|
sam_no_sq => [qw( sam_format )], |
296
|
|
|
|
|
|
|
sam_rg => [qw( sam_format )] |
297
|
|
|
|
|
|
|
); |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
our %param_translation = ( |
302
|
|
|
|
|
|
|
'one|fastq' => 'q', |
303
|
|
|
|
|
|
|
'one|fasta' => 'f', |
304
|
|
|
|
|
|
|
'one|raw' => 'r', |
305
|
|
|
|
|
|
|
'one|inline' => 'c', |
306
|
|
|
|
|
|
|
'one|color_space' => 'C', |
307
|
|
|
|
|
|
|
'one|qualities' => 'Q', |
308
|
|
|
|
|
|
|
'one|skip' => 's', |
309
|
|
|
|
|
|
|
'one|upto' => 'u', |
310
|
|
|
|
|
|
|
'one|trim5' => '5', |
311
|
|
|
|
|
|
|
'one|trim3' => '3', |
312
|
|
|
|
|
|
|
'one|phred33' => 'phred33-quals', |
313
|
|
|
|
|
|
|
'one|phred64' => 'phred64-quals', |
314
|
|
|
|
|
|
|
'one|solexa' => 'solexa-quals', |
315
|
|
|
|
|
|
|
'one|solexa1_3' => 'solexa1.3-quals', |
316
|
|
|
|
|
|
|
'one|integer_qual' => 'integer-quals', |
317
|
|
|
|
|
|
|
'one|max_seed_mismatches' => 'n', |
318
|
|
|
|
|
|
|
'one|max_qual_mismatch' => 'e', |
319
|
|
|
|
|
|
|
'one|seed_length' => 'l', |
320
|
|
|
|
|
|
|
'one|no_maq_rounding' => 'nomaqround', |
321
|
|
|
|
|
|
|
'one|max_mismatches' => 'v', |
322
|
|
|
|
|
|
|
'one|no_forward_alignment' => 'nofw', |
323
|
|
|
|
|
|
|
'one|no_reverse_alignment' => 'norc', |
324
|
|
|
|
|
|
|
'one|max_backtracks' => 'maxbts', |
325
|
|
|
|
|
|
|
'one|try_hard' => 'y', |
326
|
|
|
|
|
|
|
'one|max_search_ram' => 'chunkmbs', |
327
|
|
|
|
|
|
|
'one|report_n_alignments' => 'k', |
328
|
|
|
|
|
|
|
'one|all' => 'a', |
329
|
|
|
|
|
|
|
'one|supress' => 'm', |
330
|
|
|
|
|
|
|
'one|supress_random' => 'M', |
331
|
|
|
|
|
|
|
'one|best' => 'best', |
332
|
|
|
|
|
|
|
'one|strata' => 'strata', |
333
|
|
|
|
|
|
|
'one|snp_penalty' => 'snpphred', |
334
|
|
|
|
|
|
|
'one|snp_frac' => 'snpfrac', |
335
|
|
|
|
|
|
|
'one|print_color' => 'col-cseq', |
336
|
|
|
|
|
|
|
'one|color_quals' => 'colc-cqual', |
337
|
|
|
|
|
|
|
'one|color_keep_ends' => 'col-keepends', |
338
|
|
|
|
|
|
|
'one|sam_format' => 'S', |
339
|
|
|
|
|
|
|
'one|defaul_mapq' => 'mapq', |
340
|
|
|
|
|
|
|
'one|sam_no_head' => 'sam_nohead', |
341
|
|
|
|
|
|
|
'one|sam_no_sq' => 'sam_nosq', |
342
|
|
|
|
|
|
|
'one|sam_rg' => 'sam-RG', |
343
|
|
|
|
|
|
|
'one|suppress_columns' => 'suppress', |
344
|
|
|
|
|
|
|
'one|time' => 't', |
345
|
|
|
|
|
|
|
'one|offset_base' => 'B', |
346
|
|
|
|
|
|
|
'one|be_quiet' => 'quiet', |
347
|
|
|
|
|
|
|
'one|ref_map' => 'refout', |
348
|
|
|
|
|
|
|
'one|ref_index' => 'refidx', |
349
|
|
|
|
|
|
|
'one|alignmed_file' => 'al', |
350
|
|
|
|
|
|
|
'one|unaligned_file' => 'un', |
351
|
|
|
|
|
|
|
'one|excess_file' => 'max', |
352
|
|
|
|
|
|
|
'one|full_ref_name' => 'fullref', |
353
|
|
|
|
|
|
|
'one|threads' => 'p', |
354
|
|
|
|
|
|
|
'one|offrate' => 'o', |
355
|
|
|
|
|
|
|
'one|memory_mapped_io' => 'mm', |
356
|
|
|
|
|
|
|
'one|shared_memory' => 'shmem', |
357
|
|
|
|
|
|
|
'one|random_seed' => 'seed', |
358
|
|
|
|
|
|
|
'one|version' => 'version', |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
'par|fastq' => 'q', |
361
|
|
|
|
|
|
|
'par|fasta' => 'f', |
362
|
|
|
|
|
|
|
'par|raw' => 'r', |
363
|
|
|
|
|
|
|
'par|inline' => 'c', |
364
|
|
|
|
|
|
|
'par|color_space' => 'C', |
365
|
|
|
|
|
|
|
'par|qualities' => 'Q', # Don't know if bowtie will accept this - won't break if left in |
366
|
|
|
|
|
|
|
'par|qualities1' => 'Q1', |
367
|
|
|
|
|
|
|
'par|qualities2' => 'Q2', |
368
|
|
|
|
|
|
|
'par|skip' => 's', |
369
|
|
|
|
|
|
|
'par|upto' => 'u', |
370
|
|
|
|
|
|
|
'par|trim5' => '5', |
371
|
|
|
|
|
|
|
'par|trim3' => '3', |
372
|
|
|
|
|
|
|
'par|phred33' => 'phred33-quals', |
373
|
|
|
|
|
|
|
'par|phred64' => 'phred64-quals', |
374
|
|
|
|
|
|
|
'par|solexa' => 'solexa-quals', |
375
|
|
|
|
|
|
|
'par|solexa1_3' => 'solexa1.3-quals', |
376
|
|
|
|
|
|
|
'par|integer_qual' => 'integer-quals', |
377
|
|
|
|
|
|
|
'par|max_seed_mismatches' => 'n', |
378
|
|
|
|
|
|
|
'par|max_qual_mismatch' => 'e', |
379
|
|
|
|
|
|
|
'par|seed_length' => 'l', |
380
|
|
|
|
|
|
|
'par|no_maq_rounding' => 'nomaqround', |
381
|
|
|
|
|
|
|
'par|max_mismatches' => 'v', |
382
|
|
|
|
|
|
|
'par|min_insert_size' => 'I', |
383
|
|
|
|
|
|
|
'par|max_insert_size' => 'X', |
384
|
|
|
|
|
|
|
'par|forward_reverse' => 'fr', |
385
|
|
|
|
|
|
|
'par|reverse_forward' => 'rf', |
386
|
|
|
|
|
|
|
'par|forward_forward' => 'ff', |
387
|
|
|
|
|
|
|
'par|no_forward_alignment' => 'nofw', |
388
|
|
|
|
|
|
|
'par|no_reverse_alignment' => 'norc', |
389
|
|
|
|
|
|
|
'par|max_backtracks' => 'maxbts', |
390
|
|
|
|
|
|
|
'par|max_mate_attempts' => 'pairtries', |
391
|
|
|
|
|
|
|
'par|try_hard' => 'y', |
392
|
|
|
|
|
|
|
'par|max_search_ram' => 'chunkmbs', |
393
|
|
|
|
|
|
|
'par|report_n_alignments' => 'k', |
394
|
|
|
|
|
|
|
'par|all' => 'a', |
395
|
|
|
|
|
|
|
'par|suppress' => 'm', |
396
|
|
|
|
|
|
|
'par|suppress_random' => 'M', |
397
|
|
|
|
|
|
|
'par|best' => 'best', |
398
|
|
|
|
|
|
|
'par|strata' => 'strata', |
399
|
|
|
|
|
|
|
'par|snp_penalty' => 'snpphred', |
400
|
|
|
|
|
|
|
'par|snp_frac' => 'snpfrac', |
401
|
|
|
|
|
|
|
'par|print_color' => 'col-cseq', |
402
|
|
|
|
|
|
|
'par|color_quals' => 'colc-cqual', |
403
|
|
|
|
|
|
|
'par|color_keep_ends' => 'col-keepends', |
404
|
|
|
|
|
|
|
'par|sam_format' => 'S', |
405
|
|
|
|
|
|
|
'par|defaul_mapq' => 'mapq', |
406
|
|
|
|
|
|
|
'par|sam_no_head' => 'sam_nohead', |
407
|
|
|
|
|
|
|
'par|sam_no_sq' => 'sam_nosq', |
408
|
|
|
|
|
|
|
'par|sam_rg' => 'sam-RG', |
409
|
|
|
|
|
|
|
'par|suppress_columns' => 'suppress', |
410
|
|
|
|
|
|
|
'par|time' => 't', |
411
|
|
|
|
|
|
|
'par|offset_base' => 'B', |
412
|
|
|
|
|
|
|
'par|be_quiet' => 'quiet', |
413
|
|
|
|
|
|
|
'par|ref_map' => 'refout', |
414
|
|
|
|
|
|
|
'par|ref_index' => 'refidx', |
415
|
|
|
|
|
|
|
'par|alignmed_file' => 'al', |
416
|
|
|
|
|
|
|
'par|unaligned_file' => 'un', |
417
|
|
|
|
|
|
|
'par|excess_file' => 'max', |
418
|
|
|
|
|
|
|
'par|full_ref_name' => 'fullref', |
419
|
|
|
|
|
|
|
'par|threads' => 'p', |
420
|
|
|
|
|
|
|
'par|offrate' => 'o', |
421
|
|
|
|
|
|
|
'par|memory_mapped_io' => 'mm', |
422
|
|
|
|
|
|
|
'par|shared_memory' => 'shmem', |
423
|
|
|
|
|
|
|
'par|random_seed' => 'seed', |
424
|
|
|
|
|
|
|
'par|version' => 'version', |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
'crb|fastq' => 'q', |
427
|
|
|
|
|
|
|
'crb|fasta' => 'f', |
428
|
|
|
|
|
|
|
'crb|raw' => 'r', |
429
|
|
|
|
|
|
|
'crb|inline' => 'c', |
430
|
|
|
|
|
|
|
'crb|color_space' => 'C', |
431
|
|
|
|
|
|
|
'crb|qualities' => 'Q', |
432
|
|
|
|
|
|
|
'crb|skip' => 's', |
433
|
|
|
|
|
|
|
'crb|upto' => 'u', |
434
|
|
|
|
|
|
|
'crb|trim5' => '5', |
435
|
|
|
|
|
|
|
'crb|trim3' => '3', |
436
|
|
|
|
|
|
|
'crb|phred33' => 'phred33-quals', |
437
|
|
|
|
|
|
|
'crb|phred64' => 'phred64-quals', |
438
|
|
|
|
|
|
|
'crb|solexa' => 'solexa-quals', |
439
|
|
|
|
|
|
|
'crb|solexa1_3' => 'solexa1.3-quals', |
440
|
|
|
|
|
|
|
'crb|integer_qual' => 'integer-quals', |
441
|
|
|
|
|
|
|
'crb|max_seed_mismatches' => 'n', |
442
|
|
|
|
|
|
|
'crb|max_qual_mismatch' => 'e', |
443
|
|
|
|
|
|
|
'crb|seed_length' => 'l', |
444
|
|
|
|
|
|
|
'crb|no_maq_rounding' => 'nomaqround', |
445
|
|
|
|
|
|
|
'crb|max_mismatches' => 'v', |
446
|
|
|
|
|
|
|
'crb|min_insert_size' => 'I', |
447
|
|
|
|
|
|
|
'crb|max_insert_size' => 'X', |
448
|
|
|
|
|
|
|
'crb|forward_reverse' => 'fr', |
449
|
|
|
|
|
|
|
'crb|reverse_forward' => 'rf', |
450
|
|
|
|
|
|
|
'crb|forward_forward' => 'ff', |
451
|
|
|
|
|
|
|
'crb|no_forward_alignment' => 'nofw', |
452
|
|
|
|
|
|
|
'crb|no_reverse_alignment' => 'norc', |
453
|
|
|
|
|
|
|
'crb|max_backtracks' => 'maxbts', |
454
|
|
|
|
|
|
|
'crb|max_mate_attempts' => 'pairtries', |
455
|
|
|
|
|
|
|
'crb|try_hard' => 'y', |
456
|
|
|
|
|
|
|
'crb|max_search_ram' => 'chunkmbs', |
457
|
|
|
|
|
|
|
'crb|report_n_alignments' => 'k', |
458
|
|
|
|
|
|
|
'crb|all' => 'a', |
459
|
|
|
|
|
|
|
'crb|suppress' => 'm', |
460
|
|
|
|
|
|
|
'crb|suppress_random' => 'M', |
461
|
|
|
|
|
|
|
'crb|best' => 'best', |
462
|
|
|
|
|
|
|
'crb|strata' => 'strata', |
463
|
|
|
|
|
|
|
'crb|snp_penalty' => 'snpphred', |
464
|
|
|
|
|
|
|
'crb|snp_frac' => 'snpfrac', |
465
|
|
|
|
|
|
|
'crb|print_color' => 'col-cseq', |
466
|
|
|
|
|
|
|
'crb|color_quals' => 'colc-cqual', |
467
|
|
|
|
|
|
|
'crb|color_keep_ends' => 'col-keepends', |
468
|
|
|
|
|
|
|
'crb|sam_format' => 'S', |
469
|
|
|
|
|
|
|
'crb|defaul_mapq' => 'mapq', |
470
|
|
|
|
|
|
|
'crb|sam_no_head' => 'sam_nohead', |
471
|
|
|
|
|
|
|
'crb|sam_no_sq' => 'sam_nosq', |
472
|
|
|
|
|
|
|
'crb|sam_rg' => 'sam-RG', |
473
|
|
|
|
|
|
|
'crb|suppress_columns' => 'suppress', |
474
|
|
|
|
|
|
|
'crb|time' => 't', |
475
|
|
|
|
|
|
|
'crb|offset_base' => 'B', |
476
|
|
|
|
|
|
|
'crb|be_quiet' => 'quiet', |
477
|
|
|
|
|
|
|
'crb|ref_map' => 'refout', |
478
|
|
|
|
|
|
|
'crb|ref_index' => 'refidx', |
479
|
|
|
|
|
|
|
'crb|alignmed_file' => 'al', |
480
|
|
|
|
|
|
|
'crb|unaligned_file' => 'un', |
481
|
|
|
|
|
|
|
'crb|excess_file' => 'max', |
482
|
|
|
|
|
|
|
'crb|full_ref_name' => 'fullref', |
483
|
|
|
|
|
|
|
'crb|threads' => 'p', |
484
|
|
|
|
|
|
|
'crb|offrate' => 'o', |
485
|
|
|
|
|
|
|
'crb|memory_mapped_io' => 'mm', |
486
|
|
|
|
|
|
|
'crb|shared_memory' => 'shmem', |
487
|
|
|
|
|
|
|
'crb|random_seed' => 'seed', |
488
|
|
|
|
|
|
|
'crb|version' => 'version', |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
'bld|fasta' => 'f', |
491
|
|
|
|
|
|
|
'bld|inline' => 'c', |
492
|
|
|
|
|
|
|
'bld|color_space' => 'C', |
493
|
|
|
|
|
|
|
'bld|both' => 'B', |
494
|
|
|
|
|
|
|
'bld|no_auto' => 'a', |
495
|
|
|
|
|
|
|
'bld|packed' => 'p', |
496
|
|
|
|
|
|
|
'bld|max_bucket_block' => 'bmax', |
497
|
|
|
|
|
|
|
'bld|max_bucket_div' => 'bmaxdivn', |
498
|
|
|
|
|
|
|
'bld|diff_cover' => 'dcv', |
499
|
|
|
|
|
|
|
'bld|no_diff_cover' => 'nodc', |
500
|
|
|
|
|
|
|
'bld|no_ref' => 'r', |
501
|
|
|
|
|
|
|
'bld|just_ref' => '3', |
502
|
|
|
|
|
|
|
'bld|off_rate' => 'o', |
503
|
|
|
|
|
|
|
'bld|ftabchars' => 't', |
504
|
|
|
|
|
|
|
'bld|NtoA' => 'ntoa', |
505
|
|
|
|
|
|
|
'bld|big_endian' => 'big', |
506
|
|
|
|
|
|
|
'bld|little_endian' => 'little', |
507
|
|
|
|
|
|
|
'bld|seed' => 'seed', |
508
|
|
|
|
|
|
|
'bld|cutoff' => 'cutoff', |
509
|
|
|
|
|
|
|
'bld|version' => 'version', |
510
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
'ins|seq_width' => 'a', |
512
|
|
|
|
|
|
|
'ins|names_only' => 'n', |
513
|
|
|
|
|
|
|
'ins|summary' => 's', |
514
|
|
|
|
|
|
|
'ins|reconstruct' => 'e', |
515
|
|
|
|
|
|
|
'ins|version' => 'version' |
516
|
|
|
|
|
|
|
); |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
# |
519
|
|
|
|
|
|
|
# the order in the arrayrefs is the order required |
520
|
|
|
|
|
|
|
# on the command line |
521
|
|
|
|
|
|
|
# |
522
|
|
|
|
|
|
|
# the strings in the arrayrefs (less special chars) |
523
|
|
|
|
|
|
|
# become the keys for named parameters to run_bowtie |
524
|
|
|
|
|
|
|
# |
525
|
|
|
|
|
|
|
# special chars: |
526
|
|
|
|
|
|
|
# |
527
|
|
|
|
|
|
|
# '#' implies optional |
528
|
|
|
|
|
|
|
# '*' implies variable number of this type |
529
|
|
|
|
|
|
|
# <|> implies stdin/stdout redirect |
530
|
|
|
|
|
|
|
# |
531
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
our %command_files = ( |
533
|
|
|
|
|
|
|
'single' => [qw( ind seq #out )], |
534
|
|
|
|
|
|
|
'paired' => [qw( ind -1|seq -2|seq2 #out )], |
535
|
|
|
|
|
|
|
'crossbow' => [qw( ind -12|seq #out )], |
536
|
|
|
|
|
|
|
'build' => [qw( ref #out )], |
537
|
|
|
|
|
|
|
'inspect' => [qw( ind >#out )] |
538
|
|
|
|
|
|
|
); |
539
|
|
|
|
|
|
|
|
540
|
|
|
|
|
|
|
our %accepted_types = ( # ind is not a single file, so not included here |
541
|
|
|
|
|
|
|
'seq' => [qw( fasta fastq raw crossbow )], |
542
|
|
|
|
|
|
|
'seq2' => [qw( fasta fastq raw )], |
543
|
|
|
|
|
|
|
'ref' => [qw( fasta )] |
544
|
|
|
|
|
|
|
); |
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
foreach (@program_params) { |
547
|
|
|
|
|
|
|
push @program_params, "par\|".$1 if (m/^one\|(.*)/); |
548
|
|
|
|
|
|
|
push @program_params, "crb\|".$1 if (m/^par\|(.*)/) && !(m/^par\|(?:fasta|fastq|raw|qualities[12])/); |
549
|
|
|
|
|
|
|
} |
550
|
|
|
|
|
|
|
foreach (@program_switches) { |
551
|
|
|
|
|
|
|
push @program_switches, "par\|".$1 if (m/^one\|(.*)/); |
552
|
|
|
|
|
|
|
push @program_switches, "crb\|".$1 if (m/^par\|(.*)/) && !(m/^par\|(?:fasta|fastq|raw)/); |
553
|
|
|
|
|
|
|
} |
554
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
1; |