Supply TEMPLATE and SUFFIX for temporary query sequence files.
[bioperl-run.git] / t / Njtree.t
blobfef3b1fd6c48c968fa8bd4b9f4a09cd40d759c45
1 # This is -*-Perl-*- code
2 ## Bioperl Test Harness Script for Modules
3 ##
5 # Before `make install' is performed this script should be runnable with
6 # `make test'. After `make install' it should work as `perl test.t'
8 use strict;
10 BEGIN {
11     use Bio::Root::Test;
12     test_begin(-tests => 6,
13                            -requires_module => 'IO::String');
14         use_ok('Bio::Root::IO');
15         use_ok('Bio::Tools::Run::Phylo::Njtree::Best');
16         use_ok('Bio::AlignIO');
17         use_ok('Bio::TreeIO');
20 ok my $njtree_best = Bio::Tools::Run::Phylo::Njtree::Best->new();
22 SKIP: {
23         test_skip(-requires_executable => $njtree_best,
24                           -tests => 1);
25         
26         my $alignio = Bio::AlignIO->new(-format => 'fasta',
27                                                                         -file   => test_input_file('njtree_aln2.nucl.mfa'));
28         my $aln = $alignio->next_aln;
29         
30         my $treeio = Bio::TreeIO->new(
31                 -format => 'nhx', 
32                 -file => test_input_file('species_tree_njtree.nh'));
33         my $tree = $treeio->next_tree;
34         
35         $njtree_best->alignment($aln);
36         $njtree_best->tree($tree);
37         $njtree_best->check_names();
38         
39         my ($rc,$nhx_tree) = $njtree_best->run();
40         print $njtree_best->error_string, "\n";
41         ok $nhx_tree;
42         
43         #*** where are the tests?!