2 ## Bioperl Test Harness Script for Modules
7 eval { require Test; };
14 plan tests => $NTESTS;
16 use Bio::Tools::Run::RepeatMasker;
20 for ( $Test::ntest..$NTESTS ) {
21 skip("RepeatMasker program not found. Skipping. (Be sure you have the phrap package )",1);
24 my $verbose = $ENV{'BIOPERLDEBUG'} ? 1 : 0;
25 my @params=("species" => "mammal","noint"=>1, 'qq' => 1, '-verbose' => $verbose);
26 my $fact = Bio::Tools::Run::RepeatMasker->new(@params);
28 if( ! $fact->executable ) {
29 warn("RepeatMasker program not found. Skipping tests $Test::ntest to $NTESTS.\n");
34 ok ($fact->species, 'mammal');
36 my $inputfilename= Bio::Root::IO->catfile(qw(t data repeatmasker.fa));
38 my $in = Bio::SeqIO->new(-file => $inputfilename , '-format' => 'fasta');
39 my $seq = $in->next_seq();
40 my @feats = $fact->mask($seq);
42 my $version = $fact->version;
44 ok ($feats[0]->feature1->primary_tag, "Simple_repeat");
45 ok ($feats[0]->feature1->source_tag, "RepeatMasker");
46 ok ($feats[0]->feature2->seq_id, "(TTAGGG)n");
48 if( $version =~ /open-(\S+)/) {
50 if( $num ge '3.1.0' ) {
51 ok ($feats[0]->feature1->start, 1337);
52 ok ($feats[0]->feature1->end, 1411);
53 ok ($feats[0]->feature1->strand, 1);
54 ok ($feats[1]->feature1->start, 1710);
55 ok ($feats[1]->feature1->end, 2052);
56 } elsif( $num ge '3.0.8' ) {
57 ok ($feats[0]->feature1->start, 1337);
58 ok ($feats[0]->feature1->end, 1407);
59 ok ($feats[0]->feature1->strand, 1);
60 ok ($feats[1]->feature1->start, 1712);
61 ok ($feats[1]->feature1->end, 2225);
63 skip("unknown RepeatMasker Version, cannot test",1) for ( 1..3);
66 ok ($feats[0]->feature1->start, 1337);
67 ok ($feats[0]->feature1->end, 1407);
68 ok ($feats[0]->feature1->strand, 1);