more, better tests for the new implementation for tree/bootstrap -- still some things...
[bioperl-run.git] / t / Prints.t
blob1b07b952009b6258873abcd0f5ec824700421f98
1 #!/usr/local/bin/perl
2 #-*-Perl-*-
3 # ## Bioperl Test Harness Script for Modules
4 # #
5 use strict;
6 BEGIN {
7 eval { require Test; };
8 if( $@ ) {
9 use lib 't';
11 use Test;
12 use vars qw($NTESTS);
13 $NTESTS = 5;
14 plan tests => $NTESTS;
17 END {
18 foreach ( $Test::ntest..$NTESTS ) {
19 skip('Unable to run Prints tests, exe may not be installed',1);
22 ok(1);
23 use Bio::Tools::Run::Prints;
24 use Bio::Root::IO;
25 use Bio::SeqIO;
26 use Bio::Seq;
28 my $db = Bio::Root::IO->catfile("t","data","prints.dat");
29 my @params = ('DB',$db);
31 my $factory = Bio::Tools::Run::Prints->new(@params);
32 ok $factory->isa('Bio::Tools::Run::Prints');
33 my $prot_file= Bio::Root::IO->catfile("t","data","Prints_prot.FastA");
35 my $seq1 = Bio::Seq->new();
36 my $seqstream = Bio::SeqIO->new(-file => $prot_file, -fmt => 'Fasta');
37 $seq1 = $seqstream->next_seq();
39 my $prints_present = $factory->executable();
41 unless ($prints_present) {
42 warn("prints program not found. Skipping tests $Test::ntest to $NTESTS.\n");
43 exit 0;
46 my @feat = $factory->predict_protein_features($seq1);
48 ok $feat[0]->isa('Bio::SeqFeatureI');
49 ok ($feat[0]->start,29);
50 ok ($feat[0]->end,53);
52 1;