Skip to content

Commit

Permalink
check for exe
Browse files Browse the repository at this point in the history
svn path=/bioperl-run/trunk/; revision=13161
  • Loading branch information
shawnh committed Jul 29, 2002
1 parent 7164629 commit 09c9f3d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions t/DBA.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ ok(1);
my $verbose = -1;
my @params = ('matchA' => 0.75, 'matchB' => '0.55','dymem'=>'linear');
my $factory = Bio::Tools::Run::Alignment::DBA->new(@params);
unless (defined $factory->executable) {
warn("DBA program not found. Skipping tests $Test::ntest to $NTESTS.\n");
exit 0;
}

ok $factory->isa('Bio::Tools::Run::Alignment::DBA');
my $bequiet = 1;
$factory->quiet($bequiet); # Suppress clustal messages to terminal
Expand All @@ -39,11 +44,6 @@ my $inputfilename_1a = Bio::Root::IO->catfile("t","data","dba1a.fa");
my $inputfilename_1b = Bio::Root::IO->catfile("t","data","dba1b.fa");
my $inputfilename2 = Bio::Root::IO->catfile("t","data","dba2.fa");
my $aln;
my $dba_present = $factory->executable();
unless (defined $dba_present) {
warn("DBA program not found. Skipping tests $Test::ntest to $NTESTS.\n");
exit 0;
}
my @hsps = $factory->align($inputfilename2);
ok($hsps[0]->isa("Bio::Search::HSP::GenericHSP"));
ok($hsps[0]->query->start,4);
Expand Down
9 changes: 4 additions & 5 deletions t/Neighbor.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ ok(1);
my $verbose = -1;
my @params = ('type'=>'UPGMA','outgroup'=>2,'lowtri'=>1,'upptri'=>1,'subrep'=>1,'jumble'=>13);
my $tree_factory = Bio::Tools::Run::Phylo::Phylip::Neighbor->new(@params);
unless ($tree_factory->executable) {
warn("neighbor program not found. Skipping tests $Test::ntest to $NTESTS.\n") if( $DEBUG);
exit 0;
}

ok $tree_factory->isa('Bio::Tools::Run::Phylo::Phylip::Neighbor');

Expand Down Expand Up @@ -66,11 +70,6 @@ $tree_factory->quiet($bequiet); # Suppress protpars messages to terminal

my $inputfilename = Bio::Root::IO->catfile("t","data","neighbor.dist");
my $tree;
my $neighbor_present = $tree_factory->exists_neighbor();
unless ($neighbor_present) {
warn("neighbor program not found. Skipping tests $Test::ntest to $NTESTS.\n") if( $DEBUG);
exit 0;
}

$tree = $tree_factory->create_tree($inputfilename);
my @nodes = sort { defined $a->id && defined $b->id &&
Expand Down
9 changes: 7 additions & 2 deletions t/ProtDist.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BEGIN {
}
use Test;
use vars qw($NTESTS);
$NTESTS = 9;
$NTESTS = 10;
plan tests => $NTESTS;
}

Expand All @@ -29,6 +29,11 @@ ok(1);
my $verbose = -1;
my @params = ('idlength'=>30,'model'=>'cat','gencode'=>'U','category'=>'H','probchange'=>'0.4','trans'=>'5','freq'=>'0.25,0.5,0.125,0.125');
my $dist_factory = Bio::Tools::Run::Phylo::Phylip::ProtDist->new(@params);
unless($dist_factory->executable){
warn("Protdist program not found. Skipping tests $Test::ntest to $NTESTS.\n");
exit 0;
}


ok $dist_factory->isa('Bio::Tools::Run::Phylo::Phylip::ProtDist');

Expand Down Expand Up @@ -98,4 +103,4 @@ unless ($clustal_present) {
my $aln = $align_factory->align($inputfilename);
$matrix = $dist_factory->create_distance_matrix($aln);

ok ($matrix->{'ALEU_HORVU'}{'CATL_HUMAN'},3.34186,"failed creating distance matrix");
ok ($matrix->{'ALEU_HORVU'}{'CATL_HUMAN'},3.07376,"failed creating distance matrix");
16 changes: 6 additions & 10 deletions t/ProtPars.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ ok(1);
my $verbose = -1;
my @params = ('threshold'=>10,'jumble'=>'17,10',outgroup=>2,'idlength'=>10);
my $tree_factory = Bio::Tools::Run::Phylo::Phylip::ProtPars->new(@params);

ok $tree_factory->isa('Bio::Tools::Run::Phylo::Phylip::ProtPars');
unless($tree_factory->executable){
warn("Protpars program not found. Skipping tests $Test::ntest to $NTESTS.\n");
exit 0;
}


my $threshold = 5;
$tree_factory->threshold($threshold);
Expand All @@ -56,14 +60,6 @@ $tree_factory->quiet($bequiet); # Suppress protpars messages to terminal

my $inputfilename = Bio::Root::IO->catfile("t","data","protpars.phy");
my $tree;
my $protpars_present = $tree_factory->exists_protpars();
unless ($protpars_present) {
if($DEBUG ){
warn("protpars program not found. Skipping tests $Test::ntest to $NTESTS.\n");
}
exit 0;
}


$tree = $tree_factory->create_tree($inputfilename);

Expand All @@ -88,5 +84,5 @@ my $aln = $align_factory->align($inputfilename);
$tree = $tree_factory->create_tree($aln);

@nodes = sort { defined $a->id && defined $b->id && $a->id cmp $b->id } $tree->get_nodes();
ok ($nodes[6]->id, 'CYS1_DICDI',
ok ($nodes[5]->id, 'CYS1_DICDI',
"failed creating tree by protpars");

0 comments on commit 09c9f3d

Please sign in to comment.