2 ## Bioperl Test Harness Script for Modules
7 eval { require Test; };
14 plan tests => $NTESTS;
16 use Bio::Matrix::PhylipDist;
19 for ( $Test::ntest..$NTESTS ) {
20 skip("Error in PhylipDist.pm",1);
23 use Bio::Tools::Phylo::Phylip::ProtDist;
25 my $inputfilename= Bio::Root::IO->catfile("t","data","phylipdist.out");
26 my $parser = Bio::Tools::Phylo::Phylip::ProtDist->new(-program => 'phylipdist',
27 -file => $inputfilename);
29 my $phy = $parser->next_matrix;
30 ok $phy->program, 'phylipdist';
31 ok $phy->get_entry('Alpha','Beta'), '4.23419';
32 ok $phy->get_entry('Gamma','Alpha'),'3.63330';
33 my @column = $phy->get_column('Alpha');
34 ok $column[0] = '0.00000';
35 ok $column[1] = '4.23419';
36 ok $column[2] = '3.63330';
37 ok $column[3] = '6.20865';
38 ok $column[4] = '3.45431';
40 my @row = $phy->get_row('Gamma');
41 ok $row[0] = '3.63330';
42 ok $row[1] = '3.49289';
43 ok $row[2] = '0.00000';
44 ok $row[3] = '3.68733';
45 ok $row[4] = '5.84929';
47 my @diag = $phy->get_diagonal;
50 ok $diag[0] = '0.00000';
51 ok $diag[1] = '0.00000';
52 ok $diag[2] = '0.00000';
53 ok $diag[3] = '0.00000';
54 ok $diag[4] = '0.00000';
58 Alpha 0.00000 4.23419 3.63330 6.20865 3.45431
59 Beta 4.23419 0.00000 3.49289 3.36540 4.29179
60 Gamma 3.63330 3.49289 0.00000 3.68733 5.84929
61 Delta 6.20865 3.36540 3.68733 0.00000 4.43345
62 Epsilon 3.45431 4.29179 5.84929 4.43345 0.00000
65 ok $phy->print_matrix , $matrix;