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