Commit 9aed91b8 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

remove deprecated methods for release 87

parent af33ebd3
......@@ -168,7 +168,6 @@ A year after deprecation (4 Ensembl releases), the method is removed from the AP
- Bio::EnsEMBL::**Root**::*stack_trace()*
- Bio::EnsEMBL::**Slice**::*get_all_SNPs()*
- Bio::EnsEMBL::**Slice**::*get_all_genotyped_SNPs()*
- Bio::EnsEMBL::**Slice**::*get_all_OligoFeatures_by_type()*
- Bio::EnsEMBL::**Slice**::*get_all_supercontig_Slices()*
- Bio::EnsEMBL::**Slice**::*get_Chromosome()*
- Bio::EnsEMBL::**Slice**::*chr_name()*
......
......@@ -737,98 +737,4 @@ sub adaptor {
return $self->{'adaptor'};
}
=head2 in_assembly
Description: DEPRECATED, use map() or list_ids() instead.
=cut
sub in_assembly {
my ( $self, $object ) = @_;
deprecate('in_assembly is deprecated and will be removed in e87. Use map() or list_ids() instead.');
my $csa = $self->db->get_CoordSystemAdaptor();
my $top_level = $csa->fetch_top_level();
my $asma =
$self->adaptor->fetch_by_CoordSystems( $object->coord_system(),
$top_level );
my @list = $asma->list_ids( $object->seq_region(),
$object->start(),
$object->end(),
$object->coord_system() );
return ( @list > 0 );
}
=head2 map_coordinates_to_assembly
Description: DEPRECATED, use map() instead.
=cut
sub map_coordinates_to_assembly {
my ( $self, $contig_id, $start, $end, $strand ) = @_;
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,
$self->contig_CoordSystem() );
}
=head2 fast_to_assembly
Description: DEPRECATED, use map() instead.
=cut
sub fast_to_assembly {
my ( $self, $contig_id, $start, $end, $strand ) = @_;
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,
$self->contig_CoordSystem() );
}
=head2 map_coordinates_to_rawcontig
Description: DEPRECATED, use map() instead.
=cut
sub map_coordinates_to_rawcontig {
my ( $self, $chr_name, $start, $end, $strand ) = @_;
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() );
}
=head2 list_contig_ids
Description: DEPRECATED, use list_ids() instead.
=cut
sub list_contig_ids {
my ( $self, $chr_name, $start, $end ) = @_;
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() );
}
1;
......@@ -733,96 +733,4 @@ sub adaptor {
}
=head2 in_assembly
Deprecated. Use map() or list_ids() instead
=cut
sub in_assembly {
my ($self, $object) = @_;
deprecate('in_assembly is deprecated and will be removed in e87. Use map() or list_ids() instead.');
my $csa = $self->db->get_CoordSystemAdaptor();
my $top_level = $csa->fetch_top_level();
my $asma = $self->adaptor->fetch_by_CoordSystems($object->coord_system(),
$top_level);
my @list = $asma->list_ids($object->seq_region(), $object->start(),
$object->end(), $object->coord_system());
return (@list > 0);
}
=head2 map_coordinates_to_assembly
DEPRECATED use map() instead
=cut
sub map_coordinates_to_assembly {
my ($self, $contig_id, $start, $end, $strand) = @_;
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,
$self->contig_CoordSystem());
}
=head2 fast_to_assembly
DEPRECATED use map() instead
=cut
sub fast_to_assembly {
my ($self, $contig_id, $start, $end, $strand) = @_;
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,
$self->contig_CoordSystem());
}
=head2 map_coordinates_to_rawcontig
DEPRECATED use map() instead
=cut
sub map_coordinates_to_rawcontig {
my ($self, $chr_name, $start, $end, $strand) = @_;
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());
}
=head2 list_contig_ids
DEPRECATED Use list_ids instead
=cut
sub list_contig_ids {
my ($self, $chr_name, $start, $end) = @_;
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());
}
1;
......@@ -666,22 +666,5 @@ sub status{
return $self->{status};
}
=head1 DEPRECATED METHODS
=cut
=head2 get_synonyms
DEPRECATED use get_all_synonyms instead
=cut
sub get_synonyms {
my $self = shift;
deprecate("get_synonyms is deprecated and will be removed in e87. Use get_all_synonyms instead.");
return $self->get_all_synonyms;
}
1;
......@@ -73,20 +73,6 @@ use Bio::EnsEMBL::Utils::Exception qw/throw deprecate warning/;
use Bio::EnsEMBL::Utils::Scalar qw/assert_ref/;
use DBI qw( :sql_types );
=head2 fetch_all_Groups
Arg[1] : (optional) String - type of group
Description : DEPRECATED. Please use fetch_all()
Returntype : ArrayRef of Bio::EnsEMBL::AltAlleleGroup
=cut
sub fetch_all_Groups {
my ($self, $type) = @_;
deprecate('fetch_all_Groups is deprecate and will be removed in e87. Please use fetch_all()');
return $self->fetch_all($type);
}
=head2 fetch_all
Arg[1] : (optional) String - type of group
......@@ -176,35 +162,6 @@ sub fetch_all {
return \@group_list;
}
=head2 fetch_all_Groups_by_type
Arg[1] : String - type of group
Description : DEPRECATED. Please use fetch_all()
Returntype : ArrayRef of Bio::EnsEMBL::AltAlleleGroup
=cut
sub fetch_all_Groups_by_type {
my ($self, $type) = @_;
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;
}
=head2 fetch_Group_by_id
Arg[1] : AltAlleleGroup dbID.
Description : DEPRECATED. Please use fetch_by_dbID
Returntype : Bio::EnsEMBL::AltAlleleGroup
=cut
sub fetch_Group_by_id {
my ($self, $group_id) = @_;
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);
}
=head2 fetch_by_dbID
Arg[1] : AltAlleleGroup dbID.
......@@ -262,21 +219,6 @@ sub fetch_by_dbID {
return;
}
=head2 fetch_Group_by_Gene_dbID
Arg[1] : Integer Gene ID of the member to query by
Description : DEPRECATED. Please use fetch_by_gene_id
Returntype : Bio::EnsEMBL::AltAlleleGroup
=cut
sub fetch_Group_by_Gene_dbID {
my ($self, $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);
}
=head2 fetch_by_gene_id
Arg[1] : Integer Gene ID of the member to query by
......
......@@ -203,36 +203,6 @@ SELECT DISTINCT analysis_id FROM %s |;
return [@analyses];
}
=head2 feature_classes
Arg [1] : NONE
Example : my @fclasses = $analysis_adaptor->feature_classes;
Description: Returns a list of the different classes of Ensembl feature
object that have an analysis
Returntype : List of feature classes
Exceptions : none
Caller : general
Status : Stable
=cut
sub feature_classes{
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
DnaAlignFeature
Gene
MarkerFeature
PredictionTranscript
ProteinAlignFeature
ProteinFeature
RepeatFeature
SimpleFeature
);
}
=head2 fetch_by_dbID
Arg [1] : int $internal_analysis_id - the database id of the analysis
......
......@@ -1804,60 +1804,4 @@ sub delete_cache{
}
=head2 register_region
Description: DEPRECATED use register_assembled instead
=cut
sub register_region{
my ($self, $assmapper, $type, $chr_name, $start, $end) = @_;
deprecate('register_region is deprecated and will be removed in e87. Use register_assembled instead');
$self->register_assembled($assmapper, $chr_name, $start, $end);
}
=head2 register_contig
Description: DEPRECATED use register_component instead
=cut
sub register_contig {
my ($self, $assmapper, $type, $contig_id ) = @_;
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...
register_component($assmapper, $contig_id);
}
=head2 fetch_by_type
Description: DEPRECATED use fetch_by_CoordSystems instead
=cut
sub fetch_by_type{
my ($self,$type) = @_;
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
my $csa = $self->db()->get_CoordSystemAdaptor();
my $cs1 = $csa->fetch_top_level($type);
my $cs2 = $csa->fetch_sequence_level();
return $self->fetch_by_CoordSystems($cs1,$cs2);
}
1;
......@@ -297,35 +297,6 @@ sub fetch_all_by_hit_name_unversioned {
}
=head2 fetch_all_by_RawContig_and_pid
Description: DEPRECATED use fetch_all_by_Slice_and_pid instead
=cut
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;
#get the primary table alias
my @tabs = $self->_tables;
my $alias = $tabs[0]->[1];
if(defined $pid) {
$constraint = "${alias}.perc_ident > $pid";
}
return $self->fetch_all_by_RawContig_constraint($contig,
$constraint,
$logic_name);
}
##implemented by subclasses:
# store
# _tables
......
......@@ -1331,60 +1331,6 @@ sub _list_seq_region_ids {
}
=head1 DEPRECATED METHODS
=cut
=head2 fetch_all_by_RawContig_constraint
Description: DEPRECATED use fetch_all_by_RawContig_constraint instead
=cut
sub fetch_all_by_RawContig_constraint {
my $self = shift;
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(@_);
}
=head2 fetch_all_by_RawContig
Description: DEPRECATED use fetch_all_by_Slice instead
=cut
sub fetch_all_by_RawContig {
my $self = shift;
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(@_);
}
=head2 fetch_all_by_RawContig_and_score
Description: DEPRECATED use fetch_all_by_Slice_and_score instead
=cut
sub fetch_all_by_RawContig_and_score{
my $self = shift;
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(@_);
}
=head2 remove_by_RawContig
Description: DEPRECATED use remove_by_Slice instead
=cut
sub remove_by_RawContig {
my $self = shift;
deprecate("fetch_by_RawContig is deprecated and will be removed in e87. Use remove_by_Slice instead");
return $self->remove_by_Slice(@_);
}
sub remove_by_analysis_id {
my ($self, $analysis_id) = @_;
......
......@@ -1109,129 +1109,5 @@ sub revert_adaptor {
return $deleted_adaptor;
}
#########################
# sub DEPRECATED METHODS
#########################
=head2 db
Description: DEPRECATED
=cut
sub db{
my ($self, $arg ) = @_;
deprecate("DBAdaptor->db is deprecated and will be removed in e87. Please use DBConnection->db instead.");
return $self->dbc($arg);
}
=head2 assembly_type
Description: DEPRECATED - Use CoordSystemAdaptor to obtain default coordinate
system instead.
=cut
sub assembly_type{
my $self = shift;
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()};
return ($cs) ? $cs->version() : undef;
}
=head2 list_supported_assemblies
Description: DEPRECATED - Use CoordSystemAdaptor to obtain list of top-level
coordinate systems instead
=cut
sub list_supported_assemblies {
my($self) = @_;
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;
foreach my $cs (@{$csa->fetch_all()}) {
$versions{$cs->version()} = 1;
}
return keys %versions;
}
sub prepare{
my ($self, @args) = @_;
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("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("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("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);
}
sub host{
my ($self, @args) = @_;
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("DBAdaptor->username is deprecated and will be removed in e87. Please use DBConnection->username instead.");
$self->dbc->username(@args);