Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 52 lines (41 sloc) 1.405 kb
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
# This is -*-Perl-*- code
## Bioperl Test Harness Script for Modules
##
# $Id$

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.t'

use strict;
BEGIN {
    use Bio::Root::Test;
    test_begin(-tests => 6,
-requires_module => 'IO::String');

use_ok('Bio::Root::IO');
use_ok('Bio::Tools::Run::Simprot');
use_ok('Bio::AlignIO');
use_ok('Bio::TreeIO');
}

ok my $simprot = Bio::Tools::Run::Simprot->new();

SKIP: {
    test_skip(-requires_executable => $simprot,
              -tests => 1);

my $treeio = Bio::TreeIO->new(
-format => 'nhx', -file => 't/data/simprot_tree.nh');

my $tree = $treeio->next_tree;

$simprot->tree($tree);
$simprot->set_parameter("variablegamma",1);
$simprot->set_parameter("alpha",0.01);
$simprot->set_parameter("rootLength",1000);
$simprot->set_parameter("eFactor",15);
$simprot->set_parameter("indelFrequncy",0.99);
$simprot->set_parameter("maxIndel",999999);
$simprot->set_parameter("Benner",0);
$simprot->set_parameter("bennerk",-2);
$simprot->set_parameter("subModel",2);
$simprot->set_parameter("interleaved",1);
my @nodes = map { $_->id } $tree->get_leaf_nodes;

my ($rc,$alnio,$seq) = $simprot->run();
my $aln = $alnio->next_aln;
my @seqs = map { $_->display_name} $aln->each_seq;
is (scalar(@seqs),scalar(@nodes));

#*** where are the tests?!
}
Something went wrong with that request. Please try again.