/
Hyphy.t
59 lines (46 loc) · 1.45 KB
/
Hyphy.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This is -*-Perl-*- code
## Bioperl Test Harness Script for Modules
##
# $Id$
use strict;
BEGIN {
use Bio::Root::Test;
test_begin(-tests => 15, -requires_module =>'IO::String');
use_ok('Bio::Root::IO');
use_ok('Bio::Tools::Run::Phylo::Hyphy::SLAC');
use_ok('Bio::Tools::Run::Phylo::Hyphy::FEL');
use_ok('Bio::Tools::Run::Phylo::Hyphy::REL');
use_ok('Bio::Tools::Run::Phylo::Hyphy::Modeltest');
use_ok('Bio::AlignIO');
use_ok('Bio::TreeIO');
}
ok my $slac = Bio::Tools::Run::Phylo::Hyphy::SLAC->new();
ok my $rel = Bio::Tools::Run::Phylo::Hyphy::REL->new();
ok my $fel = Bio::Tools::Run::Phylo::Hyphy::FEL->new();
ok my $modeltest = Bio::Tools::Run::Phylo::Hyphy::Modeltest->new();
SKIP: {
test_skip(-requires_executable => $slac, -tests => 4);
my $alignio = Bio::AlignIO->new(-format => 'fasta',
-file => 't/data/hyphy1.fasta');
my $treeio = Bio::TreeIO->new(-format => 'newick',
-file => 't/data/hyphy1.tree');
my $aln = $alignio->next_aln;
my $tree = $treeio->next_tree;
$slac->alignment($aln);
$slac->tree($tree);
my ($rc,$results) = $slac->run();
ok defined($results);
$rel->alignment($aln);
$rel->tree($tree);
($rc,$results) = $rel->run();
ok defined($results);
$fel->alignment($aln);
$fel->tree($tree);
($rc,$results) = $fel->run();
ok defined($results);
$modeltest->alignment($aln);
$modeltest->tree($tree);
($rc,$results) = $modeltest->run();
ok defined($results);
#*** where are the tests?!
}