From f58532e4c4ae0a21fcc3febf050896226dd665d1 Mon Sep 17 00:00:00 2001
From: Graham McVicker <mcvicker@sanger.ac.uk>
Date: Fri, 22 Nov 2002 17:24:16 +0000
Subject: [PATCH] removed deprecated methods

---
 modules/Bio/EnsEMBL/Analysis.pm               |  26 ---
 modules/Bio/EnsEMBL/Clone.pm                  | 119 ----------
 .../EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm |  25 +-
 modules/Bio/EnsEMBL/Exon.pm                   | 217 ------------------
 modules/Bio/EnsEMBL/Gene.pm                   | 159 -------------
 5 files changed, 1 insertion(+), 545 deletions(-)

diff --git a/modules/Bio/EnsEMBL/Analysis.pm b/modules/Bio/EnsEMBL/Analysis.pm
index 94662e6d0c..438701fe67 100755
--- a/modules/Bio/EnsEMBL/Analysis.pm
+++ b/modules/Bio/EnsEMBL/Analysis.pm
@@ -522,32 +522,6 @@ sub compare {
   return 0;
 }
 
-  
-
-=head2 id
-
-  Arg        : none
-  Example    : none
-  Description: deprecated function, use dbID instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub id {
-    my ($self,$arg) = @_;
-    $self->warn( "Analysis->id is deprecated. Use dbID!" );
-    print STDERR caller;
-    
-    if (defined($arg)) {
-	$self->{_dbid} = $arg;
-    }
-    return $self->{_dbid};
-}
-  
-
-
 
 1;
 
diff --git a/modules/Bio/EnsEMBL/Clone.pm b/modules/Bio/EnsEMBL/Clone.pm
index 01755874ea..047b8b86aa 100644
--- a/modules/Bio/EnsEMBL/Clone.pm
+++ b/modules/Bio/EnsEMBL/Clone.pm
@@ -455,125 +455,6 @@ sub adaptor {
 
 }
 
-
-
-
-=head2 delete
-
-  Args       : none
-  Example    : none
-  Description: deprecated, use object adaptor for deletion
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub delete {
-    my ($self)=shift;
-    $self->warn("delete is now deprecated, use delete_by_dbID instead");
-    $self->delete_by_dbID;
-}
-
-
-=head2 seq_date
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use created instead
-               All contig sequences should have been created at the 
-               same time as this clone anyway, and seq_date is no longer
-               accessable from RawContig.
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub seq_date {
-   my ($self) = @_;
-
-   $self->warn("Call to deprecated method Bio::EnsEMBL::Clone::seq_date" .
-	      "Calling created method instead");
-   return $self->created();
-
- #  my $id = $self->id();
-#   my ($seq_date,$old_seq_date);
-
-#   foreach my $contig ($self->get_all_Contigs) {
-#       $seq_date = $contig->seq_date;
-#       if ($old_seq_date) {
-#	   if ($seq_date != $old_seq_date) {
-#	       $self->warn ("The created date of the DNA sequence from contig 
-#                             $contig is different from that of the sequence 
-#                             from other contigs on the same clone!");
-#	   }
-#       }
-#       $old_seq_date = $seq_date;
-#   }
-   
-#   return $seq_date;
-}
-
-=head2 is_golden
-
-  Args       : none
-  Example    : none
-  Description: deprecated, use assembly_mapper->in_assembly( $clone )
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub is_golden{
-   my ($self,@args) = @_;
-   
-   $self->warn("Clone::is_golden is deprecated. " .
-	       "Use \$assembly_mapper->in_assembly(\$clone)");
-
-   my $asma = $self->adaptor()->db()->get_AssemblyMapperAdaptor();
-   my $am = $asma->fetch_by_type($self->db()->assembly_type());
-   return $am->in_assembly($self);
-
-#   foreach my $contig ($self->get_all_Contigs) {
-#       if ($contig->is_golden) {
-#	   return 1;
-#       }
-#   }
-#   return 0;
-}
-
-
-
-=head2 get_Contig
-
-  Args       : none
-  Example    : none
-  Description: deprecated, use ContigAdaptor to get Contig
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-
-sub get_Contig {
-   my ($self,$contigid) = @_;
-
-   $self->throw("Clone::get_Contig is deprecated, " . 
-                "use \$contig_adaptor->fetch_by_dbID(\$contig_id) instead\n");
-
-   return undef;
-
-#   my $contig = $self->adaptor->get_Contig($contigid);
-   
-#   return $contig->fetch();
-}
-
-
-
-
 1;
 
 
