ensembl-hive  2.7.0
exonTranscript.pm
Go to the documentation of this file.
1 # See the NOTICE file distributed with this work for additional information
2 # regarding copyright ownership.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 use strict;
17 
18 use Test::More;
19 use Test::Warnings;
20 
21 use Bio::EnsEMBL::Test::MultiTestDB;
22 use Bio::EnsEMBL::Test::TestUtils;
23 
24 require_ok('Bio::EnsEMBL::UTR');
25 
26 our $verbose = 0; #set to 1 to turn on debug printouts
27 
28 my $multi = Bio::EnsEMBL::Test::MultiTestDB->new();
29 
30 ok(1);
31 
32 my $db = $multi->get_DBAdaptor( 'core' );
33 
34 ok($db);
35 
36 my $stable_id = 'ENST00000217347';
37 my $transcript_adaptor = $db->get_TranscriptAdaptor();
38 my $transcript =
39  $transcript_adaptor->fetch_by_stable_id($stable_id);
40 
41 my @ets = @{ $transcript->get_all_ExonTranscripts() };
42 my @exons = @{ $transcript->get_all_Exons() };
43 
44 my $n = scalar(@exons);
45 
46 for (my $i = 0; $i < $n; $i++) {
47  is($ets[$i]->start, $exons[$i]->start, "Starts match");
48  is($ets[$i]->end, $exons[$i]->end, "Ends match");
49  is($ets[$i]->rank, $i+1, "Rank is correct");
50 }
51 
52 
53 done_testing();
debug
public debug()