tests pass, find the right nodes more explicitly
[bioperl-run.git] / t / Coil.t
blob3908fa8e14319a71dbc3fb10da357d2b6f2b8a4a
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 = 4;
14 plan tests => $NTESTS;
17 END {
18 foreach ( $Test::ntest..$NTESTS ) {
19 skip('Unable to run Coil tests, exe may not be installed or configured properly',1);
22 use Bio::Tools::Run::Coil;
23 use Bio::Root::IO;
24 use Bio::SeqIO;
26 if(! $ENV{'COILSDIR'}){
27 warn("Need to define env variable COILSDIR to run test");
28 exit(0);
31 my $factory = Bio::Tools::Run::Coil->new();
32 ok $factory->isa('Bio::Tools::Run::Coil');
34 my $prot_file= Bio::Root::IO->catfile("t","data","coil_protein_input");
36 my $seq1 = Bio::Seq->new();
37 my $seqstream = Bio::SeqIO->new(-file => $prot_file, -fmt => 'Fasta');
38 $seq1 = $seqstream->next_seq();
40 my $coil_present = $factory->executable();
42 unless ($coil_present) {
43 warn("coil program not found. Skipping tests $Test::ntest to $NTESTS.\n");
44 exit 0;
46 $factory->quiet(1);
47 my @feat = $factory->predict_protein_features($seq1);
49 ok $feat[0]->isa('Bio::SeqFeatureI');
50 ok ($feat[0]->start,71);
51 ok ($feat[0]->end,91);