1 # This is -*-Perl-*- code
2 ## Bioperl Test Harness Script for Modules
6 # Before `make install' is performed this script should be runnable with
7 # `make test'. After `make install' it should work as `perl test.t'
13 test_begin(-tests => 7,
14 -requires_module => 'IO::String');
15 use_ok('Bio::Root::IO');
16 use_ok('Bio::Tools::Run::Phylo::SLR');
17 use_ok('Bio::AlignIO');
18 use_ok('Bio::TreeIO');
21 ok my $slr = Bio::Tools::Run::Phylo::SLR->new();
24 test_skip(-requires_executable => $slr,
28 my $alignio1 = Bio::AlignIO->new
30 -file => test_input_file('219877.cdna.fasta'));
32 my $treeio1 = Bio::TreeIO->new
34 -file => test_input_file('219877.tree'));
36 my $aln1 = $alignio1->next_aln;
37 my $tree1 = $treeio1->next_tree;
39 $slr->alignment($aln1);
41 my ($rc,$results1) = $slr->run();
42 ok defined($results1);
45 $slr = Bio::Tools::Run::Phylo::SLR->new();
46 my $alignio2 = Bio::AlignIO->new
48 -file => test_input_file('277523.cdna.fasta'));
50 my $treeio2 = Bio::TreeIO->new
52 -file => test_input_file('277523.tree'));
54 my $aln2 = $alignio2->next_aln;
55 my $tree2 = $treeio2->next_tree;
57 $slr->alignment($aln2);
59 my($rc2,$results2) = $slr->run();
60 ok defined($results2);
61 # my $positive_sites = $results2->{'constant'};
62 # print "Site,Omega\n";
63 # foreach my $site (@{$positive_sites}) {
64 # # print "# Site Neutral Optimal Omega lower upper LRT_Stat Pval Adj.Pval Result Note\n";
65 # print $site->[0], ",", $site->[3], "\n";
69 # $slr = Bio::Tools::Run::Phylo::SLR->new();
70 # my $alignio3 = Bio::AlignIO->new
71 # (-format => 'fasta',
72 # -file => 't/data/799906.cdna.fasta');
74 # my $treeio3 = Bio::TreeIO->new
75 # (-format => 'newick',
76 # -file => 't/data/799906.tree');
78 # my $aln3 = $alignio3->next_aln;
79 # my $tree3 = $treeio3->next_tree;
81 # $slr->alignment($aln3);
83 # my ($rc,$results3) = $slr->run();
84 # my $sites = $results3->{'constant'};
85 # ok defined($results3);
86 # print "Site,Omega\n";
87 # foreach my $site (@{$sites}) {
88 # # print "# Site Neutral Optimal Omega lower upper LRT_Stat Pval Adj.Pval Result Note\n";
89 # print $site->[0], ",", $site->[3], "\n";