test
[bioperl-run.git] / t / Signalp.t
blob70f66cbc9fe756eec8e273c05b1d381f25025080
1 #!/usr/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 SignalP tests, exe may not be installed',1);
22 ok(1);
23 use Bio::Tools::Run::Signalp;
24 use Bio::Root::IO;
25 use Bio::SeqIO;
26 use Bio::Seq;
28 my $factory = Bio::Tools::Run::Signalp->new();
29 ok $factory->isa('Bio::Tools::Run::Signalp');
32 my $prot_file = Bio::Root::IO->catfile("t","data","signalp_input_protein");
34 my $seq1 = Bio::Seq->new();
35 my $seqstream = Bio::SeqIO->new(-file =>$prot_file, -fmt =>'Fasta');
36 $seq1 = $seqstream->next_seq();
38 my $signalp_present = $factory->executable();
40 unless ($signalp_present) {
41 warn("signalp program not found. Skipping tests $Test::ntest to $NTESTS.\n");
42 exit 0;
45 my @feat = $factory->predict_protein_features($seq1);
47 ok $feat[0]->isa('Bio::SeqFeatureI');
48 ok ($feat[0]->start,1);
49 ok ($feat[0]->end,29);