1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 20);
12 use_ok('Bio::Tools::Phylo::Phylip::ProtDist');
15 my $inputfilename= test_input_file('phylipdist.out');
16 my $parser = Bio::Tools::Phylo::Phylip::ProtDist->new(-program => 'phylipdist',
17 -file => $inputfilename);
19 my $phy = $parser->next_matrix;
20 is $phy->program, 'phylipdist';
21 is $phy->get_entry('Alpha','Beta'), '4.23419';
22 is $phy->get_entry('Gamma','Alpha'),'3.63330';
23 my @column = $phy->get_column('Alpha');
24 is $column[0], '0.00000';
25 is $column[1], '4.23419';
26 is $column[2], '3.63330';
27 is $column[3], '6.20865';
28 is $column[4], '3.45431';
30 my @row = $phy->get_row('Gamma');
31 is $row[0], '3.63330';
32 is $row[1], '3.49289';
33 is $row[2], '0.00000';
34 is $row[3], '3.68733';
35 is $row[4], '5.84929';
37 my @diag = $phy->get_diagonal;
40 is $diag[0], '0.00000';
41 is $diag[1], '0.00000';
42 is $diag[2], '0.00000';
43 is $diag[3], '0.00000';
44 is $diag[4], '0.00000';
48 Alpha 0.00000 4.23419 3.63330 6.20865 3.45431
49 Beta 4.23419 0.00000 3.49289 3.36540 4.29179
50 Gamma 3.63330 3.49289 0.00000 3.68733 5.84929
51 Delta 6.20865 3.36540 3.68733 0.00000 4.43345
52 Epsilon 3.45431 4.29179 5.84929 4.43345 0.00000
55 is $phy->print_matrix , $matrix;