Commit a64aa50e authored by Graham McVicker's avatar Graham McVicker
Browse files

removed deprecated methods

parent f132ef2a
......@@ -437,44 +437,4 @@ sub db {
}
=head2 fetch_by_newest_logic_name
Description: DEPRECATED Logic names should now be unique and should not
need to use this method. Use fetch_by_logic_name instead.
=cut
sub fetch_by_newest_logic_name {
my $self = shift;
my $logic_name = shift;
$self->warn("logic_names should now be unique should not " .
"need to use this method use fetch_by_logic_name\n");
return $self->fetch_by_logic_name($logic_name);
}
=head2 mysql2Unixtime
Description: DEPRECATED do not use
=cut
sub mysql2Unixtime {
my $sqltime = shift;
my ($package, $file, $line) = caller();
warn("AnalysisAdaptor::mysql2Unixtime is deprecated.\n " .
"package:$package: file:$file line:$line\n");
require "Time::Local";
my ($year,$month,$mday,$hour,$min,$sec ) = ( $sqltime =~ /(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)/ );
my $time = timelocal( $sec, $min, $hour, $mday, $month, $year );
}
1;
......@@ -126,15 +126,12 @@ sub new {
}
if($dbobj->isa('Bio::EnsEMBL::Container')) {
$self->throw("The base adaptor constructor argument should not be " .
"a Bio::EnsEMBL::Container. This will create a circular ".
"reference loop and result in memory leaks. You should ".
"use the DBAdaptor::get_XxxxAdaptor methods to create " .
"your object adaptors instead");
#avoid a circular reference loop!
$self->db($dbobj->_obj);
} else {
$self->db($dbobj);
}
$self->db($dbobj);
return $self;
}
......@@ -207,4 +204,4 @@ sub deleteObj {
}
1;
......@@ -130,46 +130,4 @@ sub fetch_all_by_Slice_and_pid {
=head2 fetch_by_Contig_and_pid
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig_and_pid instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Contig_and_pid {
my ($self, @args) = @_;
$self->warn("fetch_by_Contig_and_pid has been renamed fetch_all_by_RawContig_and_pid\n" . caller);
return $self->fetch_all_by_RawContig_and_pid(@args);
}
=head2 fetch_by_Slice_and_pid
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_Slice_and_pid instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Slice_and_pid {
my ($self, @args) = @_;
$self->warn("fetch_by_Slice_and_pid has been renamed fetch_all_by_Slice_and_pid\n" . caller);
return $self->fetch_all_by_Slice_and_pid(@args);
}
1;
......@@ -670,196 +670,6 @@ sub deleteObj {
%{$self->{'_slice_feature_cache'}} = ();
}
=head2 fetch_by_Contig_constraint
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig_constraint instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Contig_constraint {
my ($self, @args) = @_;
$self->warn("fetch_by_Contig_constraint has been renamed fetch_all_by_RawContig_constraint\n" . caller);
return $self->fetch_all_by_RawContig_constraint(@args);
}
=head2 fetch_by_Contig
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Contig {
my ($self, @args) = @_;
$self->warn("fetch_by_Contig has been renamed fetch_all_by_RawContig\n" . caller);
return $self->fetch_all_by_RawContig(@args);
}
=head2 fetch_by_Contig_and_score
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig_and_score instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Contig_and_score {
my ($self, @args) = @_;
$self->warn("fetch_by_Contig_and_score has been renamed fetch_all_by_RawContig_and_score\n" . caller);
return $self->fetch_all_by_RawContig_and_score(@args);
}
=head2 fetch_all_by_Contig
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_all_by_Contig {
my ($self, @args) = @_;
$self->warn("fetch_all_by_Contig has been renamed fetch_all_by_RawContig\n" . caller);
return $self->fetch_all_by_RawContig(@args);
}
=head2 fetch_all_by_Contig_and_score
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig_and_score instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_all_by_Contig_and_score {
my ($self, @args) = @_;
$self->warn("fetch_all_by_Contig_and_score has been renamed fetch_all_by_RawContig_and_score\n" . caller);
return $self->fetch_all_by_RawContig_and_score(@args);
}
=head2 fetch_all_by_Contig_constraint
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_RawContig_constraint instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_all_by_Contig_constraint {
my ($self, @args) = @_;
$self->warn("fetch_all_by_Contig_constraint has been renamed fetch_all_by_RawContig_constraint\n" . caller);
return $self->fetch_all_by_RawContig_constraint(@args);
}
=head2 fetch_by_Slice_and_score
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_Slice_and_score instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Slice_and_score {
my ($self, @args) = @_;
$self->warn("fetch_by_Slice_and_score has been renamed fetch_all_by_Slice_and_score\n" . caller);
return $self->fetch_all_by_Slice_and_score(@args);
}
=head2 fetch_by_Slice_constraint
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_Slice_constraint instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Slice_constraint {
my ($self, @args) = @_;
$self->warn("fetch_by_Slice_constraint has been renamed fetch_all_by_Slice_constraint\n" . caller);
return $self->fetch_all_by_Slice_constraint(@args);
}
=head2 fetch_by_Slice
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_Slice instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_Slice {
my ($self, @args) = @_;
$self->warn("fetch_by_Slice has been renamed fetch_all_by_Slice\n" . caller);
return $self->fetch_all_by_Slice(@args);
}
1;
......@@ -268,135 +268,6 @@ sub get_dbID_by_chr_name {
=head2 get_landmark_MarkerFeatures
Arg [1] : none
Example : none
Description: DEPRECATED use Slice::get_landmark_MarkerFeatures instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub get_landmark_MarkerFeatures{
my ($self,$chr_name,$glob) = @_;
$self->warn("ChromosomeAdaptor::get_landmark_MarkerFeatures is deprecated "
. "use Slice::get_landmark_MarkerFeatures instead\n");
if( !defined $glob ) {
$glob = 500000;
}
my $statement= " SELECT chr_start,
chr_end,
chr_strand,
name
FROM landmark_marker
WHERE chr_name = '$chr_name'
ORDER BY chr_start
";
$statement =~ s/\s+/ /g;
my $sth = $self->prepare($statement);
$sth->execute;
my ($start, $end, $strand, $name);
my $analysis;
my %analhash;
$sth->bind_columns
( undef, \$start, \$end, \$strand, \$name);
my @out;
my $prev;
while( $sth->fetch ) {
if( defined $prev && $prev->end + $glob > $start && $prev->id eq $name ) {
next;
}
my $sf = Bio::EnsEMBL::SeqFeature->new();
$sf->start($start);
$sf->end($end);
$sf->strand($strand);
$sf->id($name);
push(@out,$sf);
$prev = $sf;
}
return @out;
}
=head2 get_landmark_MarkerFeatures_old
Arg [1] : none
Example : none
Description: DEPRECATED do not use
Returntype : none
Exceptions : none
Caller : none
=cut
sub get_landmark_MarkerFeatures_old{
my ($self,$chr_name) = @_;
my $glob = 1000;
$self->throw( "Method deprecated. " );
return ();
# my $statement= " SELECT
# IF (sgp.raw_ori=1,(f.seq_start+sgp.chr_start-sgp.raw_start-1),
# (sgp.chr_start+sgp.raw_end-f.seq_end-1)),
# IF (sgp.raw_ori=1,(f.seq_end+sgp.chr_start-sgp.raw_start-1),
# (sgp.chr_start+sgp.raw_end-f.seq_start-1)),
# f.score,
# IF (sgp.raw_ori=1,f.strand,(-f.strand)),
# f.name, f.hstart, f.hend,
# f.hid, f.analysis, c.name
# FROM contig_landmarkMarker c,
# static_golden_path sgp,
# feature f
# WHERE f.contig = c.contig
# AND f.hid=c.marker
# AND sgp.raw_id=f.contig
# AND sgp.chr_name='$chr_name'";
# $statement =~ s/\s+/ /g;
# my $sth = $self->prepare($statement);
# $sth->execute;
# my ($start, $end, $score, $strand, $hstart,
# $name, $hend, $hid, $analysisid,$synonym);
# my $analysis;
# my %analhash;
# $sth->bind_columns
# ( undef, \$start, \$end, \$score, \$strand, \$name,
# \$hstart, \$hend, \$hid, \$analysisid,\$synonym);
# my @out;
# while( $sth->fetch ) {
# my $sf = Bio::EnsEMBL::SeqFeature->new();
# $sf->start($start);
# $sf->end($end);
# $sf->strand($strand);
# $sf->id($synonym);
# push(@out,$sf);
# }
# return @out;
}
sub store{
my ($self, $chromosome) = @_;
......
......@@ -443,36 +443,4 @@ sub store{
}
=head2 fetch
Description: DEPRECATED use fetch_by_accession instead
=cut
sub fetch {
my ($self,$id) = @_;
$self->warn("fetch is now deprecated, use fetch_by_accession instead");
$self->fetch_by_accession($id);
}
=head2 get_Contig
Description: DEPRECATED
use Bio::EnsEMBL::DBSQL::RawContigAdaptor::fetch_by_dbID instead
=cut
sub get_Contig {
my ($self,$contigid) = @_;
$self->throw("CloneAdaptor::get_Contig is deprecated, " .
"use \$contig_adaptor->fetch_by_dbID(\$id) instead");
return undef;
#my $contig = $self->db->get_Contig($contigid);
#return $contig->fetch();
}
1;
This diff is collapsed.
......@@ -740,72 +740,6 @@ sub create_tables {
}
=head2 fetch_by_translation
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_all_by_Translation instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_translation {
my ($self, $trans_id) = @_;
$self->warn("fetch_by_translation has been renamed fetch_all_by_Translation");
my $trans = $self->db->get_TranslationAdaptor->fetch_by_dbID($trans_id);
return $self->fetch_all_by_Translation($trans);
}
=head2 fetch_all_by_rawContig
Arg [1] : none
Example : none
Description: DEPRECATED use Bio::EnsEMBL::fetch_all_by_RawContig instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_all_by_rawContig {
my ( $self, $rawContigId ) = @_;
$self->warn("fetch_by_rawContig has been renamed fetch_by_RawContig");
my $contig = $self->db->get_RawContigAdaptor->fetch_by_dbID($rawContigId);
return $self->fetch_by_RawContig( $contig );
}
=head2 fetch_all_by_transcript
Arg [1] : none
Example : none
Description: DEPRECATED fetch_all_by_Transcript instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_transcript {
my ( $self, $trans ) = @_;
$self->warn("fetch_by_transcript has been renamed fetch_all_by_Transcript");
return $self->fetch_all_by_Transcript($trans);
}
1;
......
......@@ -595,83 +595,5 @@ sub remove {
}
=head2 fetch_by_geneId
Arg [1] : none
Example : none
Description: DEPRECATED use fetch_by_gene_id instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_by_geneId {
my ($self, $gene_id) = @_;
$self->warn("fetch_by_geneId has been renamed fetch_all_by_gene_id\n" . caller);
return $self->fetch_all_by_gene_id($gene_id);
}
=head2 fetch_frameshifts
Arg [1] : none
Example : none
Description: DEPRECATED do not use
Returntype : none
Exceptions : none
Caller : none
=cut
sub fetch_frameshifts {
my ( $self, $exon ) = @_;
$self->throw("call to deprecated method fetch_frameshifts");
return undef;
# my @frameshifts;
# my $frameshift_sql = "
# SELECT frameshift_start, length
# FROM exon_frameshift
# WHERE exon_id = " . $exon->dbID;