Commit a3489172 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

official guidelines on deprecation strategy

parent 3e67719d
This file contains the list of methods deprecated in the Ensembl core API.
A method is deprecated when it is not functional any more (schema/data change) or has been replaced by a better one.
Backwards compatibility is provided whenever possible.
When a method is deprecated, a deprecation warning is thrown whenever the method is used.
The warning also contains instructions on replacing the deprecated method and when it will be removed.
A year after deprecation (4 Ensembl releases), the method is removed from the API.
Removed in e87
Bio::EnsEMBL::AssemblyMapper::in_assembly
Bio::EnsEMBL::AssemblyMapper::map_coordinates_to_assembly
Bio::EnsEMBL::AssemblyMapper::fast_to_assembly
Bio::EnsEMBL::AssemblyMapper::map_coordinates_to_rawcontig
Bio::EnsEMBL::AssemblyMapper::list_contig_ids
Bio::EnsEMBL::ChainedAssemblyMapper::in_assembly
Bio::EnsEMBL::ChainedAssemblyMapper::map_coordinates_to_assembly
Bio::EnsEMBL::ChainedAssemblyMapper::fast_to_assembly
Bio::EnsEMBL::ChainedAssemblyMapper::map_coordinates_to_rawcontig
Bio::EnsEMBL::ChainedAssemblyMapper::list_contig_ids
Bio::EnsEMBL::DBEntry::get_synonyms
Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor::register_region
Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor::register_contig
Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor::fetch_by_type
Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor::fetch_by_chr_band
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_DBEntry
Bio::EnsEMBL::DBSQL::TranslationAdaptor::get_stable_entry_info
Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor::fetch_all_Groups
Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor::fetch_all_Groups_by_type
Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor::fetch_Group_by_id
Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor::fetch_Group_by_Gene_dbID
Bio::EnsEMBL::DBSQL::AnalysisAdaptor::feature_classes
Bio::EnsEMBL::DBSQL::BaseAlignFeatureAdaptor::fetch_all_by_RawContig_and_pid
Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_RawContig_constraint
Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_RawContig
Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_RawContig_and_score
Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::remove_by_RawContig
Bio::EnsEMBL::DBSQL::DBAdaptor::db_handle
Bio::EnsEMBL::DBSQL::DBAdaptor::port
Bio::EnsEMBL::DBSQL::DBAdaptor::driver
Bio::EnsEMBL::DBSQL::DBAdaptor::password
Bio::EnsEMBL::DBSQL::DBAdaptor::username
Bio::EnsEMBL::DBSQL::DBAdaptor::host
Bio::EnsEMBL::DBSQL::DBAdaptor::reconnect_when_lost
Bio::EnsEMBL::DBSQL::DBAdaptor::disconnect_when_inactive
Bio::EnsEMBL::DBSQL::DBAdaptor::dbname
Bio::EnsEMBL::DBSQL::DBAdaptor::prepare
Bio::EnsEMBL::DBSQL::DBAdaptor::list_supported_assemblies
Bio::EnsEMBL::DBSQL::DBAdaptor::assembly_type
Bio::EnsEMBL::DBSQL::DBAdaptor::db
Bio::EnsEMBL::DBSQL::DBAdaptor::source
Bio::EnsEMBL::DBSQL::DBConnection::group
Bio::EnsEMBL::DBSQL::DBConnection::species
Bio::EnsEMBL::DBSQL::DBEntryAdaptor::geneids_by_extids
Bio::EnsEMBL::DBSQL::DBEntryAdaptor::translationids_by_extids
Bio::EnsEMBL::DBSQL::DBEntryAdaptor::transcriptids_by_extids
Bio::EnsEMBL::DBSQL::DataFileAdaptor::DataFile_to_extension
Bio::EnsEMBL::DBSQL::ExonAdaptor::get_stable_entry_info
Bio::EnsEMBL::DBSQL::ExonAdaptor::fetch_all_by_gene_id
Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_nearest_Gene_by_Feature
Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_maximum_DBLink
Bio::EnsEMBL::DBSQL::GeneAdaptor::get_display_xref
Bio::EnsEMBL::DBSQL::GeneAdaptor::get_description
Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_DBEntry
Bio::EnsEMBL::DBSQL::GeneAdaptor::get_stable_entry_info
Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_Peptide_id
Bio::EnsEMBL::DBSQL::MetaContainer::get_Species
Removed in e84
Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::_fetch_by_attrib
Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::_fetch_all_by_attrib
Bio::EnsEMBL::DBSQL::MetaContainer::get_short_name
......@@ -745,7 +745,7 @@ sub adaptor {
sub in_assembly {
my ( $self, $object ) = @_;
deprecate('Use map() or list_ids() instead.');
deprecate('in_assembly is deprecated and will be removed in e87. Use map() or list_ids() instead.');
my $csa = $self->db->get_CoordSystemAdaptor();
......@@ -772,7 +772,7 @@ sub in_assembly {
sub map_coordinates_to_assembly {
my ( $self, $contig_id, $start, $end, $strand ) = @_;
deprecate('Use map() instead.');
deprecate('map_coordinates_to_assembly is deprecated and will be removed in e87. Use map() instead.');
# Not sure if contig_id is seq_region_id or name...
return
......@@ -790,7 +790,7 @@ sub map_coordinates_to_assembly {
sub fast_to_assembly {
my ( $self, $contig_id, $start, $end, $strand ) = @_;
deprecate('Use map() instead.');
deprecate('fast_to_assembly is deprecated and will be removed in e87. Use map() instead.');
# Not sure if contig_id is seq_region_id or name...
return
......@@ -807,7 +807,7 @@ sub fast_to_assembly {
sub map_coordinates_to_rawcontig {
my ( $self, $chr_name, $start, $end, $strand ) = @_;
deprecate('Use map() instead.');
deprecate('map_coordinates_to_rawcontig is deprecated and will be removed in e87. Use map() instead.');
return
$self->map( $chr_name, $start, $end, $strand,
......@@ -823,7 +823,7 @@ sub map_coordinates_to_rawcontig {
sub list_contig_ids {
my ( $self, $chr_name, $start, $end ) = @_;
deprecate('Use list_ids() instead.');
deprecate('list_contig_ids is deprecated and will be removed in e87. Use list_ids() instead.');
return
$self->list_ids( $chr_name, $start, $end,
......
......@@ -741,7 +741,7 @@ sub adaptor {
sub in_assembly {
my ($self, $object) = @_;
deprecate('Use map() or list_ids() instead.');
deprecate('in_assembly is deprecated and will be removed in e87. Use map() or list_ids() instead.');
my $csa = $self->db->get_CoordSystemAdaptor();
......@@ -766,7 +766,7 @@ sub in_assembly {
sub map_coordinates_to_assembly {
my ($self, $contig_id, $start, $end, $strand) = @_;
deprecate('Use map() instead.');
deprecate('map_coordinates_to_assembly is deprecated and will be removed in e87. Use map() instead.');
#not sure if contig_id is seq_region_id or name...
return $self->map($contig_id, $start, $end, $strand,
......@@ -784,7 +784,7 @@ sub map_coordinates_to_assembly {
sub fast_to_assembly {
my ($self, $contig_id, $start, $end, $strand) = @_;
deprecate('Use map() instead.');
deprecate('fast_to_assembly is deprecated and will be removed in e87. Use map() instead.');
#not sure if contig_id is seq_region_id or name...
return $self->map($contig_id, $start, $end, $strand,
......@@ -801,7 +801,7 @@ sub fast_to_assembly {
sub map_coordinates_to_rawcontig {
my ($self, $chr_name, $start, $end, $strand) = @_;
deprecate('Use map() instead.');
deprecate('map_coordinates_to_rawcontig is deprecated and will be removed in e87. Use map() instead.');
return $self->map($chr_name, $start, $end, $strand,
$self->assembled_CoordSystem());
......@@ -816,7 +816,7 @@ sub map_coordinates_to_rawcontig {
sub list_contig_ids {
my ($self, $chr_name, $start, $end) = @_;
deprecate('Use list_ids() instead.');
deprecate('list_contig_ids is deprecated and will be removed in e87. Use list_ids() instead.');
return $self->list_ids($chr_name, $start, $end,
$self->assembled_CoordSystem());
......
......@@ -707,7 +707,7 @@ sub ensembl_id{
sub get_synonyms {
my $self = shift;
deprecate("get_synonyms has been renamed get_all_synonyms.");
deprecate("get_synonyms is deprecated and will be removed in e87. Use get_all_synonyms instead.");
return $self->get_all_synonyms;
}
......
......@@ -82,7 +82,7 @@ use DBI qw( :sql_types );
sub fetch_all_Groups {
my ($self, $type) = @_;
deprecate('Please use fetch_all()');
deprecate('fetch_all_Groups is deprecate and will be removed in e87. Please use fetch_all()');
return $self->fetch_all($type);
}
......@@ -185,7 +185,7 @@ sub fetch_all {
sub fetch_all_Groups_by_type {
my ($self, $type) = @_;
deprecate('Please use fetch_all()');
deprecate('fetch_all_Groups_by_type is deprecated and will be removed in e87. Please use fetch_all()');
my $group_list = $self->fetch_all($type);
return $group_list;
}
......@@ -200,7 +200,7 @@ sub fetch_all_Groups_by_type {
sub fetch_Group_by_id {
my ($self, $group_id) = @_;
deprecate('Please use fetch_by_dbID()');
deprecate('fetch_Group_by_id is deprecated and will be removed in e87. Please use fetch_by_dbID()');
return $self->fetch_by_dbID($group_id);
}
......@@ -272,7 +272,7 @@ sub fetch_by_dbID {
sub fetch_Group_by_Gene_dbID {
my ($self, $gene_id) = @_;
deprecate('Please use fetch_by_gene_id()');
deprecate('fetch_Group_by_Gene_dbID is deprecated and will be removed in e87. Please use fetch_by_gene_id()');
return $self->fetch_by_gene_id($gene_id);
}
......
......@@ -217,7 +217,7 @@ SELECT DISTINCT analysis_id FROM %s |;
=cut
sub feature_classes{
deprecate("Deprecated. Hard-coded logic is not supported");
deprecate("feature_classes is deprecated and will be removed in e87. Hard-coded logic is not supported");
# Can't think of a way to do this programatically, so hard-coded
return qw(
DensityFeature
......
......@@ -1812,7 +1812,7 @@ sub delete_cache{
sub register_region{
my ($self, $assmapper, $type, $chr_name, $start, $end) = @_;
deprecate('Use register_assembled instead');
deprecate('register_region is deprecated and will be removed in e87. Use register_assembled instead');
$self->register_assembled($assmapper, $chr_name, $start, $end);
}
......@@ -1827,7 +1827,7 @@ sub register_region{
sub register_contig {
my ($self, $assmapper, $type, $contig_id ) = @_;
deprecate('Use register_component instead');
deprecate('register_contig is deprecated and will be removed in e87. Use register_component instead');
#not sure if the use is passing in a seq_region_name or a
#seq_region_id...
......@@ -1844,7 +1844,7 @@ sub register_contig {
sub fetch_by_type{
my ($self,$type) = @_;
deprecate('Use fetch_by_CoordSystems instead');
deprecate('fetch_by_type is deprecated and will be removed in e87. Use fetch_by_CoordSystems instead');
#assume that what the user wanted was a mapper between the sequence coord
#level and the top coord level
......
......@@ -305,6 +305,7 @@ sub fetch_all_by_hit_name_unversioned {
sub fetch_all_by_RawContig_and_pid {
my($self, $contig, $pid, $logic_name) = @_;
deprecate('fetch_all_by_RawContig_and_pid is deprecated and will be removed in e87. Use fetch_all_by_Slice_and_pid instead.');
my $constraint;
......
......@@ -1391,7 +1391,7 @@ sub _list_seq_region_ids {
sub fetch_all_by_RawContig_constraint {
my $self = shift;
deprecate('Use fetch_all_by_Slice_constraint() instead.');
deprecate('fetch_all_by_RawContig_constraint is deprecated and will be removed in e87. Use fetch_all_by_Slice_constraint() instead.');
return $self->fetch_all_by_slice_constraint(@_);
}
......@@ -1403,7 +1403,7 @@ sub fetch_all_by_RawContig_constraint {
sub fetch_all_by_RawContig {
my $self = shift;
deprecate('Use fetch_all_by_Slice() instead.');
deprecate('fetch_all_by_RawContig is deprecated and will be removed in e87. Use fetch_all_by_Slice() instead.');
return $self->fetch_all_by_Slice(@_);
}
......@@ -1415,7 +1415,7 @@ sub fetch_all_by_RawContig {
sub fetch_all_by_RawContig_and_score{
my $self = shift;
deprecate('Use fetch_all_by_Slice_and_score() instead.');
deprecate('fetch_all_by_RawContig_and_score is deprecated and will be removed in e87. Use fetch_all_by_Slice_and_score() instead.');
return $self->fetch_all_by_Slice_and_score(@_);
}
......@@ -1427,7 +1427,7 @@ sub fetch_all_by_RawContig_and_score{
sub remove_by_RawContig {
my $self = shift;
deprecate("Use remove_by_Slice instead");
deprecate("fetch_by_RawContig is deprecated and will be removed in e87. Use remove_by_Slice instead");
return $self->remove_by_Slice(@_);
}
......
......@@ -1080,8 +1080,7 @@ sub _fetch_by_attrib{
my $attrib = shift;
my $version = shift;
deprecate("You should be using the public method fetch_by_attrib ".
"(without initial underscore) instead");
deprecate("_fetch_by_attrib is deprecated and will be removed in e84. Please use fetch_by_attrib instead.");
return $self->fetch_by_attrib($attrib,$version);
}
......@@ -1115,8 +1114,7 @@ sub _fetch_all_by_attrib{
my $self = shift;
my $attrib = shift;
deprecate("You should be using the public method fetch_all_by_attrib ".
"(without initial underscore) instead");
deprecate("_fetch_all_by_attrib is deprecated and will be removed in e84. Please use fetch_all_by_attrib instead.");
return $self->fetch_all_by_attrib($attrib);
}
......
......@@ -1119,12 +1119,12 @@ sub revert_adaptor {
sub db{
my ($self, $arg ) = @_;
deprecate("db Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->db is deprecated and will be removed in e87. Please use DBConnection->db instead.");
return $self->dbc($arg);
}
sub source { deprecate('Do not use - this method does nothing'); }
sub source { deprecate('source is deprecated and will be removed in e84.'); }
=head2 assembly_type
......@@ -1137,7 +1137,7 @@ sub source { deprecate('Do not use - this method does nothing'); }
sub assembly_type{
my $self = shift;
deprecate('Use CoordSystemAdaptor $csa->fetch_all->[0]->version() instead');
deprecate('assembly_type is deprecated and will be removed in e87. Please use CoordSystemAdaptor $csa->fetch_all->[0]->version() instead');
my $csa = $self->get_CoordSystemAdaptor();
my ($cs) = @{$csa->fetch_all()};
......@@ -1155,7 +1155,7 @@ sub assembly_type{
sub list_supported_assemblies {
my($self) = @_;
deprecate('Use CoordSystemAdaptor::fetch_all instead');
deprecate('list_supported_assemblies is deprecated and will be removed in e87. Please use CoordSystemAdaptor::fetch_all instead');
my $csa = $self->get_CoordSystemAdaptor();
my %versions;
......@@ -1170,28 +1170,28 @@ sub list_supported_assemblies {
sub prepare{
my ($self, @args) = @_;
deprecate("prepare Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->prepare is deprecated and will be removed in e87. Please use DBConnection->prepare instead.");
$self->dbc->prepare(@args);
}
sub dbname{
my ($self, @args) = @_;
deprecate("dbname Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->dbname is deprecated and will be removed in e87. Please use DBConnection->dbname instead.");
$self->dbc->dbname(@args);
}
sub disconnect_when_inactive{
my ($self, @args) = @_;
deprecate("disconnect_when_inactive Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->disconnect_when_inactive is deprecated and will be removed in e87. Please use DBConnection->disconnect_when_inactive instead.");
$self->dbc->disconnect_when_inactive(@args);
}
sub reconnect_when_lost{
my ($self, @args) = @_;
deprecate("reconnect_when_lost Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->reconnect_when_lost is deprecated and will be removed in e87. Please use DBConnection->reconnect_when_lost instead.");
$self->dbc->reconnect_when_lost(@args);
}
......@@ -1199,31 +1199,31 @@ sub reconnect_when_lost{
sub host{
my ($self, @args) = @_;
deprecate("host Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->host is deprecated and will be removed in e87. Please use DBConnection->host instead.");
$self->dbc->host(@args);
}
sub username{
my ($self, @args) = @_;
deprecate("username Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->username is deprecated and will be removed in e87. Please use DBConnection->username instead.");
$self->dbc->username(@args);
}
sub password{
my ($self, @args) = @_;
deprecate("password Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->password is deprecated and will be removed in e87. Please use DBConnection->password instead.");
$self->dbc->password(@args);
}
sub driver{
my ($self, @args) = @_;
deprecate("driver Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->driver is deprecated and will be removed in e87. Please use DBConnection->driver instead.");
$self->dbc->driver(@args);
}
sub port{
my ($self, @args) = @_;
deprecate("port Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->port is deprecated and will be removed in e87. Please use DBConnection->port instead.");
$self->dbc->port(@args);
}
......@@ -1231,7 +1231,7 @@ sub db_handle{
my ($self, @args) = @_;
deprecate("db_handle Should no longer be called from the DBAdaptor. DBConnection should now be used OR preferably the object adaptor itself\n");
deprecate("DBAdaptor->db_handle is deprecated and will be removed in e87. Please use DBConnection->db_handle instead.");
$self->dbc->db_handle(@args);
}
......
......@@ -1089,7 +1089,7 @@ sub group {
my ($self, $arg ) = @_;
( defined $arg ) &&
( $self->{_group} = $arg );
deprecate "group should not be called from DBConnection but from an adaptor\n";
deprecate("DBConnection->group is deprecated and will be removed in e87. Please use adaptor->group instead.");
return $self->{_group};
}
......@@ -1104,7 +1104,7 @@ sub species {
my ($self, $arg ) = @_;
( defined $arg ) &&
( $self->{_species} = $arg );
deprecate "species should not be called from DBConnection but from an adaptor\n";
deprecate("DBConnection->species is deprecated and will be removed in e87. Please use adaptor->species instead.");
return $self->{_species};
}
......
......@@ -2341,7 +2341,7 @@ sub get_db_name_from_external_db_id{
sub geneids_by_extids{
my ($self,$name) = @_;
deprecate(" use 'list_gene_ids_by_extids instead");
deprecate("gene_ids_by_extids is deprecated and will be removed in e87. Please use 'list_gene_ids_by_extids instead");
return $self->list_gene_ids_by_extids( $name );
}
......@@ -2354,7 +2354,7 @@ sub geneids_by_extids{
sub translationids_by_extids{
my ($self,$name) = @_;
deprecate("Use list_translation_ids_by_extids instead");
deprecate("translationids_by_extids is deprecated and will be removed in e87. Please use list_translation_ids_by_extids instead");
return $self->list_translation_ids_by_extids( $name );
}
......@@ -2367,7 +2367,7 @@ sub translationids_by_extids{
sub transcriptids_by_extids{
my ($self,$name) = @_;
deprecate("Use list_transcript_ids_by_extids instead.");
deprecate("transcriptids_by_extids is deprecated and will be removed in e87. Please use list_transcript_ids_by_extids instead.");
return $self->list_transcript_ids_by_extids( $name );
}
......
......@@ -121,7 +121,7 @@ sub get_base_path {
sub DataFile_to_extension {
my ($self, $df) = @_;
deprecate("Use DataFile_to_extensions() instead");
deprecate("DataFile_to_extension is deprecated and will be removed in e87. Please use DataFile_to_extensions() instead");
my $extensions = $self->DataFile_to_extensions($df);
return $extensions->[0];
}
......
......@@ -747,7 +747,7 @@ sub _objs_from_sth {
sub get_stable_entry_info {
my ($self,$exon) = @_;
deprecated( "This method call shouldnt be necessary" );
deprecate( "get_stable_entry_info is deprecated and will be removed in e87. Please use object->stable_id instead." );
if( !$exon || !ref $exon || !$exon->isa('Bio::EnsEMBL::Exon') ) {
$self->throw("Needs a exon object, not a $exon");
......@@ -792,7 +792,7 @@ sub fetch_all_by_gene_id {
my $hashRef;
my ( $currentId, $currentTranscript );
deprecated( "Hopefully this method is not needed any more. Exons should be fetched by Transcript" );
deprecate("exon_adaptor->fetch_all_by_gene_id is deprecated and will be removed in e87. Please use transcript->get_all_Exons instead." );
if( !$gene_id ) {
$self->throw("Gene dbID not defined");
......
......@@ -2049,7 +2049,7 @@ sub fetch_nearest_Gene_by_Feature{
#This had no prime spec and was returning all overlaps regardless of strand
#else the first 10 from the stream with the first closest gene
deprecate( "use fetch_nearest_Genes_by_Feature instead");
deprecate( "fetch_neared_Gene_by_Feature is deprecated and will be removed in e87. Please use fetch_nearest_Genes_by_Feature instead");
#need to change params order here to account for new prime arg
return $_[0]->fetch_nearest_Genes_by_Feature($feat, undef, $stranded, $stream);
}
......@@ -2064,7 +2064,7 @@ sub fetch_nearest_Gene_by_Feature{
sub fetch_by_maximum_DBLink {
my ($self, $external_id) = @_;
deprecate("use fetch_all_by_external_name instead");
deprecate("fetch_by_maximum_DBLink is deprecated and will be removed in e87. Pleaseuse fetch_all_by_external_name instead");
my $genes = $self->fetch_all_by_external_name($external_id);
......@@ -2093,7 +2093,7 @@ sub fetch_by_maximum_DBLink {
sub get_display_xref {
my ($self, $gene) = @_;
deprecate("display xref should retrieved from Gene object directly");
deprecate("gene_adaptor->get_display_xref is deprecated and will be removed in e87. Please use gene->display_xref instead");
if (!defined $gene) {
throw("Must call with a Gene object");
......@@ -2137,7 +2137,7 @@ sub get_display_xref {
sub get_description {
my ($self, $dbID) = @_;
deprecate("Gene description should be loaded on gene retrieval. Use gene->get_description()");
deprecate("gene_adaptor->get_description is deprecated and will be removed in e87. Please use gene->get_description() instead");
if (!defined $dbID) {
throw("must call with dbID");
......@@ -2164,7 +2164,7 @@ sub get_description {
sub fetch_by_Peptide_id {
my ($self, $translation_stable_id) = @_;
deprecate("Please use better named fetch_by_translation_stable_id \n" . caller(2));
deprecate("fetch_by_Peptide_id is deprecated and will be removed in e87. Please use fetch_by_translation_stable_id instead");
$self->fetch_by_translation_stable_id($translation_stable_id);
}
......@@ -2178,7 +2178,7 @@ sub fetch_by_Peptide_id {
sub get_stable_entry_info {
my ($self, $gene) = @_;
deprecated("stable id info is loaded on default, no lazy loading necessary");
deprecate("gene_adaptor->get_stable_entry_info is deprecated and will be removed in e87. Please use gene->stable_id instead.");
if (!defined $gene || !ref $gene || !$gene->isa('Bio::EnsEMBL::Gene')) {
throw("Needs a gene object, not a $gene");
......@@ -2210,7 +2210,7 @@ sub get_stable_entry_info {
sub fetch_all_by_DBEntry {
my $self = shift;
deprecate('Use fetch_all_by_external_name instead.');
deprecate('fetch_all_by_DBEntry is deprecated and will be removed in e87. Please use fetch_all_by_external_name instead.');
return $self->fetch_all_by_external_name(@_);
}
......
......@@ -274,7 +274,7 @@ sub fetch_all_by_chr_band {
sub fetch_by_chr_band {
my $self = shift;
deprecate('Use fetch_all_by_chr_band instead.');
deprecate('fetch_by_chr_band is deprecated and will be removed in e87. Use fetch_all_by_chr_band instead.');
my ($band) = @{$self->fetch_all_by_chr_band(@_)};
return $band;
......
......@@ -94,7 +94,7 @@ sub get_production_name {
sub get_short_name {
my ($self) = @_;
deprecate('Call is deprecated. short_name is not in use any more, use get_common_name instead');
deprecate('get_short_name is deprecated and will be removed in e84. Please use get_common_name instead');
return $self->single_value_by_key('species.short_name');
}
......@@ -178,7 +178,7 @@ sub get_division {
sub get_Species {
my ($self) = @_;
deprecate('Call is deprecated. Use $self->get_common_name() / $self->get_classification() / $self->get_scientific_name() instead');
deprecate('get_Species is deprecated and will be removed in e87. Please use $self->get_common_name() / $self->get_classification() / $self->get_scientific_name() instead');
my $common_name = $self->get_common_name();
my $classification =
......@@ -236,10 +236,7 @@ sub get_taxonomy_id {
sub get_default_assembly {
my $self = shift;
deprecate("Use version of coordinate system you are interested in instead.\n".
"Example:\n".
' ($cs) = @{$coord_system_adaptor->fetch_all()};'."\n" .
' $assembly = $cs->version();');
deprecate("get_default_assembly is deprecated and will be removed in e87. Please use cs_adaptor->get_default_version instead.");
my ($cs) = @{$self->db->get_CoordSystemAdaptor->fetch_all()};
......@@ -252,7 +249,7 @@ sub get_default_assembly {
#
sub get_max_assembly_contig {
my $self = shift;
deprecate('This method should either be fixed or removed');
deprecate('get_max_assembly_contig is deprecated and will be removed in e84.');
return $self->single_value_by_key('assembly.maxcontig');
}
......
......@@ -263,7 +263,7 @@ sub store {
} ## end sub store
sub fetch_by_translation_id {
deprecate("Use fetch_all_by_translation_id instead.");
deprecate("fetch_by_translation_id is deprecated. Please use fetch_all_by_translation_id instead.");
fetch_all_by_translation_id(@_);