diff --git a/modules/Bio/EnsEMBL/Feature.pm b/modules/Bio/EnsEMBL/Feature.pm index 17fc7dccfa95f80755a7d0f973fe182c04fd0616..6901d6cfcc2cd9bd5b25b9bb4d94df631873dd51 100644 --- a/modules/Bio/EnsEMBL/Feature.pm +++ b/modules/Bio/EnsEMBL/Feature.pm @@ -1442,7 +1442,21 @@ sub summary_as_hash { return \%summary; } +=head2 species + Example : $feature->species(); + Description : Shortcut to the feature's DBAdaptor and returns its species name + Returntype : String the species name + Exceptions : Thrown if there is no attached adaptor + Caller : Webcode + +=cut + +sub species { + my ($self) = @_; + throw "Can only call this method if you have attached an adaptor" if ! $self->adaptor(); + reutrn $self->adaptor()->db()->species(); +} ##############################################