1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin(-tests => 18,
10 -requires_module => 'IO::String');
12 use_ok('Bio::Tools::Phylo::Molphy');
15 my $verbose = test_debug();
17 my $inmolphy = Bio::Tools::Phylo::Molphy->new(-file => test_input_file('lysozyme6.simple.protml'));
19 my $r = $inmolphy->next_result;
22 is($r->search_space,50);
24 while( my $t = $r->next_tree ) {
28 $inmolphy = Bio::Tools::Phylo::Molphy->new(-file => test_input_file('lysozyme6.protml'));
30 $r = $inmolphy->next_result;
32 is($r->search_space,50);
34 while( my $t = $r->next_tree ) {
39 is($trees[0]->score, -1047.8);
40 is($trees[-1]->id, 9);
42 my $tpm = $r->transition_probability_matrix;
43 is($tpm->{'Val'}->{'Val'}, -122884);
44 is($tpm->{'Ala'}->{'Arg'}, 2710);
46 my $sub_mat = $r->substitution_matrix;
47 is($sub_mat->{'Val'}->{'Tyr'}, 50);
48 is($sub_mat->{'Arg'}->{'Ile'}, 72);
49 is($sub_mat->{'Met'}->{'Met'}, '');
51 my %fmat = $r->residue_frequencies();
52 is($fmat{'D'}->[0], 0.052);