This file is indexed.

/usr/share/perl5/Bio/Tools/Run/BEDTools/Config.pm is in libbio-perl-run-perl 1.6.9-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
# $Id: Config.pm kortsch $
#
# BioPerl module for Bio::Tools::Run::BEDTools::Config
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Dan Kortschak <dan.kortschak@adelaide.edu.au>
#
# Copyright Dan Kortschak
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::Tools::Run::BEDTools::Config - Configuration data for bowtie commands

=head1 SYNOPSIS

Used internally by L<Bio::Tools::Run::BEDTools>.

=head1 DESCRIPTION

This package exports information describing BEDTools commands, parameters,
switches, and input and output filetypes for individual BEDTools commands.

=head1 FEEDBACK

=head2 Mailing Lists

User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list.  Your participation is much appreciated.

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

=head2 Support

Please direct usage questions or support issues to the mailing list:

L<bioperl-l@bioperl.org>

rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.

=head2 Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
the web:

  http://redmine.open-bio.org/projects/bioperl/

=head1 AUTHOR - Dan Kortschak

Email dan.kortschak adelaide.edu.au

=head1 CONTRIBUTORS

Additional contributors names and emails here

=head1 APPENDIX

The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _

=cut

# Let the code begin...


package Bio::Tools::Run::BEDTools::Config;
use strict;
use warnings;
no warnings qw(qw);
use Bio::Root::Root;
use Exporter;
use base qw(Bio::Root::Root);

our (@ISA, @EXPORT, @EXPORT_OK);
push @ISA, 'Exporter';
@EXPORT = qw(
             @program_commands
             %command_executables
             %format_lookup
             %command_prefixes
             %composite_commands
             @program_params
             @program_switches
             %param_translation
             %command_files
             %accepted_types
            );

@EXPORT_OK = qw();



our @program_commands = qw(
    annotate         fasta_from_bed       overlap              
    bam_to_bed       genome_coverage      pair_to_pair         
    bed_to_bam       graph_union          pair_to_bed          
    bed_to_IGV       group_by             shuffle              
    b12_to_b6        intersect            slop                 
    closest          links                sort                 
    complement       mask_fasta_from_bed  subtract             
    coverage         merge                window               
);


our %command_executables = (
    'annotate'             => 'annotateBed',
    'bam_to_bed'           => 'bamToBed',
    'bed_to_bam'           => 'bedToBam',
    'bed_to_IGV'           => 'bedToIgv',
    'b12_to_b6'            => 'bed12ToBed6',
    'fasta_from_bed'       => 'fastaFromBed',
    'mask_fasta_from_bed'  => 'maskFastaFromBed',
    'shuffle'              => 'shuffleBed',
    'window'               => 'windowBed',
    'closest'              => 'closestBed',
    'genome_coverage'      => 'genomeCoverageBed',
    'merge'                => 'mergeBed',
    'slop'                 => 'slopBed',
    'complement'           => 'complementBed',
    'intersect'            => 'intersectBed',
    'pair_to_bed'          => 'pairToBed',
    'sort'                 => 'sortBed',
    'coverage'             => 'coverageBed',
    'links'                => 'linksBed',
    'pair_to_pair'         => 'pairToPair',
    'subtract'             => 'subtractBed',
    'overlap'              => 'overlap',
    'group_by'             => 'groupBy',
    'graph_union'          => 'unionBedGraphs'
    );

our %format_lookup = (
    'annotate'             => 'bed',
    'bam_to_bed'           => 'bed',
    'bed_to_bam'           => 'bam',
    'bed_to_IGV'           => 'igv',
    'b12_to_b6'            => 'bed',
    'closest'              => 'bedpe',
    'complement'           => 'bed',
    'coverage'             => 'bed',
    'fasta_from_bed'       => 'fasta',
    'genome_coverage'      => 'tab',
    'graph_union'          => 'bg',
    'group_by'             => 'bed',
    'intersect'            => 'bed|bam',
    'links'                => 'html',
    'mask_fasta_from_bed'  => 'fasta',
    'merge'                => 'bed',
    'overlap'              => 'bed',
    'pair_to_bed'          => 'bedpe|bam',
    'pair_to_pair'         => 'bedpe',
    'slop'                 => 'bed',
    'shuffle'              => 'bed',
    'sort'                 => 'bed',
    'subtract'             => 'bed',
    'window'               => 'bedpe'
    );


