1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 18,
11 -requires_module => 'IO::String');
13 use_ok('Bio::Tools::Phylo::Molphy');
16 my $verbose = test_debug();
18 my $inmolphy = Bio::Tools::Phylo::Molphy->new(-file => test_input_file('lysozyme6.simple.protml'));
20 my $r = $inmolphy->next_result;
23 is($r->search_space,50);
25 while( my $t = $r->next_tree ) {
29 $inmolphy = Bio::Tools::Phylo::Molphy->new(-file => test_input_file('lysozyme6.protml'));
31 $r = $inmolphy->next_result;
33 is($r->search_space,50);
35 while( my $t = $r->next_tree ) {
40 is($trees[0]->score, -1047.8);
41 is($trees[-1]->id, 9);
43 my $tpm = $r->transition_probability_matrix;
44 is($tpm->{'Val'}->{'Val'}, -122884);
45 is($tpm->{'Ala'}->{'Arg'}, 2710);
47 my $sub_mat = $r->substitution_matrix;
48 is($sub_mat->{'Val'}->{'Tyr'}, 50);
49 is($sub_mat->{'Arg'}->{'Ile'}, 72);
50 is($sub_mat->{'Met'}->{'Met'}, '');
52 my %fmat = $r->residue_frequencies();
53 is($fmat{'D'}->[0], 0.052);