| 1 | package Bio::MUST::Apps::TwoScalp::Seqs2Profile; | ||
| 2 | # ABSTRACT: internal class for two-scalp tool | ||
| 3 | # CONTRIBUTOR: Amandine BERTRAND <amandine.bertrand@doct.uliege.be> | ||
| 4 | # CONTRIBUTOR: Valerian LUPO <valerian.lupo@doct.uliege.be> | ||
| 5 | 1 | $Bio::MUST::Apps::TwoScalp::Seqs2Profile::VERSION = '0.231010'; | |
| 6 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 1 | ▶ | use autodie; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use feature qw(say); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | ▶ | use Smart::Comments '###'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | ▶ | use List::AllUtils qw(part); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 1 | ▶ | use Bio::MUST::Core; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 1 | ▶ | use Bio::MUST::Core::Constants qw(:gaps); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 1 | ▶ | use Bio::MUST::Core::Utils qw(secure_outfile); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 1 | ▶ | use aliased 'Bio::MUST::Core::Ali'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 1 | ▶ | use aliased 'Bio::MUST::Core::Seq'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 1 | ▶ | use aliased 'Bio::MUST::Core::SeqId'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | 1 | ▶ | use aliased 'Bio::MUST::Core::SeqMask'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | 1 | ▶ | use aliased 'Bio::MUST::Drivers::Blast::Database::Temporary'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 1 | ▶ | use aliased 'Bio::MUST::Drivers::Mafft'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | 1 | ▶ | use aliased 'Bio::MUST::Drivers::ClustalO'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | 1 | ▶ | use aliased 'Bio::MUST::Apps::SlaveAligner::Local'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 28 | 1 | ▶ | use aliased 'Bio::MUST::Core::IdList'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 29 | |||
| 30 | |||
| 31 | 1 | has 'file1' => ( | |
| 32 | is => 'ro', | ||
| 33 | isa => 'Bio::MUST::Core::Ali', | ||
| 34 | required => 1, | ||
| 35 | coerce => 1, | ||
| 36 | ); | ||
| 37 | |||
| 38 | 1 | has 'file2' => ( | |
| 39 | is => 'ro', | ||
| 40 | isa => 'Bio::MUST::Core::Ali', | ||
| 41 | required => 1, | ||
| 42 | coerce => 1, | ||
| 43 | ); | ||
| 44 | |||
| 45 | 1 | has 'ali' => ( | |
| 46 | is => 'ro', | ||
| 47 | isa => 'Bio::MUST::Core::Ali', | ||
| 48 | init_arg => undef, | ||
| 49 | writer => '_set_ali', | ||
| 50 | handles => qr{.*}xms, | ||
| 51 | ); | ||
| 52 | |||
| 53 | has 'options' => ( | ||
| 54 | traits => ['Hash'], | ||
| 55 | is => 'ro', | ||
| 56 | isa => 'HashRef', | ||
| 57 | 0 | ▶ | default => sub { {} }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 58 | 1 | ); | |
| 59 | |||
| 60 | |||
| 61 | sub BUILD { | ||
| 62 | 0 | ▶ | my $self = shift; |
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 63 | |||
| 64 | 0 | my $ali1 = $self->file1; | |
| 65 | 0 | my $ali2 = $self->file2; | |
| 66 | 0 | my $opt = $self->options; | |
| 67 | |||
| 68 | 0 | my ($filename1, $id_mapper1) = $ali1->temp_fasta( {id_prefix => 'file1-'} ); | |
| 69 | 0 | my ($filename2, $id_mapper2) = $ali2->temp_fasta( {id_prefix => 'file2-'} ); | |
| 70 | |||
| 71 | 0 | my %mapper = ( ali1 => $id_mapper1, ali2 => $id_mapper2 ); | |
| 72 | |||
| 73 | 0 | my $mafft = Mafft->new( file => $filename1 ); # add an option to use clustalo if wanted ? | |
| 74 | 0 | my $ali_out = $mafft->seqs2profile($filename2, $opt); | |
| 75 | |||
| 76 | 0 | $ali_out->restore_ids($mapper{ali1}); | |
| 77 | 0 | $ali_out->restore_ids($mapper{ali2}); | |
| 78 | |||
| 79 | 0 | $self->_set_ali($ali_out); | |
| 80 | |||
| 81 | 0 | return; | |
| 82 | } | ||
| 83 | 1 | __PACKAGE__->meta->make_immutable; | |
| 84 | 1 | 1; | |
| 85 | |||
| 86 | __END__ | ||
| 87 | |||
| 88 | =pod | ||
| 89 | |||
| 90 | =head1 NAME | ||
| 91 | |||
| 92 | Bio::MUST::Apps::TwoScalp::Seqs2Profile - internal class for two-scalp tool | ||
| 93 | |||
| 94 | =head1 VERSION | ||
| 95 | |||
| 96 | version 0.231010 | ||
| 97 | |||
| 98 | =head1 SYNOPSIS | ||
| 99 | |||
| 100 | # TODO | ||
| 101 | |||
| 102 | =head1 DESCRIPTION | ||
| 103 | |||
| 104 | # TODO | ||
| 105 | |||
| 106 | =head1 AUTHOR | ||
| 107 | |||
| 108 | Denis BAURAIN <denis.baurain@uliege.be> | ||
| 109 | |||
| 110 | =head1 CONTRIBUTORS | ||
| 111 | |||
| 112 | =for stopwords Amandine BERTRAND Valerian LUPO | ||
| 113 | |||
| 114 | =over 4 | ||
| 115 | |||
| 116 | =item * | ||
| 117 | |||
| 118 | Amandine BERTRAND <amandine.bertrand@doct.uliege.be> | ||
| 119 | |||
| 120 | =item * | ||
| 121 | |||
| 122 | Valerian LUPO <valerian.lupo@doct.uliege.be> | ||
| 123 | |||
| 124 | =back | ||
| 125 | |||
| 126 | =head1 COPYRIGHT AND LICENSE | ||
| 127 | |||
| 128 | This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. | ||
| 129 | |||
| 130 | This is free software; you can redistribute it and/or modify it under | ||
| 131 | the same terms as the Perl 5 programming language system itself. | ||
| 132 | |||
| 133 | =cut | ||