File: Genomewise.t

package info (click to toggle)
bioperl 1.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 40,768 kB
  • ctags: 12,005
  • sloc: perl: 174,299; xml: 13,923; sh: 1,941; lisp: 1,803; asm: 109; makefile: 53
file content (57 lines) | stat: -rw-r--r-- 1,361 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
50
51
52
53
54
55
56
57
# -*-Perl-*- Test Harness script for Bioperl
# $Id: Genomewise.t 11525 2007-06-27 10:16:38Z sendu $

use strict;

BEGIN {
    use lib '.';
    use Bio::Root::Test;
    
    test_begin(-tests => 21);
	
    use_ok('Bio::Tools::Genomewise');
}

my $inputfilename = test_input_file("genomewise.out");
my $parser = Bio::Tools::Genomewise->new(-file => $inputfilename);
my @gene;
while (my $gene= $parser->next_prediction){
    push @gene, $gene;
}
my @t = $gene[0]->transcripts;
my @e = $t[0]->exons;

is ($t[0]->source_tag, 'genomewise');
is ($e[0]->source_tag, 'genomewise');
is ($t[0]->primary_tag, 'transcript');
is ($e[0]->primary_tag, 'exon');

is (scalar($t[0]->exons), 5);
is ($t[0]->start, 4761);
is ($t[0]->end, 6713);
is ($e[0]->start,4761);
is ($e[0]->end, 4874);
my ($phase) = $e[0]->each_tag_value('phase');
is ($phase,0);

open(FH,$inputfilename);
$parser = Bio::Tools::Genomewise->new(-fh=>\*FH);
while (my $gene= $parser->next_prediction){
    push @gene, $gene;
}
@t = $gene[1]->transcripts;
@e = $t[0]->exons;

is ($t[0]->source_tag, 'genomewise');
is ($e[0]->source_tag, 'genomewise');
is ($t[0]->primary_tag, 'transcript');
is ($e[0]->primary_tag, 'exon');

is (scalar($t[0]->exons), 3);
is ($t[0]->start, 9862);
is ($t[0]->end, 10316);
is ($e[1]->start,10024);
is ($e[1]->end, 10211);

($phase) = $e[2]->each_tag_value('phase');
is ($phase,2);