small pod fix
[bioperl-live.git] / t / Sopma.t
blob929cba7ba2aead348e5b73e3164f7a7eae301f64
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7         use lib 't/lib';
8     use BioperlTest;
9     
10     test_begin(-tests => 16,
11                -requires_modules => [qw(IO::String LWP::UserAgent)]);
12         
13         use_ok('Bio::PrimarySeq');
14         use_ok('Bio::Tools::Analysis::Protein::Sopma');
17 my $verbose = test_debug();
19 ok my $tool = Bio::WebAgent->new(-verbose =>$verbose);
21 my $seq = Bio::PrimarySeq->new(
22   -seq => 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS',
23   -display_id => 'test2');
24 ok $tool = Bio::Tools::Analysis::Protein::Sopma->new( -seq=>$seq,
25                                                                                                           #-verbose => $verbose,
26                                                       -window_width => 15);
28 SKIP: {
29         test_skip(-tests => 12, -requires_networking => 1);
30         
31         ok $tool->run();
32         skip "Tool was terminated by some error: problem connecting to server?", 11 if $tool->status eq 'TERMINATED_BY_ERROR';
33         
34         ok my $raw = $tool->result('');
35         ok my $parsed = $tool->result('parsed');
36         is ($parsed->[0]{'helix'}, '102');
37         ok my @res = $tool->result('Bio::SeqFeatureI');
38         ok my $meta = $tool->result('meta', "ww15");
40         ok $tool->window_width(21);
41         ok $tool->clear();
42         ok $tool->run;
43         ok my $meta2 = $tool->result('meta', "ww21");
44         
45         SKIP: {
46                 test_skip(-tests => 2, -requires_module => 'Bio::Seq::Meta::Array');
47                 is $meta->named_submeta_text('Sopma_helix|ww15',1,2), '102 195';
48                 is $meta->seq, 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS';
49         }