File: RepeatMasker.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 (43 lines) | stat: -rw-r--r-- 914 bytes parent folder | download
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
# -*-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::RepeatMasker;
use Bio::SeqIO;

END {
    for ( $Test::ntest..$NTESTS ) {
        skip("RepeatMasker program not found. Skipping. (Be sure you have the phrap package )",1);
    }
}


my $inputfilename= Bio::Root::IO->catfile("t","data","repeatmasker.fa.out");
my $parser = Bio::Tools::RepeatMasker->new(-file => $inputfilename);
my @rpt;
while (my $rpt = $parser->next_result){
    push @rpt, $rpt;
}
ok ($rpt[0]->feature1->start, 1337);
ok ($rpt[0]->feature1->end, 1407);
ok ($rpt[0]->feature1->strand, 1);
ok ($rpt[0]->feature1->primary_tag, "Simple_repeat");
ok ($rpt[0]->feature1->source_tag, "RepeatMasker");
ok ($rpt[0]->feature2->seq_id, "(TTAGGG)n");