From 4492f88fac49a6cfe9c2e2fe73d26f4c9e4048c0 Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Fri, 6 Feb 2004 14:46:47 +0000
Subject: [PATCH] name changes to follow naming conventions

---
 modules/Bio/EnsEMBL/Intron.pm | 12 +++++-----
 modules/t/intron.t            | 43 +++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 6 deletions(-)
 create mode 100644 modules/t/intron.t

diff --git a/modules/Bio/EnsEMBL/Intron.pm b/modules/Bio/EnsEMBL/Intron.pm
index ae2a85dcbe..ad74848349 100644
--- a/modules/Bio/EnsEMBL/Intron.pm
+++ b/modules/Bio/EnsEMBL/Intron.pm
@@ -81,10 +81,10 @@ sub new {
 }
 
 
-=head2 prev_exon
+=head2 prev_Exon
 
   Args       : none
-  Example    : $exon = $intron->prev_exon
+  Example    : $exon = $intron->prev_Exon
   Description: Returns the exon before this Intron
   Returntype : Bio::EnsEMBL::Exon
   Exceptions : none
@@ -92,17 +92,17 @@ sub new {
 
 =cut
 
-sub prev_exon {
+sub prev_Exon {
   my ($self) = shift;
 
   return $self->{'prev'};
 }
 
 
-=head2 next_exon
+=head2 next_Exon
 
   Args       : none
-  Example    : $exon = $intron->next_exon
+  Example    : $exon = $intron->next_Exon
   Description: Returns the exon after this Intron
   Returntype : Bio::EnsEMBL::Exon
   Exceptions : none
@@ -110,7 +110,7 @@ sub prev_exon {
 
 =cut
 
-sub next_exon {
+sub next_Exon {
   my ($self) = shift;
 
   return $self->{'next'};
diff --git a/modules/t/intron.t b/modules/t/intron.t
new file mode 100644
index 0000000000..666a574289
--- /dev/null
+++ b/modules/t/intron.t
@@ -0,0 +1,43 @@
+use lib 't';
+use strict;
+
+BEGIN { $| = 1;
+	use Test ;
+	plan tests => 14;
+}
+
+my $loaded = 0;
+END {print "not ok 1\n" unless $loaded;}
+
+use MultiTestDB;
+use TestUtils qw(debug test_getter_setter);
+
+our $verbose = 0; #set to 1 to turn on debug printouts
+
+$loaded = 1;
+my $multi = MultiTestDB->new();
+
+ok(1);
+
+my $db = $multi->get_DBAdaptor( 'core' );
+
+ok($db);
+
+my $stable_id = 'ENST00000217347';
+my $transcript_adaptor = $db->get_TranscriptAdaptor();
+my $transcript = 
+  $transcript_adaptor->fetch_by_stable_id($stable_id);
+
+
+my @exons = (@{$transcript->get_all_Exons()});  
+my @introns = (@{$transcript->get_all_Introns()});  
+
+my $i=0;
+foreach my $intron (@introns){
+  ok($intron->prev_Exon->end == $intron->start-1);
+  ok($intron->next_Exon->start == $intron->end+1);
+}
+
+
+$multi->restore();
+
-- 
GitLab