algorithm can be SSEARCH as well; use test_output_file() for tempfile cleanup
[bioperl-run.git] / t / Consense.t
blob90e7310d1a563a01da2eb615b8a662aceb4a117c
1 # -*-Perl-*-
2 ## Bioperl Test Harness Script for Modules
3 ## $Id$
5 use strict;
7 BEGIN {
8     use Bio::Root::Test;
9     test_begin(-tests => 9,
10                            -requires_module => 'IO::String');
11         use_ok('Bio::Tools::Run::Phylo::Phylip::Consense');
12         use_ok('Bio::AlignIO');
15 my $verbose = test_debug();
17 my $sb_factory = Bio::Tools::Run::Phylo::Phylip::Consense->new(-verbose => $verbose);
19 SKIP: {
20         test_skip(-requires_executable => $sb_factory,
21              -tests => 7);
23         isa_ok($sb_factory,'Bio::Tools::Run::Phylo::Phylip::Consense');
24         
25         $sb_factory->rooted(1);
26         
27         is $sb_factory->rooted, 1, "coludn't set rooted option";
29         $sb_factory->quiet($verbose);  # Suppress protpars messages to terminal 
30         
31         my $inputfilename = test_input_file("consense.treefile");
32         my $tree = $sb_factory->run($inputfilename);
33         
34         is $tree->number_nodes, 13;
35         
36         my $node = $tree->find_node('CATH_RAT');
37         is $node->branch_length, "10.0";
38         is $node->id, 'CATH_RAT';
39         
40         my @nodes = $tree->get_nodes;
41         
42         is scalar(@nodes),13;
43 }