1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin(-tests => 16,
10 -requires_modules => [qw(IO::String
14 -requires_networking => 1);
16 use_ok('Bio::Tools::Analysis::Protein::ELM');
18 use_ok('Bio::WebAgent');
21 my $verbose = test_debug();
23 ok my $tool = Bio::WebAgent->new(-verbose =>$verbose);
25 my $seqio=Bio::SeqIO->new( -verbose => $verbose,
27 -file => test_input_file('swiss.dat'));
29 my $seq = $seqio->next_seq();
30 ok $tool = Bio::Tools::Analysis::Protein::ELM->new(
31 -seq=>$seq->primary_seq), 'new object';
32 ok $tool->compartment(['golgi', 'er']), 'set compartment';
33 ok my $cmp = $tool->compartment(), 'get compartment';
34 is $cmp->[1], 'GO:0005783', 'check compartment';
35 ok $tool->species(9606), 'set species()';
36 is $tool->species, 9606, 'get species()';;
38 my $req_status = $tool->run();
40 ok $req_status, 'run';
42 my $status = $tool->status();
44 ok(defined($status), 'This returns something valid');
47 skip "Bad run() status, possible time out or error so skipping tests", 4 if !$req_status or $status eq 'TERMINATED_BY_ERROR';
49 ok my $raw = $tool->result('');
50 print $raw if $verbose;
51 ok my $parsed = $tool->result('parsed');
53 is $parsed->{'CLV_NRD_NRD_1'}{'locus'}[0], '54-56';
54 ok my @res = $tool->result('Bio::SeqFeatureI');