script/forty-two.pl untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 39 CC 2 SCAR 11.5
CC
2
Cov
0%
BEGIN
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.1
1 #!/usr/bin/env perl
2 # PODNAME: forty-two.pl
3 # ABSTRACT: The Answer to the Ultimate Question of Phylogenomics
4 # CONTRIBUTOR: Mick VAN VLIERBERGHE <mvanvlierberghe@doct.uliege.be>
5  
6 use Modern::Perl '2011';
7  
8 use Getopt::Euclid qw(:vars);
9  
10 ## no critic (RequireLocalizedPunctuationVars)
11 BEGIN{
12 $ENV{Smart_Comments} = $ARGV_verbosity
13 ? join q{ }, map { '#' x (2 + $_) } 1..$ARGV_verbosity
14 : q{}
15 ;
16 }
17 ## use critic
18  
19 use Smart::Comments -ENV;
20 use Config::Any;
21  
22 use aliased 'Bio::MUST::Apps::FortyTwo';
23  
24 # read configuration file
25 my $config = Config::Any->load_files( {
26 files => [ $ARGV_config ],
27 flatten_to_hash => 1,
28 use_ext => 1,
29 } );
30  
31 # build ft object
32 # Note: default args are propagated to all orgs
33 my $ft = FortyTwo->new(
34 config => $config->{$ARGV_config},
35 infiles => \@ARGV_infiles,
36 );
37  
38 # use ft as factory for run_proc object
39 # Note: CLI parameters are introduced here
40 my %args;
41 $args{debug_mode} = $ARGV_verbosity > 5 ? 1 : 0;
42 $args{out_dir} = $ARGV_outdir if $ARGV_outdir;
43 $args{threads} = $ARGV_threads;
44 my $rp = $ft->run_proc(\%args);
45  
46 __END__
47  
48 =pod
49  
50 =head1 NAME
51  
52 forty-two.pl - The Answer to the Ultimate Question of Phylogenomics
53  
54 =head1 VERSION
55  
56 version 0.213470
57  
58 =head1 USAGE
59  
60 ______ __ ______
61 / ____/___ _____/ /___ __ /_ __/ ______
62 / /_ / __ \/ ___/ __/ / / /_____/ / | | /| / / __ \
63 / __/ / /_/ / / / /_/ /_/ /_____/ / | |/ |/ / /_/ /
64 /_/ \____/_/ \__/\__, / /_/ |__/|__/\____/
65 /____/
66  
67 forty-two.pl <infiles> --config=<file> [optional arguments]
68  
69 =head1 REQUIRED ARGUMENTS
70  
71 =over
72  
73 =item <infiles>
74  
75 Path to input ALI (or FASTA) files [repeatable argument].
76  
77 forty-two should not be called in a shell loop. If so it will run very
78 slowly, especially when using tax filters (because loading the NCBI Taxonomy
79 database is quite long). Use shell jokers instead:
80  
81 forty-two.pl --config=config.yaml rpl*.ali rps*.ali
82  
83 =for Euclid: infiles.type: readable
84 repeatable
85  
86 =item --config=<file>
87  
88 Path to the configuration file specifying the run details.
89  
90 In principle, several configuration file formats are available: XML, JSON,
91 YAML. However, forty-two was designed with YAML in mind. See the C<test>
92 directory of the distribution for annotated examples of YAML files.
93  
94 =for Euclid: file.type: readable
95  
96 =back
97  
98 =head1 OPTIONAL ARGUMENTS
99  
100 =over
101  
102 =item --threads=<n>
103  
104 Number of threads to run in parallel [default: n.default]. Parallelization is
105 achieved by processing several ALI files in parallel using an internal queue.
106 Therefore, the specified number of threads should not be larger than the
107 number of input ALI files.
108  
109 =for Euclid: n.type: +int
110 n.default: 1
111  
112 =item --outdir=<dir>
113  
114 Optional output dir that will contain the enriched ALI files and/or taxonomic
115 reports (will be created if needed) [default: none]. Otherwise, output files
116 will be written in the same directory as input files.
117  
118 =for Euclid: dir.type: writable
119  
120 =item --verbosity=<level>
121  
122 Verbosity level for logging to STDERR [default: level.default]. Available
123 levels range from 0 to 6. Level 6 corresponds to debugging mode.
124  
125 =for Euclid: level.type: int, level >= 0 && level <= 6
126 level.default: 0
127  
128 =item --version
129  
130 =item --usage
131  
132 =item --help
133  
134 =item --man
135  
136 Print the usual program information
137  
138 =back
139  
140 =head1 AUTHOR
141  
142 Denis BAURAIN <denis.baurain@uliege.be>
143  
144 =head1 CONTRIBUTOR
145  
146 =for stopwords Mick VAN VLIERBERGHE
147  
148 Mick VAN VLIERBERGHE <mvanvlierberghe@doct.uliege.be>
149  
150 =head1 COPYRIGHT AND LICENSE
151  
152 This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN.
153  
154 This is free software; you can redistribute it and/or modify it under
155 the same terms as the Perl 5 programming language system itself.
156  
157 =cut