From 54f9f5a607de69174303b1c8e88c132b8c29191c Mon Sep 17 00:00:00 2001
From: Arne Stabenau <stabenau@sanger.ac.uk>
Date: Mon, 25 Nov 2002 12:02:23 +0000
Subject: [PATCH] *** empty log message ***

---
 modules/Bio/EnsEMBL/Gene.pm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/modules/Bio/EnsEMBL/Gene.pm b/modules/Bio/EnsEMBL/Gene.pm
index 1762eda423..dd083f584d 100755
--- a/modules/Bio/EnsEMBL/Gene.pm
+++ b/modules/Bio/EnsEMBL/Gene.pm
@@ -875,4 +875,38 @@ sub temporary_id {
 }
 
 
+
+
+=head2 species
+
+  Arg [1]    : optional Bio::Species $species
+  Example    : none
+  Description: You can set the species for this gene if you want to use species 
+               specific behaviour. Otherwise species is retrieved from attached 
+               database.
+  Returntype : Bio::EnsEMBL::Species
+  Exceptions : none
+  Caller     : external_name, external_db, general for setting
+
+=cut
+
+
+sub species {
+  my ( $self, $species ) = @_;
+
+  if( defined $species ) {
+    $self->{species} = $species;
+  } else {
+    if( ! exists $self->{species} ) {
+      if( defined $self->adaptor() ) {
+	$self->{species} = $self->adaptor()->db->get_MetaContainer()
+	  ->get_Species();
+      }
+    }
+  }
+  
+  return $self->{species};
+}
+
+
 1;
-- 
GitLab