[Bioperl-l] Problems when using PAML::yn00

Cacau Centurion cacaucenturion2 at gmail.com
Fri Oct 10 17:46:55 UTC 2014


Hi All,

I tried to use PAML:Yn00 to run yn00 and parse the result. However, no
results were given. Does anyone know what might be the problem?

The following code is obtained from
http://search.cpan.org/dist/BioPerl-Run/lib/Bio/Tools/Run/Phylo/PAML/Yn00.pm

use Bio::Tools::Run::Phylo::PAML::Yn00;
use Bio::AlignIO;
my $alignio = Bio::AlignIO->new(
    -format => 'fasta',
    -file   => "$ARGV[0]"
);
my $aln = $alignio->next_aln;

my $yn = Bio::Tools::Run::Phylo::PAML::Yn00->new();
$yn->alignment($aln);
my ( $rc, $parser ) = $yn->run;
while ( my $result = $parser->next_result ) {
    my @otus     = $result->get_seqs();
    my $MLmatrix = $result->get_MLmatrix();

    #0 and 1 correspond to the 1st and 2nd entry in the @otus array
    my $dN   = $MLmatrix->[0]->[1]->{dN};
    my $dS   = $MLmatrix->[0]->[1]->{dS};
    my $kaks = $MLmatrix->[0]->[1]->{omega};
    print "Ka = $dN Ks = $dS Ka/Ks = $kaks\n";
}


###########################################################
Alignment:
>1
aaattgttgttg
>2
aacaatttgttg


Yours,
Cacau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/bioperl-l/attachments/20141010/01ab6c18/attachment.html>


More information about the Bioperl-l mailing list