Bio-Tradis
view release on metacpan or search on metacpan
lib/Bio/Tradis/CommandLine/TradisAnalysis.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::TradisAnalysis;
$Bio::Tradis::CommandLine::TradisAnalysis::VERSION = '1.4.5';
# ABSTRACT: Perform full tradis analysis
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd qw(abs_path cwd);
use Bio::Tradis::RunTradis;
use Try::Tiny;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'tag' => ( is => 'rw', isa => 'Maybe[Str]', required => 0 );
has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
has 'tagdirection' =>
( is => 'rw', isa => 'Str', required => 0, default => '3' );
has 'reference' => ( is => 'rw', isa => 'Str', required => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'mapping_score' =>
( is => 'rw', isa => 'Int', required => 0, default => 30 );
has 'min_seed_len' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
has 'smalt' => ( is => 'rw', isa => 'Bool', default => 0 );
has 'smalt_k' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
has 'smalt_s' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
has 'smalt_y' => ( is => 'rw', isa => 'Maybe[Num]', required => 0, default => 0.96 );
has 'smalt_r' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => -1 );
has 'smalt_n' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => 1 );
has 'essentiality' => ( is => 'rw', isa => 'Bool', required => 0, default => 0);
has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
has '_output_directory' => (
is => 'rw',
isa => 'Str',
required => 0,
lazy => 1,
builder => '_build__output_directory'
);
has '_stats_handle' => (
is => 'ro',
isa => 'FileHandle',
required => 0,
lazy => 1,
builder => '_build__stats_handle'
);
sub BUILD {
my ($self) = @_;
my (
$fastqfile, $tag, $td, $mismatch, $ref,$smalt_n, $essentiality, $min_seed_len, $smalt,
$map_score, $smalt_k, $smalt_s, $smalt_y, $smalt_r, $help, $verbose,$samtools_exec
);
GetOptionsFromArray(
$self->args,
'f|fastqfile=s' => \$fastqfile,
't|tag=s' => \$tag,
'td|tagdirection=i' => \$td,
'mm|mismatch=i' => \$mismatch,
'r|reference=s' => \$ref,
'm|mapping_score=i' => \$map_score,
'k|min_seed_len=i' => \$min_seed_len,
's|smalt' => \$smalt,
'sk|smalt_k=i' => \$smalt_k,
'ss|smalt_s=i' => \$smalt_s,
( run in 2.485 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )