Bio-MUST-Apps-TwoScalp

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.243240  2024-11-19 13:26:12+01:00 Europe/Brussels
    - Additions
       - binaries: refined MAFFT usage (--addfragments and --addlong options)
    - Fixes
       - lib: fixed XML parsing bug in Seq2Seq (due to change in BLAST database format?)

0.231010  2023-04-11 11:33:36+02:00 Europe/Brussels
    - Fixes
       - binaries: fixed bug preventing the alignment of multiple files at once

0.211710  2021-06-20 15:52:12+02:00 Europe/Brussels
    - Additions
       - binaries: support for multithreading (--threads option)

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


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 (and pseudo-options --fragments and --long)
my %opt;
$opt{ '--fragments' }  = ()            if $ARGV_fragments;
$opt{ '--long' }       = ()            if $ARGV_long;
$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;

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

    my %mapper = ( profile => $profile_mapper, toalign => $toalign_mapper );

    my $type = $other->is_aligned ? 'prof' : 'seqs';
    ### type of sequence to add: $type

    # set up new (expendable) hash to change used options
    tie my %reduced_opt, 'Tie::IxHash';
    %reduced_opt = %opt;

    if ($type eq 'prof') {
        delete @reduced_opt{ qw( --fragments --long --keeplength ) };
        $new_profile = Profile2Profile->new( file1   => $toalign_file,
                                             file2   => $profile_file,
                                             options => \%reduced_opt  );
    }

    elsif ($type eq 'seqs') {
        delete @reduced_opt{ qw( --maxiterate --localpair ) }
            if $ARGV_keep_length;
        $new_profile =    Seqs2Profile->new( file1   => $toalign_file,
                                             file2   => $profile_file,

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


Family (or families) to consider when aligning sequences (already aligned or
not) [default: none]. Families are processed in the given order, i.e., the
first specified family is the first aligned and will serve as a master profile
for the second one, etc. If sequences from additional families (or devoid of
family) are also present, these are degapped and aligned on the profile
obtained after aligning the specified families.

=for Euclid: family.type: string

=item --fragments

Run MAFFT with the C<--addfragments> option [default: no]. This option should
be specified when the sequences to align are (much) shorter than the sequences
that are already aligned. See
L<https://mafft.cbrc.jp/alignment/server/add.html> for details.

=item --long

Run MAFFT with the C<--addlong> option [default: no]. This option should be
specified when the sequences to align are (much) longer than the sequences
that are already aligned. See
L<https://mafft.cbrc.jp/alignment/server/add.html> for details.

lib/Bio/MUST/Apps/TwoScalp.pm  view on Meta::CPAN

    $ two-scalp.pl test/PTHR22663.ali --out=-ts

=head1 DESCRIPTION

C<two-scapl.pl> is an application to align or re-align sequences in existing
multiple sequences alignments (FASTA or ALI file formats). Its main engine is
BLAST L<https://blast.ncbi.nlm.nih.gov/>.

Note that only alignable regions of the sequences are added to the alignment,
which may lead to discarding low-conserved regions. Moreover, some sequences
can generate multiple aligned fragments (BLAST HSPs). If you do not like this
behavior, C<two-scalp.pl> is not for you!

=head1 AUTHOR

Denis BAURAIN <denis.baurain@uliege.be>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN.



( run in 0.736 second using v1.01-cache-2.11-cpan-364913b4093 )