Bio-MUST-Apps-TwoScalp

 view release on metacpan or  search on metacpan

bin/two-scalp.pl  view on Meta::CPAN

#!/usr/bin/env perl
# PODNAME: two-scalp.pl
# ABSTRACT: Align or re-align sequences using various strategies
# CONTRIBUTOR: Amandine BERTRAND <amandine.bertrand@doct.uliege.be>
# CONTRIBUTOR: Valerian LUPO <valerian.lupo@doct.uliege.be>

use Modern::Perl '2011';
use Getopt::Euclid qw(:vars);

## no critic (RequireLocalizedPunctuationVars)
BEGIN{
    $ENV{Smart_Comments} = $ARGV_verbosity
        ? join q{ }, map { '#' x (2 + $_) } 1..$ARGV_verbosity
        : q{}
    ;
}
## use critic

use Smart::Comments -ENV;

use Carp;
use Const::Fast;
use File::Basename;
use List::AllUtils qw(part uniq count_by);
use Path::Class qw(file);
use Tie::IxHash;

use Bio::MUST::Core;
use Bio::MUST::Core::Utils qw(secure_outfile);
use aliased 'Bio::MUST::Core::Ali';
use aliased 'Bio::MUST::Core::IdList';

use Bio::MUST::Drivers;
use aliased 'Bio::MUST::Drivers::Blast::Database';
use aliased 'Bio::MUST::Drivers::Blast::Database::Temporary';

use Bio::MUST::Apps::TwoScalp;
use aliased 'Bio::MUST::Apps::TwoScalp::AlignAll';
use aliased 'Bio::MUST::Apps::TwoScalp::Seq2Seq';
use aliased 'Bio::MUST::Apps::TwoScalp::Seqs2Profile';
use aliased 'Bio::MUST::Apps::TwoScalp::Profile2Profile';


const my $DEF_FAM => ':default';

# set up mafft options
my %opt;
$opt{ '--keeplength' } = ()            if $ARGV_keep_length;
$opt{ '--thread'     } = $ARGV_threads if $ARGV_threads > 1;
if ($ARGV_linsi) {
    $opt{ '--maxiterate' } = 1000;
    $opt{ '--localpair'  } = undef;
}

my $master_profile;
my $ref_prefix;

# TODO: check and unifomize error messages with other Bio::MUST::Apps
# TODO: decide between 'master' and 'reference'

if ($ARGV_p_ref) {
    ### Loading master profile: $ARGV_p_ref
    my $ref_profile = Ali->load($ARGV_p_ref);
    # change ids to have no conflict when removing redundant seqs
    my ($temp_file, $temp_mapper)
        = $ref_profile->temp_fasta( {id_prefix => 'pref-'});
    $ref_prefix = Ali->load($temp_file);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 2.351 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-72ae3ad1e6da )