2 ## Bioperl Test Harness Script for Modules
8 test_begin(-tests => 12);
9 use_ok('Bio::Tools::Run::RepeatMasker');
13 my $inputfilename= test_input_file('repeatmasker.fa');
14 my $createdfile = test_output_file();
16 my $verbose = test_debug();
17 my @params=("species" => "mammal", 'noint' => 1, 'qq' => 1, '-verbose' => $verbose);
18 my $fact = Bio::Tools::Run::RepeatMasker->new(@params);
22 test_skip(-requires_executable => $fact,
25 is ($fact->species, 'mammal');
28 my $in = Bio::SeqIO->new(-file => $inputfilename , '-format' => 'fasta');
29 my $seq = $in->next_seq();
30 my @feats = $fact->mask($seq);
32 my $version = $fact->version;
34 is ($feats[0]->feature1->primary_tag, "Simple_repeat");
35 is ($feats[0]->feature1->source_tag, "RepeatMasker");
36 is ($feats[0]->feature2->seq_id, "(TTAGGG)n");
38 if( $version =~ /open-(\S+)/) {
40 if( $num ge '3.1.0' ) {
41 is ($feats[0]->feature1->start, 1337);
42 is ($feats[0]->feature1->end, 1411);
43 is ($feats[0]->feature1->strand, 1);
44 is ($feats[1]->feature1->start, 1710);
45 is ($feats[1]->feature1->end, 2052);
46 } elsif( $num ge '3.0.8' ) {
47 is ($feats[0]->feature1->start, 1337);
48 is ($feats[0]->feature1->end, 1407);
49 is ($feats[0]->feature1->strand, 1);
50 is ($feats[1]->feature1->start, 1712);
51 is ($feats[1]->feature1->end, 2225);
53 skip("unknown RepeatMasker Version, cannot test",1) for ( 1..3);
56 is ($feats[0]->feature1->start, 1337);
57 is ($feats[0]->feature1->end, 1407);
58 is ($feats[0]->feature1->strand, 1);