diff --git a/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm
index 7f08455a7b..17612dca81 100644
--- a/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm
@@ -98,28 +98,5 @@ sub fetch_all_by_Exon {
   return $out;
 }
 
-
-
-=head2 fetch_by_Exon
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use fetch_all_by_Exon instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub fetch_by_Exon {
-  my ($self, @args) = @_;
-
-  $self->warn("fetch_by_Exon has been renamed fetch_all_by_Exon\n" . caller);
-
-  return $self->fetch_all_by_Exon(@args);
-}
-
-
-
-
 1;
+
diff --git a/modules/Bio/EnsEMBL/Exon.pm b/modules/Bio/EnsEMBL/Exon.pm
index f6fd2e49f4..9bf37ec7cb 100755
--- a/modules/Bio/EnsEMBL/Exon.pm
+++ b/modules/Bio/EnsEMBL/Exon.pm
@@ -1767,223 +1767,6 @@ triplets (start, stop, strand) from which new ranges could be built.
 
 ###############################################################################
 
-=head2 id
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use dbID or stable_id instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub id{
-   my ($self) = shift;
-   my $value  = shift;
-
-   my ($p,$f,$l) = caller;
-   $self->warn("$f:$l id deprecated. Please choose from stable_id or dbID");
-
-  if( defined $value ) {
-    $self->warn("$f:$l stable ids are loaded separately and dbIDs are generated on writing. Ignoring set value $value");
-    return;
-  }
-
-   if( defined $self->stable_id ) {
-     return $self->stable_id();
-   } else {
-     return $self->dbID;
-   }
-}
-
-
-
-=head2 clone_id
-
-  Args       : none
-  Example    : none
-  Description: deprecated, exons can have more than one clone.
-               StickyExons dont support this call
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub clone_id{
-   my $self = shift;
-
-   $self->warn("Exon->clone_id method deprecated\n");
-   return undef;
-
-   if( @_ ) {
-     my $value = shift;
-     $self->{'clone_id'} = $value;
-   }
-
-   if( defined $self->{'clone_id'} ) {
-     return $self->{'clone_id'};
-   } elsif( defined $self->contig() ) {
-     return $self->contig->cloneid();
-   } else {
-     return undef;
-   }
-}
-
-=head2 contig_id
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use Bio::EnsEMBL::Exon::contig instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub contig_id{
-  my $self = shift;
-  $self->warn("Bio::EnsEMBL::Exon::contig_id is deprecated.  \n" .
-	      "Use exon->contig->dbID instead $!");
-
-#  if($contig_id) {
-#    my $contig = 
-#      $self->adaptor->db->get_RawContigAdaptor->fetch_by_dbID($contig_id);
-#    $self->contig($contig);
-#  }
-
-#  return $self->contig()->dbID();
-  
-  if( @_ ) {
-    my $value = shift;
-    #print "setting contig_id = ".$value."\n";
-    $self->{'contigid'} = $value;
-  }
-  if( defined $self->{'contigid'} ) {
-    return $self->{'contigid'};
-  } elsif( defined $self->contig() ) {
-    return $self->contig->dbID();
-  } else {
-    return undef;
-  }
-}
-
-
-
-=head2 each_Supporting_Feature
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use get_all_supporting_features instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub each_Supporting_Feature {
-  my ($self, @args) = @_;
-  
-  $self->warn("Exon::each_Supporting_Feature has been renamed " .
-	      "get_all_supporting_features" . caller);
-  
-  return $self->get_all_supporting_features(@args);
-}
-
-
-=head2 add_Supporting_Feature
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use add_supporting_features instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub add_Supporting_Feature {
-  my ($self, @args) = @_;
-  
-  $self->warn("Exon::add_Supporting_Feature has been renamed " .
-	      "add_supporting_features" . caller);
-
-  return $self->add_supporting_features(@args);
-}
-
-=head2 ori_start
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED not needed, do not use
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub ori_start{
-   my $obj = shift;
-   
-   $obj->warn("Call to deprecated method ori_start " . caller);
-
-   if( @_ ) {
-      my $value = shift;
-      $obj->{'ori_start'} = $value;
-    }
-    return $obj->{'ori_start'};
-
-}
-
-
-=head2 ori_end
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED not needed, do not use
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub ori_end{
-   my $obj = shift;
-
-   $obj->warn("Call to deprecated method ori_end " . caller);
-
-   if( @_ ) {
-      my $value = shift;
-      $obj->{'ori_end'} = $value;
-    }
-    return $obj->{'ori_end'};
-
-}
-
-
-=head2 ori_strand
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED not needed, do not use
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub ori_strand{
-   my $obj = shift;
-
-   $obj->warn("Call to deprecated method ori_strand " . caller);
-
-   if( @_ ) {
-      my $value = shift;
-      $obj->{'ori_strand'} = $value;
-    }
-    return $obj->{'ori_strand'};
-}
 
 
 1;