# composite commands: pseudo-commands that run a 
# sequence of commands
# composite command prefix => list of prefixes of commands this
# composite command runs
#

our %composite_commands = (
    );

# prefixes only for commands that take params/switches...
our %command_prefixes = (
    'annotate'             => 'ann',
    'bam_to_bed'           => 'ate',
    'bed_to_bam'           => 'eta',
    'bed_to_IGV'           => 'eti',
    'b12_to_b6'            => '126',
    'fasta_from_bed'       => 'ffb',
    'mask_fasta_from_bed'  => 'mfb',
    'shuffle'              => 'shb',
    'window'               => 'wib',
    'closest'              => 'clb',
    'genome_coverage'      => 'gcb',
    'merge'                => 'meb',
    'slop'                 => 'slb',
    'complement'           => 'cob',
    'intersect'            => 'inb',
    'pair_to_bed'          => 'ptb',
    'sort'                 => 'sob',
    'coverage'             => 'cvb',
    'links'                => 'lib',
    'pair_to_pair'         => 'ptp',
    'subtract'             => 'sub',
    'overlap'              => 'ove',
    'group_by'             => 'grp',
    'graph_union'          => 'ubg'
    );

our @program_params = qw(
    command
    
    ate|tag
    ate|color
    
    eta|quality
    
    eti|path
    eti|session
    eti|sort
    eti|slop
    eti|image
    
    shb|exclude
    shb|seed
    
    wib|window_size
    wib|left_window_size
    wib|right_window_size
    
    clb|ties_policy
    
    gcb|max_depth
    gcb|strand
    
    meb|max_distance
    
    slb|add_bidirectional
    slb|add_to_left
    slb|add_to_right
    
    inb|minimum_overlap
    
    ptb|minimum_overlap
    ptb|type
    
    ptp|minimum_overlap
    ptp|type
    ptp|slop
    
    sub|minimum_overlap
    
    lib|basename
    lib|organism
    lib|genome_build
    
    ove|columns
    
    grp|group
    grp|columns
    grp|operations
    
    ubg|names
    ubg|filler
    );

our @program_switches = qw(
    ann|names
    ann|count
    ann|both
    ann|strandedness
    
    ate|write_bedpe
    ate|use_edit_distance
    ate|bam12
    ate|split
    ate|use_edit_distance
    ate|cigar
    
    eta|uncompressed
    eta|bed12
    
    eti|collapse
    eti|name
    
    ffb|use_bed_name
    ffb|output_tab_format
    ffb|strandedness
    
    gcb|bedgraph
    gcb|bedgraph_all
    gcb|split
    
    mfb|soft_mask
    
    shb|keep_chromosome
    
    wib|define_by_strand
    wib|same_strand
    wib|report_once_only
    wib|report_hits
    wib|invert
    
    clb|strandedness
    clb|report_distance
    
    gcb|report_pos_depth
    
    meb|strandedness
    meb|report_n_merged
    meb|report_names_merged
    
    slb|define_by_strand
    
    inb|write_bed
    inb|write_entry_1
    inb|write_entry_2
    inb|report_once_only
    inb|report_n_hits
    inb|invert_match
    inb|reciprocal
    inb|strandedness
    inb|write_overlap
    inb|write_overlap_all
    inb|split
    
    ptb|write_bedpe
    ptb|strandedness
    ptb|use_edit_distance
    ptb|write_uncompressed
    
    sob|size_asc
    sob|size_desc
    sob|chr_size_asc
    sob|chr_size_desc
    sob|chr_score_asc
    sob|chr_score_desc
    
    cvb|strandedness
    cvb|histogram
    cvb|depth
    cvb|split
    
    ptp|ignore_strand
    ptp|slop_strandedness
    ptp|no_self_hits
    
    sub|strandedness
    
    ubg|header
    ubg|empty
    );

