From 28e8a60d80ffd7479365c3e1d42f392a3336f8ee Mon Sep 17 00:00:00 2001 From: Web Admin <w3adm@sanger.ac.uk> Date: Tue, 13 Jan 2004 10:29:35 +0000 Subject: [PATCH] testing --- modules/Bio/EnsEMBL/Translation.pm | 33 +++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/Translation.pm b/modules/Bio/EnsEMBL/Translation.pm index 02c83365b8..a4d3007bc3 100755 --- a/modules/Bio/EnsEMBL/Translation.pm +++ b/modules/Bio/EnsEMBL/Translation.pm @@ -451,9 +451,10 @@ sub display_id { =cut -sub length { +sub seq_length { my $self = shift; my $seq = $self->seq(); + return ($seq) ? CORE::length($seq) : 0; } @@ -520,4 +521,34 @@ sub temporary_id { } +=head2 get_all_DASFeatures + + Arg [1] : none + Example : $features = $prot->get_all_DASFeatures; + Description: Retreives a hash reference to a hash of DAS feature + sets, keyed by the DNS, NOTE the values of this hash + are an anonymous array containing: + (1) a pointer to an array of features; + (2) a pointer to the DAS stylesheet + Returntype : hashref of Bio::SeqFeatures + Exceptions : ? + Caller : webcode + +=cut + +sub get_all_DASFeatures{ + my ($self,@args) = @_; + my %das_features; + foreach my $dasfact( $self->adaptor()->db()->_each_DASFeatureFactory ){ + my @featref = $dasfact->fetch_all_by_DBLink_Container( $self ); + $das_features{$dasfact->_dsn} = [@featref]; + } + return \%das_features; +} + +sub length { + my $self = shift; + return 1 ; +} + 1; -- GitLab