Problems when using PAML::yn00
Cacau Centurion <[email protected]>
| Newsgroups | gmane.comp.lang.perl.bio.general |
|---|---|
| Message-ID | <CA+SvvBWqAhZSb8kqbXx=QLDsVPMMuvMuf5y+U==ttBc9u11hxw@mail.gmail.com> |
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
_______________________________________________
Bioperl-l mailing list
[email protected]
http://mailman.open-bio.org/mailman/listinfo/bioperl-l