File: Promoterwise.t

package info (click to toggle)
bioperl 1.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 20,336 kB
  • ctags: 8,476
  • sloc: perl: 119,890; xml: 6,001; lisp: 121; makefile: 57
file content (49 lines) | stat: -rw-r--r-- 924 bytes parent folder | download | duplicates (2)
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
#!/usr/local/bin/perl
# -*-Perl-*-
## Bioperl Test Harness Script for Modules

use strict;
BEGIN {
    eval { require Test; };
    if( $@ ) {
        use lib 't';
    }
    use Test;
    use vars qw($NTESTS);
    $NTESTS = 6;
    plan tests => $NTESTS;
}
use Bio::Tools::Promoterwise;
use Bio::Root::IO;
use Bio::Seq;

END {
    for ( $Test::ntest..$NTESTS ) {
        skip("promoterwise parser not working properly. Skipping.",1);
    }
}

my $file = Bio::Root::IO->catfile(qw(t data promoterwise.out));
my  $parser = Bio::Tools::Promoterwise->new(-file=>$file);
ok $parser->isa('Bio::Tools::Promoterwise');
my @fp;
while (my $fp = $parser->next_result){
  push @fp,$fp;
}
my $first = $fp[0]->feature1;
my $second = $fp[0]->feature2;

my @sub = $first->sub_SeqFeature;
my @sub2 = $second->sub_SeqFeature;

ok $sub[0]->start,4;
ok $sub2[0]->start,29;
ok $sub[0]->end,18;
ok $sub2[0]->end,43;
ok $sub[0]->score,1596.49