| 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__ |