Bio-MUST-Apps-OmpaPa

 view release on metacpan or  search on metacpan

lib/Bio/MUST/Apps/OmpaPa/Roles/Parsable.pm  view on Meta::CPAN

package Bio::MUST::Apps::OmpaPa::Roles::Parsable;
# ABSTRACT: Parsable Moose role for search report objects
# CONTRIBUTOR: Amandine BERTRAND <amandine.bertrand@doct.uliege.be>
$Bio::MUST::Apps::OmpaPa::Roles::Parsable::VERSION = '0.260260';
use Moose::Role;

use autodie;
use feature qw(say);
use version;

use Smart::Comments '###';

use Carp;
use Const::Fast;
use File::Basename;
use File::Find::Rule;
use File::Temp;
use FileHandle;
use List::AllUtils qw(sum);
use Path::Class qw(file);
use POSIX;
use Scalar::Util qw(looks_like_number);
use Sort::Naturally;
use Template;
use Text::Table;

use IO::Prompter [
    -verbatim,
    -style => 'blue strong',
    -must  => { 'be a string' => qr{\S+}xms }
];

use Bio::MUST::Core;
use Bio::MUST::Core::Utils qw(change_suffix);
use aliased 'Bio::MUST::Core::Ali';
use aliased 'Bio::MUST::Drivers::Blast::Database';

use Bio::MUST::Apps::OmpaPa::Types;
use aliased 'Bio::MUST::Apps::OmpaPa::Parameters';

requires 'file', 'collect_hits';

# TODO: improve wording consistency with CLI
# TODO: update internal variable names
# TODO: break up long lines
# TODO: refine code layout

has 'database' => (
    is       => 'ro',
    isa      => 'Bio::MUST::Core::Types::File',
    required => 0,          # database is now optional for convenience
    coerce   => 1,
);

has 'scheme' => (
    is       => 'ro',
    isa      => 'Bio::MUST::Core::Taxonomy::ColorScheme',
    required => 0,          # scheme is optional
);

has 'extract_seqs' => (
    is       => 'ro',
    isa      => 'Bool',
    default  => 0,
);

has 'extract_tax' => (
    is       => 'ro',
    isa      => 'Bool',
    default  => 0,
);

has 'parameters' => (
    is       => 'ro',
    isa      => 'Bio::MUST::Apps::OmpaPa::Parameters',
    lazy     => 1,
    coerce   => 1,
    builder  =>  '_build_parameters',
    handles   => qr{.*}xms,
);

has 'restore_last_params' => (
    is       => 'ro',



( run in 2.114 seconds using v1.01-cache-2.11-cpan-364913b4093 )