diff --git a/modules/Bio/EnsEMBL/Gene.pm b/modules/Bio/EnsEMBL/Gene.pm
index b8076380ca..1762eda423 100755
--- a/modules/Bio/EnsEMBL/Gene.pm
+++ b/modules/Bio/EnsEMBL/Gene.pm
@@ -875,163 +875,4 @@ sub temporary_id {
 }
 
 
-
-
-
-#############################
-#
-# DEPRECATED METHODS FOLLOW
-#
-#############################
-
-=head2 each_Transcript
-
- Title   : each_Transcript
- Usage   : DEPRECATED foreach $trans ( $gene->each_Transcript)
- Function: DEPRECATED
- Example : DEPRECATED
- Returns : DEPRECATED An array of Transcript objects
- Args    : DEPRECATED
-
-
-=cut
-
-sub each_Transcript {
-   my ($self) = @_;
-
-   $self->warn("Gene->each_Transcript is deprecated.  " .
-	     "Use get_all_Transcripts().\n" . $self->stack_trace_dump() ."\n");
-   
-   
-
-   return $self->get_all_Transcripts();   
-}
-
-=head2 id
-
- Title   : id
- Usage   : DEPRECATED $obj->id($newval)
- Function: DEPRECATED
- Returns : DEPRECATED value of id
- Args    : DEPRECATED newvalue (optional)
-
-
-=cut
-
-sub id{
-  my $self = shift;
-  my $value = shift;
-
-   my ($p,$f,$l) = caller;
-   $self->warn("$f:$l id deprecated. Please choose from stable_id or dbID");
-
-  if( defined $value ) {
-    $self->warn("$f:$l stable ids are loaded separately and dbIDs are generated on writing. Ignoring set value $value");
-    return;
-  }
-
-
-   if( defined $self->stable_id ) {
-     return $self->stable_id();
-   } else {
-     return $self->dbID;
-   }
-
-}
-
-
-sub each_unique_Exon{
-   my ($self) = @_;
-
-   my ($p,$f,$l) = caller;
-   $self->warn("$f:$l each_unique_Exon deprecated. use get_all_Exons instead. Exon objects should be unique memory locations");
-
-   return $self->get_all_Exons;
-}
-
-
-sub all_Exon_objects{
-
-   my ($self) = @_;
-
-   my ($p,$f,$l) = caller;
-   $self->warn("$f:$l all_Exon_objects deprecated. use get_all_Exons instead. Exon objects should be unique memory locations");
-
-   return $self->get_all_Exons;
-}
-
-
-=head2 refresh
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED no longer needed, do not call
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub refresh {
-   my ($self) = @_;
-
-   $self->warn("call to deprecated method refresh.  This method is not needed "
-	       . "anymore and should not be called\n" );
-
-#   foreach my $e ($self->get_all_Exons) {
-#       $e->start($e->ori_start);
-#       $e->end($e->ori_end);
-#       $e->strand($e->ori_strand);
-#   }
-}
-
-
-
-=head2 each_DBLink
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use Bio::EnsEMBL::get_all_DBLinks instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub each_DBLink {
-  my $self = shift;
-
-  $self->warn("each_DBLink has been renamed get_all_DBLinks\n" .
-	      caller);
-
-  return $self->get_all_DBLinks();
-}
-
-
-=head2 get_Exon_by_id
-
-  Arg [1]    : none
-  Example    : none
-  Description: DEPRECATED use get_all_Exons instead
-  Returntype : none
-  Exceptions : none
-  Caller     : none
-
-=cut
-
-sub get_Exon_by_id {
-    my ($self, $id) = @_;
-
-    $self->warn("Get Exon by id is deprecated use get_all_Exons and " .
-		"sort through them yourself\n");
-
-    # perhaps not ideal
-    foreach my $exon ( $self->get_all_Exons ) {
-      # should this be stable_id
-      if( $exon->dbID eq $id ) {
-	return $exon;
-      }
-    }
-}
-
 1;
-- 
GitLab