1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: Genomewise.t 11525 2007-06-27 10:16:38Z sendu $
9 test_begin(-tests => 21);
11 use_ok('Bio::Tools::Genomewise');
14 my $inputfilename = test_input_file("genomewise.out");
15 my $parser = Bio::Tools::Genomewise->new(-file => $inputfilename);
17 while (my $gene= $parser->next_prediction){
20 my @t = $gene[0]->transcripts;
23 is ($t[0]->source_tag, 'genomewise');
24 is ($e[0]->source_tag, 'genomewise');
25 is ($t[0]->primary_tag, 'transcript');
26 is ($e[0]->primary_tag, 'exon');
28 is (scalar($t[0]->exons), 5);
29 is ($t[0]->start, 4761);
30 is ($t[0]->end, 6713);
31 is ($e[0]->start,4761);
32 is ($e[0]->end, 4874);
33 my ($phase) = $e[0]->get_tag_values('phase');
36 open my $FH, '<', $inputfilename or die "Could not read file '$inputfilename': $!\n";
37 $parser = Bio::Tools::Genomewise->new(-fh => $FH);
38 while (my $gene= $parser->next_prediction){
41 @t = $gene[1]->transcripts;
44 is ($t[0]->source_tag, 'genomewise');
45 is ($e[0]->source_tag, 'genomewise');
46 is ($t[0]->primary_tag, 'transcript');
47 is ($e[0]->primary_tag, 'exon');
49 is (scalar($t[0]->exons), 3);
50 is ($t[0]->start, 9862);
51 is ($t[0]->end, 10316);
52 is ($e[1]->start,10024);
53 is ($e[1]->end, 10211);
55 ($phase) = $e[2]->get_tag_values('phase');