~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to t/Tools/RepeatMasker.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2011-06-17 13:51:18 UTC
  • mfrom: (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110617135118-hncy38e0134j8oi5
Tags: 1.6.901-1
* New upstream release.
* Point debian/watch to search.cpan.org.
* Build using dh and overrides:
  - Use Debhelper 8 (debian/rules, debian/control).
  - Simplified debian/rules.
* Split into libbio-perl-perl, as discussed with the Debian Perl team.
  (debian/control, debian/bioperl.install, debian libbio-perl-perl.install)
* debian/control:
  - Incremented Standards-Version to reflect conformance with Policy 3.9.2.
    No other changes needed.
  - Vcs-Browser URL made redirectable to viewvc.
  - Removed useless ‘svn’ in the Vcs-Svn URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*-Perl-*- Test Harness script for Bioperl
2
 
# $Id: RepeatMasker.t 15112 2008-12-08 18:12:38Z sendu $
 
2
# $Id$
3
3
 
4
4
use strict;
5
5
 
6
6
BEGIN {
7
7
    use lib '.';
8
8
    use Bio::Root::Test;
9
 
    
10
 
    test_begin(-tests => 14);
11
 
        
12
 
        use_ok('Bio::Tools::RepeatMasker');
 
9
 
 
10
    test_begin(-tests => 28);
 
11
 
 
12
    use_ok('Bio::Tools::RepeatMasker');
13
13
}
14
14
 
15
15
my $inputfilename = test_input_file('repeatmasker.fa.out');
16
16
my $parser = Bio::Tools::RepeatMasker->new(-file => $inputfilename);
17
17
 
18
 
while (my $rpt = $parser->next_result) {
19
 
        is ($rpt->feature1->seq_id, "contig11600");
20
 
        is ($rpt->feature1->start, 1337);
21
 
        is ($rpt->feature1->end, 1407);
22
 
        is ($rpt->feature1->strand, 1);
23
 
        is ($rpt->feature1->primary_tag, "Simple_repeat");
24
 
        is ($rpt->feature1->source_tag, "RepeatMasker");
25
 
        is (scalar $rpt->feature1->get_tag_values('Target'), 3);
26
 
 
27
 
        is ($rpt->feature2->seq_id, "(TTAGGG)n");
28
 
        is ($rpt->feature2->start, 2);
29
 
        is ($rpt->feature2->end, 76);
30
 
        is ($rpt->feature1->primary_tag, "Simple_repeat");
31
 
        is ($rpt->feature1->source_tag, "RepeatMasker");
32
 
        is (scalar $rpt->feature2->get_tag_values('Target'), 3);
33
 
    
34
 
        last;
35
 
}
 
18
{
 
19
    my $rpt = $parser->next_result;
 
20
    is ($rpt->feature1->seq_id, "contig11600");
 
21
    is ($rpt->feature1->start, 1337);
 
22
    is ($rpt->feature1->end, 1407);
 
23
    is ($rpt->feature1->strand, 1);
 
24
    is ($rpt->feature1->primary_tag, "Simple_repeat");
 
25
    is ($rpt->feature1->source_tag, "RepeatMasker");
 
26
    is (scalar $rpt->feature1->get_tag_values('Target'), 3);
 
27
    is ($rpt->feature2->seq_id, "(TTAGGG)n");
 
28
    is ($rpt->feature2->start, 2);
 
29
    is ($rpt->feature2->end, 76);
 
30
    is ($rpt->feature1->primary_tag, "Simple_repeat");
 
31
    is ($rpt->feature1->source_tag, "RepeatMasker");
 
32
    is (scalar $rpt->feature2->get_tag_values('Target'), 3);
 
33
}
 
34
 
 
35
$parser->next_result for 1,2,3;
 
36
 
 
37
{
 
38
    my $rpt = $parser->next_result;
 
39
    is ($rpt->feature1->seq_id, "SL2.30ch10");
 
40
    is ($rpt->feature1->start, 38849);
 
41
    is ($rpt->feature1->end, 38940);
 
42
    is ($rpt->feature1->strand, -1);
 
43
    is ($rpt->feature1->primary_tag, "LTR");
 
44
    is ($rpt->feature1->source_tag, "RepeatMasker");
 
45
    is_deeply ( [ $rpt->feature1->get_tag_values('Target') ], ['LTR_PGSC0003DMS000000301_448',10681,10775] );
 
46
    is ($rpt->feature2->seq_id, "LTR_PGSC0003DMS000000301_448");
 
47
    is ($rpt->feature2->start, 10681);
 
48
    is ($rpt->feature2->end, 10775);
 
49
    is ($rpt->feature2->strand, -1);
 
50
    is ($rpt->feature1->primary_tag, "LTR");
 
51
    is ($rpt->feature1->source_tag, "RepeatMasker");
 
52
    is_deeply ([$rpt->feature2->get_tag_values('Target')],['SL2.30ch10',38849,38940]);
 
53
}
 
54