1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: gerp.t,v 1.15 2007/06/27 10:16:38 sendu Exp $
10 test_begin(-tests => 33,
11 -requires_module => 'URI::Escape');
13 use_ok('Bio::Tools::Phylo::Gerp');
16 ok my $parser = Bio::Tools::Phylo::Gerp->new(-file => test_input_file('ENr111.mfa.example.elems'));
19 my @expected = ([qw(334180 334352 449 1.03744e-165)],
20 [qw(337735 337915 458.2 5.02405e-164)],
21 [qw(262604 262861 473.1 3.64789e-117)],
22 [qw(285427 285608 386.1 8.42494e-113)],
23 [qw(309563 309744 383.6 2.88895e-111)]);
24 while (my $feat = $parser->next_result) {
26 my @exp = @{shift(@expected)};
28 isa_ok $feat, 'Bio::SeqFeature::Annotated';
29 is $feat->source->value, 'GERP', 'correct source';
30 is $feat->start, shift(@exp), 'feature start correct';
31 is $feat->end, shift(@exp), 'feature end correct';
32 is $feat->score, shift(@exp), 'feature score correct';
33 my ($p_value) = $feat->get_Annotations('pvalue');
34 is ref $p_value ? $p_value->value : $p_value, shift(@exp), 'feature pvalue correct';
37 is $count, 5, "correct number of results parsed out";