our %param_translation = (
    'ann|names'                    => 'names',
    'ann|counts'                   => 'counts',
    'ann|both'                     => 'both',
    'ann|strandedness'             => 's',
    
    'ate|write_bedpe'              => 'bedpe',
    'ate|use_edit_distance'        => 'ed',
    'ate|bam12'                    => 'bam12',
    'ate|split'                    => 'split',
    'ate|use_edit_distance'        => 'ed',
    'ate|tag'                      => 'tag',
    'ate|color'                    => 'color',
    'ate|cigar'                    => 'cigar',
    
    'eta|quality'                  => 'maqp',
    'eta|uncompressed'             => 'ubam',
    'eta|bed12'                    => 'bed12',
    
    'eti|path'                     => 'path',
    'eti|session'                  => 'sess',
    'eti|sort'                     => 'sort',
    'eti|collapse'                 => 'clps',
    'eti|name'                     => 'name',
    'eti|slop'                     => 'slop',
    'eti|image'                    => 'img',
    
    'ffb|use_bed_name'             => 'names',
    'ffb|output_tab_format'        => 'tab',
    'ffb|strandedness'             => 's',
    
    'mfb|soft_mask'                => 'soft',
    
    'shb|keep_chromosome'          => 'chrom',
    'shb|exclude'                  => 'excl',
    'shb|seed'                     => 'seed',
    
    'wib|define_by_strand'         => 'sw',
    'wib|same_strand'              => 'sm',
    'wib|report_once_only'         => 'u',
    'wib|report_hits'              => 'c',
    'wib|invert'                   => 'v',
    'wib|window_size'              => 'w',
    'wib|left_window_size'         => 'l',
    'wib|right_window_size'        => 'r',
    
    'clb|strandedness'             => 's',
    'clb|report_distance'          => 'd',
    'clb|ties_policy'              => 't',
    
    'gcb|report_pos_depth'         => 'd',
    'gcb|max_depth'                => 'max',
    'gcb|bedgraph'                 => 'bg',
    'gcb|bedgraph_all'             => 'bga',
    'gcb|split'                    => 'split',
    'gcb|strand'                   => 'strand',
    
    'meb|strandedness'             => 's',
    'meb|report_n_merged'          => 'n',
    'meb|report_names_merged'      => 'nms',
    'meb|max_distance'             => 'd',
    
    'slb|define_by_strand'         => 's',
    'slb|add_bidirectional'        => 'b',
    'slb|add_to_left'              => 'l',
    'slb|add_to_right'             => 'r',
    
    'inb|write_bed'                => 'bed',
    'inb|write_entry_1'            => 'wa',
    'inb|write_entry_2'            => 'wb',
    'inb|write_overlap'            => 'wo',
    'inb|write_overlap_all'        => 'woa',
    'inb|report_once_only'         => 'u',
    'inb|report_n_hits'            => 'c',
    'inb|invert_match'             => 'v',
    'inb|reciprocal'               => 'r',
    'inb|strandedness'             => 's',
    'inb|minimum_overlap'          => 'f',
    'inb|split'                    => 'split',
    
    'ptb|write_bedpe'              => 'bedpe',
    'ptb|strandedness'             => 's',
    'ptb|minimum_overlap'          => 'f',
    'ptb|type'                     => 'type',
    'ptb|use_edit_distance'        => 'ed',
    'ptb|write_uncompressed'       => 'ubam',
    
    'sob|size_asc'                 => 'sizeA',
    'sob|size_desc'                => 'sizeD',
    'sob|chr_size_asc'             => 'chrThenSizeA',
    'sob|chr_size_desc'            => 'chrThenSizeD',
    'sob|chr_score_asc'            => 'chrThenScoreA',
    'sob|chr_score_desc'           => 'chrThenScoreD',
    
    'cvb|strandedness'             => 's',
    'cvb|histogram'                => 'hist',
    'cvb|depth'                    => 'd',
    'cvb|split'                    => 'split',
    
    'ptp|ignore_strand'            => 'is',
    'ptp|slop_strandedness'        => 'ss',
    'ptp|minimum_overlap'          => 'f',
    'ptp|type'                     => 'type',
    'ptp|slop'                     => 'slop',
    'ptp|no_self_hits'             => 'rdn',
    
    'sub|strandedness'             => 's',
    'sub|minimum_overlap'          => 'f',

    'lib|basename'                 => 'base',
    'lib|organism'                 => 'org',
    'lib|genome_build'             => 'db',
    
    'ove|columns'                  => 'cols',
    
    'grp|group'                    => 'grp',
    'grp|columns'                  => 'opCols',
    'grp|operations'               => 'ops',
    
    'ubg|header'                   => 'header',
    'ubg|names'                    => 'names',
    'ubg|empty'                    => 'empty',
    'ubg|filler'                   => 'filler'
    );

