| 1 | #!/usr/bin/env perl | ||
| 2 | # PODNAME: leel.pl | ||
| 3 | # ABSTRACT: The Elite of the Phylogenomic Back-Translators | ||
| 4 | |||
| 5 | use Modern::Perl '2011'; | ||
| 6 | |||
| 7 | use Getopt::Euclid qw(:vars); | ||
| 8 | |||
| 9 | ## no critic (RequireLocalizedPunctuationVars) | ||
| 10 | BEGIN{ | ||
| 11 | $ENV{Smart_Comments} = $ARGV_verbosity | ||
| 12 | ? join q{ }, map { '#' x (2 + $_) } 1..$ARGV_verbosity | ||
| 13 | : q{} | ||
| 14 | ; | ||
| 15 | } | ||
| 16 | ## use critic | ||
| 17 | |||
| 18 | use Smart::Comments -ENV; | ||
| 19 | use Config::Any; | ||
| 20 | |||
| 21 | use aliased 'Bio::MUST::Apps::Leel'; | ||
| 22 | |||
| 23 | # read configuration file | ||
| 24 | my $config = Config::Any->load_files( { | ||
| 25 | files => [ $ARGV_config ], | ||
| 26 | flatten_to_hash => 1, | ||
| 27 | use_ext => 1, | ||
| 28 | } ); | ||
| 29 | |||
| 30 | # build leel object | ||
| 31 | # Note: default args are propagated to all orgs | ||
| 32 | my $leel = Leel->new( | ||
| 33 | config => $config->{$ARGV_config}, | ||
| 34 | infiles => \@ARGV_infiles, | ||
| 35 | ); | ||
| 36 | |||
| 37 | # use leel as factory for run_proc object | ||
| 38 | # Note: CLI parameters are introduced here | ||
| 39 | my %args; | ||
| 40 | $args{debug_mode} = $ARGV_verbosity > 5 ? 1 : 0; | ||
| 41 | $args{out_dir} = $ARGV_outdir if $ARGV_outdir; | ||
| 42 | $args{threads} = $ARGV_threads; | ||
| 43 | my $rp = $leel->run_proc(\%args); | ||
| 44 | |||
| 45 | __END__ | ||
| 46 | |||
| 47 | =pod | ||
| 48 | |||
| 49 | =head1 NAME | ||
| 50 | |||
| 51 | leel.pl - The Elite of the Phylogenomic Back-Translators | ||
| 52 | |||
| 53 | =head1 VERSION | ||
| 54 | |||
| 55 | version 0.210570 | ||
| 56 | |||
| 57 | =head1 USAGE | ||
| 58 | |||
| 59 | leel.pl <infiles> --config=<file> [optional arguments] | ||
| 60 | |||
| 61 | =head1 REQUIRED ARGUMENTS | ||
| 62 | |||
| 63 | =over | ||
| 64 | |||
| 65 | =item <infiles> | ||
| 66 | |||
| 67 | Path to input ALI files [repeatable argument]. | ||
| 68 | |||
| 69 | =for Euclid: infiles.type: readable | ||
| 70 | repeatable | ||
| 71 | |||
| 72 | =item --config=<file> | ||
| 73 | |||
| 74 | Path to the configuration file specifying the run details. | ||
| 75 | |||
| 76 | In principle, several configuration file formats are available: XML, JSON, | ||
| 77 | YAML. However, leel was designed with YAML in mind. See the C<test> directory | ||
| 78 | of the distribution for annotated examples of YAML files. | ||
| 79 | |||
| 80 | =for Euclid: file.type: readable | ||
| 81 | |||
| 82 | =back | ||
| 83 | |||
| 84 | =head1 OPTIONAL ARGUMENTS | ||
| 85 | |||
| 86 | =over | ||
| 87 | |||
| 88 | =item --threads=<n> | ||
| 89 | |||
| 90 | Number of threads to run in parallel [default: n.default]. Parallelization is | ||
| 91 | achieved by processing several ALI files in parallel using an internal queue. | ||
| 92 | Therefore, the specified number of threads should not be larger than the | ||
| 93 | number of input ALI files. | ||
| 94 | |||
| 95 | =for Euclid: n.type: +int | ||
| 96 | n.default: 1 | ||
| 97 | |||
| 98 | =item --outdir=<dir> | ||
| 99 | |||
| 100 | Optional output dir that will contain the back-translated ALI files (will be | ||
| 101 | created if needed) [default: none]. Otherwise, output files are in the same | ||
| 102 | directory as input files. | ||
| 103 | |||
| 104 | =for Euclid: dir.type: writable | ||
| 105 | |||
| 106 | =item --verbosity=<level> | ||
| 107 | |||
| 108 | Verbosity level for logging to STDERR [default: level.default]. Available | ||
| 109 | levels range from 0 to 6. Level 6 corresponds to debugging mode. | ||
| 110 | |||
| 111 | =for Euclid: level.type: int, level >= 0 && level <= 6 | ||
| 112 | level.default: 0 | ||
| 113 | |||
| 114 | =item --version | ||
| 115 | |||
| 116 | =item --usage | ||
| 117 | |||
| 118 | =item --help | ||
| 119 | |||
| 120 | =item --man | ||
| 121 | |||
| 122 | Print the usual program information | ||
| 123 | |||
| 124 | =back | ||
| 125 | |||
| 126 | =head1 AUTHOR | ||
| 127 | |||
| 128 | Denis BAURAIN <denis.baurain@uliege.be> | ||
| 129 | |||
| 130 | =head1 COPYRIGHT AND LICENSE | ||
| 131 | |||
| 132 | This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. | ||
| 133 | |||
| 134 | This is free software; you can redistribute it and/or modify it under | ||
| 135 | the same terms as the Perl 5 programming language system itself. | ||
| 136 | |||
| 137 | =cut |