1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 13);
12 for my $mod ( qw(Bio::Align::DNAStatistics
13 Bio::Align::ProteinStatistics
16 Bio::Tree::DistanceFactory
22 my $debug = test_debug();
24 use Bio::Align::Utilities qw(:all);
26 my $in = Bio::AlignIO->new(-format => 'clustalw',
27 -file => test_input_file('pep-266.aln'));
28 my $aln = $in->next_aln();
29 isa_ok($aln, 'Bio::SimpleAlign','SimpleAlign object parsed out');
30 my $pstats = Bio::Align::ProteinStatistics->new(-verbose => $debug);
31 my $matrix = $pstats->distance(-method => 'Kimura',
33 isa_ok($matrix,'Bio::Matrix::MatrixI','Protein distance matrix retrieved');
35 my $treebuilder = Bio::Tree::DistanceFactory->new(-method => 'NJ');
36 my $tree = $treebuilder->make_tree($matrix);
37 isa_ok($tree,'Bio::Tree::TreeI', 'Tree object gotten back');
39 my ($cn) = $tree->find_node('183.m01790');
41 # brlens checked against tree generated by PHYLIP NJ
42 is($tree->find_node('AN2438.1')->branch_length, '0.28221','NJ calculated Branch length');
43 is($tree->find_node('FG05298.1')->branch_length, '0.20593','NJ calculated Branch length');
45 # simple topology test - make sure these 2 are sister
46 is($tree->find_node('YOR262W')->ancestor->id,
47 $tree->find_node('Smik_Contig1103.1')->ancestor->id, 'Make sure two nodes are sister');
54 my $replicates = &bootstrap_replicates($aln,10);
55 is(scalar @$replicates, 10,'10 replicates formulated');