File Coverage

blib/lib/Bio/Tools/Run/Samtools/Config.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             #
2             # BioPerl module for Bio::Tools::Run::Samtools::Config
3             #
4             # Please direct questions and support issues to
5             #
6             # Cared for by Mark A. Jensen
7             #
8             # Copyright Mark A. Jensen
9             #
10             # You may distribute this module under the same terms as perl itself
11              
12             # POD documentation - main docs before the code
13              
14             =head1 NAME
15              
16             Bio::Tools::Run::Samtools::Config - configurator for Bio::Tools::Run::Samtools
17              
18             =head1 SYNOPSIS
19              
20             Not used directly.
21              
22             =head1 DESCRIPTION
23              
24             Exports global configuration variables (as required by
25             L) to Samtools.pm.
26              
27             =head1 FEEDBACK
28              
29             =head2 Mailing Lists
30              
31             User feedback is an integral part of the evolution of this and other
32             Bioperl modules. Send your comments and suggestions preferably to
33             the Bioperl mailing list. Your participation is much appreciated.
34              
35             bioperl-l@bioperl.org - General discussion
36             http://bioperl.org/wiki/Mailing_lists - About the mailing lists
37              
38             =head2 Support
39              
40             Please direct usage questions or support issues to the mailing list:
41              
42             L
43              
44             rather than to the module maintainer directly. Many experienced and
45             reponsive experts will be able look at the problem and quickly
46             address it. Please include a thorough description of the problem
47             with code and data examples if at all possible.
48              
49             =head2 Reporting Bugs
50              
51             Report bugs to the Bioperl bug tracking system to help us keep track
52             of the bugs and their resolution. Bug reports can be submitted via
53             the web:
54              
55             http://redmine.open-bio.org/projects/bioperl
56              
57             =head1 AUTHOR - Mark A. Jensen
58              
59             Email maj -at- fortinbras -dot- us
60              
61             =head1 APPENDIX
62              
63             The rest of the documentation details each of the object methods.
64             Internal methods are usually preceded with a _
65              
66             =cut
67              
68             # Let the code begin...
69              
70             package Bio::Tools::Run::Samtools::Config;
71 3     3   11 use strict;
  3         3  
  3         70  
72 3     3   9 use warnings;
  3         3  
  3         63  
73 3     3   14 no warnings qw(qw);
  3         3  
  3         76  
74 3     3   9 use Exporter;
  3         3  
  3         725  
75              
76             our (@ISA, @EXPORT, @EXPORT_OK);
77             push @ISA, 'Exporter';
78             @EXPORT = qw(
79             $program_dir
80             @program_commands
81             %command_prefixes
82             @program_params
83             @program_switches
84             %param_translation
85             %command_files
86             );
87              
88             @EXPORT_OK = qw();
89              
90             our $program_dir;
91             our @program_commands = qw(
92             view
93             sort
94             index
95             merge
96             faidx
97             pileup
98             fixmate
99             rmdup
100             fillmd
101             );
102              
103             # composite commands: pseudo-commands that run a
104             # sequence of commands
105             # composite command prefix => list of prefixes of commands this
106             # composite command runs
107             #
108              
109             # prefixes only for commands that take params/switches...
110             our %command_prefixes = (
111             'view' => 'view',
112             'sort' => 'srt',
113             'index' => 'idx',
114             'merge' => 'mrg',
115             'faidx' => 'fai',
116             'pileup' => 'pup',
117             'fillmd' => 'fmd'
118             );
119              
120             our @program_params = qw(
121             command
122             view|tab_delim
123             view|out_file
124             view|pass_flags
125             view|filt_flags
126             view|refseq
127             view|qual_threshold
128             view|library
129             view|read_group
130             srt|mem_hint
131             mrg|headers_in
132             pup|refseq
133             pup|map_qcap
134             pup|ref_list
135             pup|site_list
136             pup|theta
137             pup|n_haplos
138             pup|exp_hap_diff
139             pup|indel_prob
140             );
141              
142             our @program_switches = qw(
143             view|bam_output
144             view|uncompressed
145             view|add_header
146             view|only_header
147             view|sam_input
148             srt|sort_by_names
149             mrg|sort_by_names
150             pup|qual_last_col
151             pup|sam_input
152             pup|indels_only
153             pup|call_cons
154             pup|genot_L
155             fmd|match_with_eq
156             );
157              
158             our %param_translation = (
159             'view|tab_delim' => 't',
160             'view|out_file' => 'o',
161             'view|pass_flags' => 'f',
162             'view|refseq' => 'T',
163             'view|filt_flags' => 'F',
164             'view|qual_threshold' => 'q',
165             'view|library' => 'l',
166             'view|read_group' => 'r',
167             'view|bam_output' => 'b',
168             'view|uncompressed' => 'u',
169             'view|add_header' => 'h',
170             'view|only_header' => 'H',
171             'view|sam_input' => 'S',
172             'srt|mem_hint' => 'm',
173             'srt|sort_by_names' => 'n',
174             'mrg|headers_in' => 'h',
175             'mrg|sort_by_names' => 'n',
176             'pup|refseq' => 'f',
177             'pup|map_qcap' => 'M',
178             'pup|ref_list' => 't',
179             'pup|site_list' => 'l',
180             'pup|theta' => 'T',
181             'pup|n_haplos' => 'N',
182             'pup|exp_hap_diff' => 'f',
183             'pup|indel_prob' => 'I',
184             'pup|qual_last_col' => 's',
185             'pup|sam_input' => 'S',
186             'pup|indels_only' => 'i',
187             'pup|call_cons' => 'c',
188             'pup|genot_L' => 'g',
189             'fmd|match_with_eq' => 'e'
190             );
191              
192             #
193             # the order in the arrayrefs is the order required
194             # on the command line
195             #
196             # the strings in the arrayrefs (less special chars)
197             # become the keys for named parameters to run_maq
198             #
199             # special chars:
200             #
201             # '#' implies optional
202             # '*' implies variable number of this type
203             # <|> implies stdin/stdout redirect
204             #
205              
206             our %command_files = (
207             'view' => [qw( bam #*rgn >out )],
208             'sort' => [qw( bam >pfx )],
209             'index' => [qw( bam )],
210             'merge' => [qw( obm *ibm )],
211             'faidx' => [qw( fas #*rgn )],
212             'pileup' => [qw( bam >out )],
213             'fixmate' => [qw( ibm obm )],
214             'rmdup' => [qw( ibm obm )],
215             'fillmd' => [qw( bam fas )]
216             );
217              
218             1;