New INSTALL.WIN doc (from wiki)
[bioperl-live.git] / t / Sigcleave.t
blob49846dadf4107aee0c6356346d0094a2f74a5a96
1 # -*-Perl-*-
2 ## Bioperl Test Harness Script for various modules
3 ## $Id$
5 # Before `make install' is performed this script should be runnable with
6 # `make test'. After `make install' it should work as `perl test.t'
8 use strict;
9 BEGIN {
10     # to handle systems with no installed Test module
11     # we include the t dir (where a copy of Test.pm is located)
12     # as a fallback
13     eval { require Test; };
14     if( $@ ) {
15         use lib 't';
16     }
17     use Test;
18     plan tests => 16;
20 use Bio::PrimarySeq;
21 use Bio::Tools::Sigcleave;
23 #load n-terminus of MGR5_HUMAN as test seq
24 my $protein = "MVLLLILSVLLLKEDVRGSAQSSERRVVAHMPGDIIIGALFSVHHQPTVDKVHERKCGAVREQYGI";
26 ok my $seq= Bio::PrimarySeq->new(-seq => $protein);
28 ok my $sig = new Bio::Tools::Sigcleave;
29 ok $sig->seq($seq);
30 ok my $sout = $sig->seq;
31 ok $sout->seq eq $protein;
32 ok $sig->threshold, 3.5;
33 ok $sig->threshold(5), 5;
34 ok $sig->matrix, 'eucaryotic';
35 ok $sig->matrix('procaryotic'), 'procaryotic';
36 ok $sig->matrix('eucaryotic'), 'eucaryotic';
38 ok $sig->pretty_print =~ /Maximum score 7/;
39 ok my %results = $sig->signals;
41 ok $results{9}, 5.2, "unable to get raw sigcleave results";
44 $sig = new Bio::Tools::Sigcleave(-seq=>$protein,
45                                  -threshold=>5);
46 ok %results = $sig->signals;
47 ok $results{9}, 5.2, "unable to get raw sigcleave results";
48 ok $sig->result_count, 5;