#
# the order in the arrayrefs is the order required
# on the command line
#
# the strings in the arrayrefs (less special chars)
# become the keys for named parameters to run_bowtie
# 
# special chars:
#
# '#' implies optional
# '*' implies variable number of this type
# <|> implies stdin/stdout redirect
#

our %command_files = (
    'annotate'             => [qw( -i|bgv -files|*ann >#out )],
    'bam_to_bed'           => [qw( -i|bam >#out )],
    'bed_to_bam'           => [qw( -i|bgv -g|genome >#out )],
    'bed_to_IGV'           => [qw( -i|bgv >#out )],
    'b12_to_b6'            => [qw( -i|bed >#out )],
    'fasta_from_bed'       => [qw( -fi|seq -bed|bgv -fo|#out )],
    'mask_fasta_from_bed'  => [qw( -fi|seq -bed|bgv -fo|#out )],
    'shuffle'              => [qw( -i|bgv -g|genome >#out )],
    'window'               => [qw( -a|bgv1 -b|bgv2 >#out )],
    'closest'              => [qw( -a|bgv1 -b|bgv2 >#out )],
    'genome_coverage'      => [qw( -i|bed -g|genome >#out )],
    'merge'                => [qw( -i|bgv >#out )],
    'slop'                 => [qw( -i|bgv -g|genome >#out )],
    'complement'           => [qw( -i|bgv -g|genome >#out )],
    'intersect'            => [qw( -a|#bgv1 -abam|#bam -b|bgv2 >#out )], # (bgv1|bam) required
    'pair_to_bed'          => [qw( -a|#bedpe -abam|#bam -b|bgv >#out )], # (bedpe|bam) required
    'sort'                 => [qw( -i|bgv >#out )],
    'coverage'             => [qw( -a|bgv1 -b|bgv2 >#out )],
    'links'                => [qw( -i|bgv >#out )],
    'pair_to_pair'         => [qw( -a|bedpe1 -b|bedpe2 >#out )],
    'subtract'             => [qw( -a|bgv1 -b|bgv2 >#out )],
    'group_by'             => [qw( -i|bed >#out )],
    'graph_union'          => [qw( -i|*bg -g|#genome >#out )],
    'overlap'              => [qw( -i|bed >#out )]
    );

our %accepted_types = (
    'ann'        => [qw( tab vcf gff )], # BEDTools now has multiple accepted input formats: bed/gff/vcf
    'bam'        => [qw()],              # we need a test for this
    'bed'        => [qw( tab )],
    'bgv'        => [qw( tab vcf gff )], # BEDTools now has multiple accepted input formats: bed/gff/vcf
    'bgv1'       => [qw( tab vcf gff )], # BEDTools now has multiple accepted input formats: bed/gff/vcf
    'bgv2'       => [qw( tab vcf gff )], # BEDTools now has multiple accepted input formats: bed/gff/vcf
    'bedpe'      => [qw( tab )],
    'bedpe1'     => [qw( tab )],
    'bedpe2'     => [qw( tab )],
    'seq'        => [qw( fasta )],
    'genome'     => [qw( tab )],
    'bg'         => [qw( tab )]
    );

1;