diff --git a/DEPRECATED.md b/DEPRECATED.md index 411b7249a31bc708a0b8c91a25c90362b6eb0a5e..e8a2629363f3a5c8182c64c3ea920cf310f879a3 100644 --- a/DEPRECATED.md +++ b/DEPRECATED.md @@ -8,6 +8,11 @@ When a method is deprecated, a deprecation warning is thrown whenever the method 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 Ensembl Release 91 ### + + - Bio::EnsEMBL::DBSQL::**BaseAdaptor**::*dump_data()* + - Bio::EnsEMBL::DBSQL::**BaseAdaptor**::*get_dumped_data()* + ### Removed in Ensembl Release 88 ### - Bio::EnsEMBL::**Slice**::*get_all_VariationFeatures()* @@ -163,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()* diff --git a/docs/ensembl_changes_spec.txt b/docs/ensembl_changes_spec.txt deleted file mode 100644 index 0670adfca6619ea3f06a7e09266987dc986d7b09..0000000000000000000000000000000000000000 --- a/docs/ensembl_changes_spec.txt +++ /dev/null @@ -1,955 +0,0 @@ -ENSEMBL - API Change Specification -================================== - -CONTENTS --------- - -Introduction -Goals -Schema Modifications - Proposed New/Modified Tables - seq_region - coord_system - seq_region_annotation - dna - assembly - gene - transcript - translation - all feature tables - meta_coord - misc_feature - misc_set - misc_feature_misc_set - misc_attrib - Removed Tables - contig - clone - chromosome -Meta Information -API Changes - Slice - Tile - SliceAdaptor - RawContig - RawContigAdaptor - Clone - CloneAdaptor - Chromosome - ChromosomeAdaptor - Root - Storable Base Class - Features - transform - transfer - move - project - StickyExon - AssemblyMapper - FeatureAdaptors - CoordSystemAdaptor -New Features - Assembly Exceptions - Haplotypes - Pseudo Autosomal Regions - Multiple Assemblies -Other Considerations - Loci - - -INTRODUCTION ------------- - -This document describes the changes that are being made to the EnsEMBL core -schema and Perl/Java/C APIs. - -GOALS ------ --A cleaner, more intuitive API --A more general schema able to better capture divergent assembly types --More flexibility with regards to assembly related data such as haplotypes, - PARs, WGS assemblies etc. - -SCHEMA MODIFICATIONS --------------------- - -Proposed New/Modified Tables: ------------------------------ - - seq_region - ---------- - The seq_region table is a generic replacement for the clone, contig, - and chromosome tables. Additionally supercontigs which were formerly in the - assembly table are also present in this table. The name column can contain - chromosome names, clone accessions, supercontig names or anything that is - appropriate for the seq_region it describes. The coord_system_id is a - foreign key to the new coordinate system and is used to distinguish - between the divergent types of sequence regions in the table. - - seq_region_id int - name varchar - coord_system_id int references coord_system table - length int - - - coord_system - ------------ - The coordinate system table lists the available coordinate systems in the - database. The attrib is mysql set and is used to denote the default version - of each named coordinate system. E.g. there may be two 'chromosome' coordiate - systems and the default may be version 'NCBI34'. The 'top_level' and - sequence level attribs denote the coordinate system from which sequence is - retrieved and the coordinate system which has the largest assembled pieces. - The top_level coordinate system will usually be 'chromosome' but for some - shrapnel assemblied this may be something like 'supercontig' or 'clone'. - - There may be multiple toplevel coordinate systems providing that they share - the same name (but different version) and providing one of them is the - default. There may only be a single sequence level coordinate system. - - Note that the version in the coordinate system can be viewed as applying - to every seq_region of a given coordinate system. It is analagous to - a CVS tag, not a CVS version. E.g. The version would 'NCBI33' apply to - every chromosome seq_region so it is a valid version. A clone accession of - '8' would not be a valid version because it only describes a particular - seq_region of the coordinate system - not all of them. - - coord_system_id int - name varchar - version varchar - attrib set ('top_level', 'default_version', 'sequence_level') - - - seq_region_annotation - --------------------- - This table allows for extra arbitrary information to be attached to - seq_regions. For example the htg_phase was formerly part of the clone table - but now is stored in this table. - - seq_region_id int - attrib_type_id smallint references attrib_type table - value varchar - - - dna - --- - Formerly the contig table referenced the dna table. Now the dna table - refrences the seq_region_table. Every seq_region which has a coordinate - system with the 'sequence_level' attrib should be referenced by an entry in - the dna table. - - seq_region_id int - sequence varchar - - - assembly - -------- - The assembly table has been made more generic. Columns that previously - were names chr_* and contig_* have been renamed asm_* and cmp_* (assembled - and component) respectively. The superctg_name column has been removed. - Supercontigs are now defined in the seq_region table. - - The makeup of all seq_regions from smaller seq_regions can be described in - this table. The relationships which are explicitly defined must be listed - in the meta table. For example, the clone <-> contig mapping used to be - defined in the contig table with an embl_offset column. This information is - now found in this table instead. - - asm_seq_region_id int - asm_start int - asm_end int - cmp_seq_region_id int - cmp_start int - cmp_end int - ori tinyint - - gene - ---- - For faster retrieval and retrieval independently of transcripts and - exons, genes have a seq_region_id, seq_region_start and seq_region_end - which defines the span of their transcript. - - The transcript_count column has been removed as it was never used. - - gene_id int - type varchar - analysis_id int - seq_region_id int - seq_region_start int - seq_region_end int - seq_region_strand tinyint - display_xref_id int - - - transcript - ---------- - For faster retrieval and retrieval independently of genes and exons - transcripts also have a seq_region_id, seq_region_start and - seq_region_end. The translation_id has been removed; translations will point - to transcripts instead (and pseudogenes will have no translation). - - The exon_count column has been removed as it was never used. - - transcript_id int - gene_id int - seq_region_id int - seq_region_start int - seq_region_end int - seq_region_strand tinyint - display_xref_id int - - - translation - ----------- - Translations now reference transcripts rather than transcripts referencing - a single (or no) translation. This allows for more elegant handling of - pseudogenes (where there is no translation) and also can be used to supply - multiple translations for a single transcript (e.g. polycistronic genes). - - translation_id int - transcript_id int - start_exon_id int - end_exon_id int - seq_start int - seq_end int - - - all feature tables - ------------------ - All feature tables would now have seq_region_id, seq_region_start, - seq_region_end, seq_region_strand instead of contig_id, contig_start, - contig_end. This includes the repeat_feature, simple_feature, - dna_align_feature, protein_align_feature, exon, marker_feature, - karyotype and qtl_feature tables. - - meta_coord - ---------- - The meta coord table defines what coordinate systems are used to store each - type of feature. A given type of feature may be stored in multiple - coordinate systems, but these will not be retrieved by the API unless there - is an entry in the meta_coord table. - - table_name varchar - coord_system_id int - - - misc_feature - ------------ - This is a renaming of the mapfrag table. The renaming reflects the fact that - this table can be used to store any type of feature. - - misc_feature_id - seq_region_id - seq_region_start - seq_region_end - seq_region_strand - - misc_set - -------- - This table was formerly names mapset. It defines 'sets' that can be used - to group misc_features together. - - misc_set_id smallint - code varchar - name description - description text - max_length int - - misc_feature_misc_set - --------------------- - This is a link table defining the many-to-many relationship between the - misc_set and misc_feature tables. - - misc_feature_id int - misc_set_id smallint - - - misc_attrib - ----------- - This table was formerly named mapfrag_annotation. It contains arbitrary - annotations of misc_features and links to the same attrib_type table that - the seq_region_attrib table uses. - - misc_feature_id int - attrib_type_id smallint - value varchar - - - -Removed Tables --------------- - - contig - ------ - Contigs are no longer needed. They are stored as entries in the seq_region - table with type 'contig'. The embl_offset and clone_id will not be - necessary as their relationship to clones can be described by the - assembly table. - - clone - ----- - Clones are no longer needed. Clones are stored as entries in the seq_region - table with coord_system 'clone'. The modified timestamp will be discarded - as it is no longer maintained anyway. The embl_acc, version, and - embl_version columns are redundant and will also be discarded. Versions - are simply appended onto the end of the name with a delimiting '.'. - - Any additional information that needs to be present (such as htg_phase) can - be added to the seq_region_attrib table. - - chromosome - ---------- - This table is no longer needed. Chromosomes can be stored in the - seq_region table with a 'chromosome' coord_system. - - - -META INFORMATION ----------------- - -Considerable more meta information is stored in the core -databases in order for the general approach to be maintained. -This information is stored in the new coord_system table and in the -meta, and meta_coord tables. - -Meta information includes the following: - - * The coordinate system that features of a given type are stored in. This - information is stored in the meta_coord table and is used when constructing - queries for a particular feature table. - - * The top-level coordinate system. For human - this would be 'chromosome'. For briggsae this may be something like - 'scaffold' or 'super contig'. This information would be used to construct - the web display and would possibly be the default coordinate system when - a coordinate system is unspecified by a user. This is stored as a flag - in the coord_system table. - - * The default version of each coordinate system. This is stored as a flag - in the coord_system table. - - * The coord_system where sequence is stored. This will be stored as a - flag in the coord_system table. Initially it will only be possible - to have a single coord_system in which sequence is stored. This - may be extended in the future to allow sequence to be stored for multiple - coord_systems. - - * The coordinate system relationships between that are explicitly defined - in the assembly table. The new API is capable of 2 step (implicit) mapping - between coordinate systems, but these relationships can be determined - through the direct relationship information. - - For example the clone, chromosome and nt_contig coordinate systems may all - be constructed from the contig coordinate system: - contig -> clone - contig -> chromosome - contig -> nt_contig - Or there may be a more hierarchical approach: - contig -> clone - clone -> nt_contig - nt_contig -> chromosome - This information is stored in the meta table under the key - 'assembly.mapping' with the following format (versions are optional): - assembled_coord_system_name[:version]|component_coord_system_name[:version] - - For example the meta table for human might contain the following entries: - mysql> select * from meta where meta_key = 'assembly.mapping'; - +---------+------------------+--------------------------+ - | meta_id | meta_key | meta_value | - +---------+------------------+--------------------------+ - | 43 | assembly.mapping | chromosome:NCBI33|contig | - | 44 | assembly.mapping | clone|contig | - | 45 | assembly.mapping | supercontig|contig | - +---------+------------------+--------------------------+ - - * The names of the allowable coordinate systems. This would allow for - quick validation of API requests and provide a list that could be used - by the website for coordinate system selection. This information will be - stored in the coord_system table. - - * The coordinate system(s) that each feature type is stored in. This is - stored in the meta_coord table. - - -API CHANGES ------------ - -Slice ------ - Slice methods chr_start, chr_end, chr_name will be renamed start, end, - seq_region_name. For backwards compatibility the old methods are - chained to the new methods with deprecated warnings. - - A new slice method 'coord_system' will be added and will return a - Bio::EnsEMBL::CoordSystem object. - - Slices will represent a region on a seq_region as opposed to a region on a - chromosome. Slices will be immutable (i.e. their attributes will not be - changeable). A new slice will have to be created if the attributes are to - be changed. - - The following attributes will therefore define a unique slice: - coord_system (e.g. object with name and version) - seq_region_name (e.g. 'X' or 'AL035554.1') - start (e.g. 1000000 or 1) - end (e.g. 2000001 or 800) - strand (e.g. 1 or -1) - - The name method will return the above values joined by a ':' delimiter, and - will not be settable: - e.g. 'chromosome:NCBI33:X:1000000:2000001:1' or 'clone::AL035554.1:1:800:-1' - This value can be used as a hashvalue that uniquely defines a slice. - - The concept of an 'empty' slice will no longer exist. - - The get_tiling_path method will be deprecated in favour of a more general - method project(). Whereas get_tiling_path() implies a relationship between - an assembly and the coordinate system which makes up the assembly the - project method will allow conversion accross any two coordinate systems. - It will take a coord_system string as an argument and rather - than returning a list of Tile objects it will return a listref of triplets - containing a start int, and end int, and a 'to' slice object. The following - is an example of how this method would be used ($clone is a reference to a - slice object in the clone coordinate system): - - my $clone_path = $slice->project('clone'); - - foreach my $segment (@$clone_path) { - my ($start, $end, $clone) = @$segment; - print $slice->seq_region_name, ':', $start, '-', $end , ' -> ', - $clone->seq_region_name, ':', $clone->start, '-', $clone->end, - $clone->strand, "\n"; - } - - An optional second argument to project() will be the coordinate - system version. E.g.: - $ncbi34_path = $slice->project('chromosome','NCBI34'). - - -Tile ----- - The tile object will no longer be necessary. However for backwards - compatibility it will remain in the system for some time before being phased - out along with the get_tiling_path method. - - -SliceAdaptor ------------- - The Slice adaptor must provide a method to fetch a slice via its coordinate - system, seq_region_name, start, end, and strand. - The old, commonly used method fetch_by_chr_start_end has been altered to - simply chain to this new method (with a warning) as do most other - SliceAdaptor methods. - - Another method which is necessary with the disapearence of the Clone, - RawContig and Chromosome adaptors is one which allows for all slices - of a certain type to be retrieved. For example it is often necessary to - retrieve all chromosomes, or clones for a species. This method is simply - named fetch_all. The old fetch_all methods on the ChromosomeAdaptor, - RawContigAdaptor, CloneAdaptor, etc. chain to the new method for backwards - compatibility. - - Method Names and Signatures - --------------------------- - Slice fetch_by_region(coord_system, name) - Slice fetch_by_region(coord_system, name, start) - Slice fetch_by_region(coord_system, name, start, end) - Slice fetch_by_region(coord_system, name, start, end, strand) - Slice fetch_by_region(coord_system, name, start, end, strand, version) - listref of Slices fetch_all(coord_system) - listref of Slices fetch_all(coord_system, version) - -RawContig ---------- - The RawContig object is no longer necessary with the new system. RawContigs - are replaced by Slices with coord_system = 'contig'. In the interests of - backwards compatibility the RawContig class will still be present for - sometime as a minimal implmentation inheriting from the Slice class. - - -RawContigAdaptor ----------------- - The RawContigAdaptor is no longer necessary. The RawContigAdaptor is - replaced by the SliceAdaptor. For backwards compatibility a minimal - implementation of the RawContigAdaptor will remain which inherits from the - SliceAdaptor. - -Clone ------ - The Clone object is no longer necessary in the new system. Clones are - replaced by Slices with coord_system = 'clone'. For backwards compatibility - a minimal implementation will remain which inherits from the Slice object. - -CloneAdaptor ------------- - The CloneAdaptor object is no longer necessary in the new system. The - CloneAdaptor is replaced by the SliceAdaptor. For backwards compatibility - a minimal implementation will remain which inherits from the SliceAdaptor. - -Chromosome ----------- - The Chromosome object is no longer necessary in the new system. The - Chromosome is replaced by Slices with coord system 'chromosome' (or - whatever the top level seq_region type is for that species). For backwards - compatibility a minimal implementation will remain which inherits from the - Slice object. - - Statistical information (e.g. known genes, genes, snps) that - was on chromosomes may be stored in the seq_region_attrib table or - in some sort of density table. - -ChromosomeAdaptor ------------------ - The Chromosome object is no longer necessary in the new system. The - ChromosomeAdaptor is replaced by the SliceAdaptor. For backwards - compatibility a minimal implementation which inherits from the SliceAdaptor - will remain. - - -Root ----- - Every class in the current EnsEMBL perl API inherits directly or indirectly - from Bio::EnsEMBL::Root. This inheritance is almost exclusively for the - following following three methods: - throw - warn - _rearrange - - Nothing is gained by implementing this relationship as inheritance, and there - are several disadvantages: - (1) Everything must inherit from this class to use those 3 object methods. - This can result in patterns of multiple inheritance which are generally - considered to be a bad thing. - - (2) It is not possible to use the throw, warn or rearrange method within - the constructor until the object is blessed. Blessing the object first - and then calling rearrange to extract named arguments is slower because - the blessed hash needs to be expanded as more keys are added and several - key access/value assignements may need to be performed. - - (3) Objects become larger and object construction becomes slightly slower - because constructors traverse an additional level of inheritance. - - A better approach, which we have used, is to make the methods static and - create a static utility class that exports the methods. The warn method has - been renamed warning so as not to conflict with the builtin perl function - warn and the _rearrange method has be renamed rearrange. - - The following is an example of the old styl Root inheritance and the new - style static utility methods: - - # - # OLD STYLE - # - package Old; - - use Bio::EnsEMBL::Root; - - @ISA = qw(Bio::EnsEMBL::Root); - - sub new { - my $caller = shift; - my $class = ref($caller) || $caller; - - $self = $class->SUPER::new(@_); - - my ($start, $end) = $self->_rearrange(['START', 'END'], @_); - - if(!defined($start) || !$defined($end)) { - $self->throw('-START and -END arguments are required'); - } - - $self->{'start'} = $start; - $self->{'end'} = $end; - - return $self; - } - - # - # NEW STYLE - # - package New; - - use Bio::EnsEMBL::Utils::Exception qw(throw warning); - use Bio::EnsEMBL::Utils::Argument qw(rearrange); - - sub new { - my $caller = shift; - - my $class = ref($caller) || $caller; - - my ($start, $end) = rearrange(['START', 'END'], @_); - - if(!defined($start) || !defined($end)) { - throw('-START and -END arguments are required'); - } - - return bless {'start' => $start, 'end' => $end}, $class; - } - - The calls to $self->rearrange $self->warn and $self->throw have been - replaced by class method calls to warning() and throw() inside the core API. - However, for backwards compatibility the existance inheritance to - Bio::EnsEMBL::Root will remain in many cases (and be removed at a later date) - - -Storable Base Class -------------------- - Almost all business objects in the EnsEMBL system are storable in the db - and the ones which are always require 2 methods: dbID() and adaptor(). These - methods have been moved to a Storable base class which most of the - business objects now inherit from. This module has an additional method - is_stored() which takes a database argument and returns true if the object - appears to already have been stored in the provided database. - -Features --------- - All features should inherit from a base class that implements common feature - functionality. Formerly this role was filled by the bloated SeqFeature class - which inherits from Bio::SeqFeature and Bio::SeqFeatureI etc. - This class has been replaced by a smaller, less complicated - implementation named Feature. To make classes more polymorphic in general, - the gene, and transcript objects should now also inherit from the Feature - class. This class implements the following core methods common to all - features: - - start - end - strand - slice (formerly named contig/entire_seq/etc.) - transform - transfer - project - analysis - - The feature class inherits from the Storable base class and thereby inherits - the following methods: - - adaptor - dbID - is_stored - - The signature and behaviour of the transform method has been changed. The - existing method works differently depending on the arguments passed as - described below. - - OLD transform(no arguments) - ----------------------- - Transforms from slice coordinates to contig coordinates. The feature - is changed in place and returned. If the feature already is in contig - coordinates an exception is thrown. The feature may be split into two - features in which case both features are returned (not sure if one of - them is transformed in place). Some features are not permitted to be - split in two in which case an exception is thrown? (not sure) if it is - to be split accross contigs. - - OLD transform(slice) - ---------------- - If the feature is already in slice coordinates and the slice is on the - same chromosome the features coordinates are simply shifted. If the - feature is already in slice coordinates but on a different chromosome - an exception is thrown. - It the feature is in contig coordinates and the slice is not empty then - it is transformed onto the new slice (or an exception is thrown if the - transform would cause the feature to end up on a different chromosome - than the slice). If the feature is in contig coordinates and the - slice is an empty slice the feature is transformed into chromosomal - coordinates and placed on a newly created slice of the entire chromosome. - - The new transformation has only a single valid signature and splits its - responsibilities with the new transfer method. The transfer - method transfers a feature onto another slice, whereas the transform - method simply converts coordinate systems. Transform does - NOT transform features in place but rather returns the newly - transformed feature as a new object: - - transform(coord_system, [version]) - ----------------------- - Takes a single string specifying the new coord system. If the coord - system is not valid an exception is thrown. If the coord system is the - same coord system as the feature is currently in a new feature that is - a copy of the old one is still be returned. This also retrieves - a slice which is the entire span of the region of the coordinate system - that this feature is being transformed to. For example transforming - an exon in contig coordinates to chromosomal coodinates will place a - copied exon on a slice of an entire chromosome. If a feature spans a - boundary in the coordinate system, undef is returned by the method - instead. - - transfer(slice) - ---------------- - Shifts a feature from one slice to another. If the new slice is in the - same coordinate system but different seq_region_name (e.g. both - chromosomal but different chromosomes) an exception is thrown. - If the new slice is in a different coordinate system then the - transform method is internally called first. If the feature would be - split across a boundary undef is returned instead. After the transform - there follows a potential move, if the slice does not cover the full - seq_region. If there is no transform call necessary, the feature is - copied and then moved. - - move( start, end, strand ) - -------------------------- - In place change of the coordinates of the feature. It will stay on the - same slice. - - project(coord_system, [version]) - ----------------- - This method is analagous to the project method on Bio::EnsEMBL::Slice. - It 'projects' a feature onto another coordinate system and returns the - results formatted as a listref of [$start, $end, $feature] triplets. - The $features returned are copies of the feature on which the method was - called, but with coordinates in the coordinate system that was projected - to. If the feature maps entirely to a gap then an empty list ref [] will - be returned. If the feature is mapped to multiple locations a listref - containing split features will be returned. - -StickyExon ----------- - The sticky exon object is not be present in the new system. It does not - make sense to define features in a coordinate system where they are simply - not present. Exons are calculated in chromosomal coordinates and they - will generally be retrieved in the same coordinates system. It will - of course be possible to still retrieve exons in contig coordinates but only - is they are fully defined on the contigs of interest. - The split coordinates can be obtained through a call to the project - method. - - -AssemblyMapper --------------- - The assembly mapper and assembly mapper adaptor classes have become more - general and sophisticated.Not only is it possible to map between two - coordinates systems whose relationship is explicitly defined in the assembly - table, but it is also possible to perform implicit, 2-step mapping - using 'coordinate system chaining'. - - For example if no explicit relationship is defined between the supercontig - and clone coordinate systems but relationships between the clone and contig - and the supercontig and contig coordinate systems is present the mapper has - the faculty to perform the mapping between the clone and supercontig systems. - In this case the contig cooridinate system is used as an intermediary: - - NTContig <-> Contig <-> Clone - - In the above example the assembly mapper adaptor internally does the - following: - - (1) Create a mapper object between the NTContig and Contig region - (2) Create a mapper object between the Contig and Clone region - (3) Create and return a third mapper constructed from the sets of mappings - generated by the intermediate mappers. - - -FeatureAdaptors ---------------- - Most FeatureAdaptors inherit from the BaseFeature adaptor. As a - minimum feature adaptors provide fetch_all_by_Slice and fetch_by_dbID - methods. The fetch by slice method provides the same return types and - requires the same arguments as before, but required some internal changes. - - The simplified algorithm for fetching features via a slice is: - - (1) Check with coord system is requested or that slice is in. - (2) Check which coord system features are in - (3) Obtain mapper between coord systems - (5) Retrieve features in their native coord system. - (6) Remap features to the requested coord system using the mapper - (7) Return the features - - The method fetch_all_by_RawContig is obsolete (it is equivalent to - fetching by a slice of a contig) but has be left in as an alias for the - fetch all by slice method for backwards compatibility. - - When performing a non-locational fetch (e.g. by dbID) features are still - returned in the coordinate system that they are calculated in. This is to - ensure that the feature can always be retrieved in this manner of fetching - and so that features which are not in the database can be distinguished from - features which are simply not in the requested coordinate sytem. When a - single feature which is not in the database is requested via a non-locational - fetch undef is returned instead. If multiple features are requested but none - are present in the database a reference to an empty list is returned. If the - features are required in a specific coordinate system the transfer, project - or transform method can always be used. - - -CoordSystemAdaptor ------------------- - A CoordSystemAdaptor provides access to the information in the - coord_system, meta and meta_coord tables. This adaptor provides - Bio::EnsEMBL::CoordSystem objects. - - -NEW FEATURES ------------- - -Assembly Exceptions (Symbolic Sequence Links) ---------------------------------------------- - - It is sometimes desirable to have multiple regions refer to the same - sequence. - - In much the same way a symlinked file acts as a pointer to a real file, - a symlinked region can point to another region of sequence. - - This can be described in the database through the addition of a table which - has a structure that mirrors that of the assembly table. The assembly table - does not define the structure underlying this seq_region, and it does not - have sequence of its own. By means of the assembly_exception table this - seq_region points to another seq_region where the underlying sequence is - defined: - - assembly_exception - ------------------ - seq_region_id int - seq_region_start int - seq_region_end int - exc_type enum('HAP', 'PAR') - exc_seq_region_id int - exc_seq_region_start int - exc_seq_region_end int - ori int (may not be needed, may implicitly be 1) - - When fetching features and sequence from a slice that overlaps a symlinked - region, the features and sequence from the symlinked region are returned. - This may be implemented by altering fetch by slice calls and adding a - SliceAdaptor method with splits a slice into non-symlinked components. - The following algorithm would apply to sequence and feature fetches: - (1) Split the slice into non-symlinked component slices - (2) Recursively call the method with the component slices - (3) Adjust the start and end of the returned features and place them - back on the original slice (or splice the sequence together if this - is a sequence fetch) - (4) Return the features or sequence - - Consider a slice which overlaps regions (A), (B), and (C) on chromosome Y: - - =============== (chrX) - ^^^^^^^^^^^ - ======== symlink ========= (chrY) - (A) (B) (C) - - Regions (A) and (C) are described by the assembly table, but region (B) - is described in the assembly_exception table and points to a region of - chromosome Y. When features or sequence are retrieved the slice is split - into 3 component slices which have no symlinks: region (A) and (C) are - slices on chromosome Y but region (B) is made into a slice on chromsome (X). - All of the features are fetched from the individual slices adjusted by - some addition and placed on back on the original Slice before being - returned. - - - -Haplotypes (and the MHC region) -------------------------------- - There are several requirements related to haplotypes: - - Must be able to determine which haplotypes overlap a slice - - Must be able to run genebuild/raw computes over the haplotypes - - Must be able to retrieve a slice on a haplotype and its flanking - regions (i.e. the regions of the default assembly bordering the - haplotype). - - It may be desireable to interpolate features from the default sequence - onto the haplotype - - Proposal: - The haplotype will be present as a full length 'chromosome' in the - seq_region table (or other appropriate coordinate system) but only the - region which differs from the the default assembly will be described in - the chromosome table. The regions which are identical will be described - by the assembly_exception table. - - It is possible to retrieve a slice on a haplotype just as any other slice - is retrieved from the SliceAdaptor. For example: - $slice = $slice_adaptor->fetch_by_region('chromosome', '6_DR52'); - - A slice created on a haplotype will have coordinates relative to the - start of the chromosome NOT relative to the start of the haplotype - region. For all intents and purposes a haplotype slice will behave as - a normal slice. - - For example, the assembly table could define the composition of the - divergent region of chromosome 6_DR52 (C), but leave the remainder of the - chromosomal composition undefined. The remainder of the - chromosome composition would be accounted for by 2 rows in the - assembly_exception table which described the synonymous regions in terms - of chromosome 6: - - ============== 6 ============== 6 - ^ ^ - _____|________ _______|______ - C ========== 6_DR52 - - - - - -Pseudo Autosomal Regions (PARs) -------------------------------- - There are several requirements related to PARs: - - The same sequence and features must be present on a region of - both chromosome X and chromosome Y - - The region and features should be returned when retreiving features - from either chromosome. - - It must still be possible to retrieve one of the features via its - identifier - - It must still be possible to transform features in the region from - chromosomal coordinates to contig coords and vice-versa. - - The genebuild should run over the region, but only once. - - Proposal: - Use the assembly_exception table in a similar fashion as it is used - for the haplotypes described above. Chromosome X can be the 'default' - chromosome for the PAR and Chromosome Y can be described by the assembly - table except in the PAR. The PAR on chromosome Y can be defined by the - assembly_exception table and refer to the corresponding sequence on - chromosome X. The same algorithm as used for haplotypes can then be used - when retrieving sequence or features from slices which overlap this - exception on chromosome Y. - - The following diagram illustrates how chromsome X and chromosome Y could - be defined: - - ========================================== X - ^ ^ - _|_ ____|____ - ====== ============ ============= Y - - -Multiple Assemblies -------------------- - -In theory it is possible to load multiple assemblies into the same database. -For example two coordinate systems with two versions chromosome:NCBI33 and -chromosome:NCBI34 could be loaded into the database. Leveraging the fact that -two step mapping is possible and that these coordinate systems share a -coincident mapping with the contig coorinate system it is possible to pull -across annotation from one assembly to the other. The following example -illustrates the transfer of genes from the chromosome X on the NCBI33 assembly -to the NCBI34 assembly: - - $slice = $slice_adaptor->fetch_by_region('chromosome', 'X', undef, - undef,undef, 'NCBI33'); - @genes = @{$gene_adaptor->fetch_all_by_Slice($slice)}; - - foreach my $gene (@genes) { - $gene->transform('chromosome', 'NCBI34'); - #... - } - - -OTHER CONSIDERATIONS --------------------- - -Loci ----- - -Similar genes which are defined across haplotypes need -to be somehow linked into loci. The intent is that -a user would be able to see that a gene has a counterpart -on an equivalent haplotypic sequence. - -This is work in progress. The current opinion among us is to implement -it via a relationship table that specifies which genes on default -haplotypes are considered equivalent to other genes on -(overlapping) haplotypes. - diff --git a/modules/Bio/EnsEMBL/Analysis/PairAlign.pm b/modules/Bio/EnsEMBL/Analysis/PairAlign.pm index 404364bb3e917b4034676314430491332b461123..9a4d2f947bcff6cce99f4eccffc95dc9b27ddebe 100755 --- a/modules/Bio/EnsEMBL/Analysis/PairAlign.pm +++ b/modules/Bio/EnsEMBL/Analysis/PairAlign.pm @@ -67,8 +67,6 @@ use vars qw(@ISA); use strict; -@ISA = qw(Bio::EnsEMBL::Root); - sub new { my($class,@args) = @_; my $self = {}; diff --git a/modules/Bio/EnsEMBL/ArchiveStableId.pm b/modules/Bio/EnsEMBL/ArchiveStableId.pm index 566518381102c0549f01e576d6b48c15c1923298..6601a512fb3beb6ebea5862a837b3ed15e79716b 100644 --- a/modules/Bio/EnsEMBL/ArchiveStableId.pm +++ b/modules/Bio/EnsEMBL/ArchiveStableId.pm @@ -63,9 +63,6 @@ use strict; use warnings; no warnings qw(uninitialized); -use Bio::EnsEMBL::Root; -our @ISA = qw(Bio::EnsEMBL::Root); - use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Scalar::Util qw(weaken isweak); diff --git a/modules/Bio/EnsEMBL/AssemblyMapper.pm b/modules/Bio/EnsEMBL/AssemblyMapper.pm index 10c90513f58b5e54f299bdfb4c30dd471fbf148e..6c97d0d318660f58728243504b4565ca62f8eacd 100644 --- a/modules/Bio/EnsEMBL/AssemblyMapper.pm +++ b/modules/Bio/EnsEMBL/AssemblyMapper.pm @@ -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; diff --git a/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm b/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm index 43d0cc3271e21d38208ca7e40b685abd8a4dc5a2..e6422226d856b7eb941f2789b27ec29a3271141b 100644 --- a/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm +++ b/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm @@ -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; diff --git a/modules/Bio/EnsEMBL/DBEntry.pm b/modules/Bio/EnsEMBL/DBEntry.pm index 939ad7eac44a08e5e99b8fef75da08a6aefe24dd..50f2dec99311fe7a1f9f7124ed07f69883e31430 100644 --- a/modules/Bio/EnsEMBL/DBEntry.pm +++ b/modules/Bio/EnsEMBL/DBEntry.pm @@ -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; diff --git a/modules/Bio/EnsEMBL/DBSQL/AltAlleleGroupAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AltAlleleGroupAdaptor.pm index 556c805374f51be79f318e88ac1373775a61e6b6..04b8ac545698d352796dd2b77ce24a100260c0f0 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AltAlleleGroupAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AltAlleleGroupAdaptor.pm @@ -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 diff --git a/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm index c9cebdeeac4bc50cc0515cb6b7a7ac6370127c00..7b92e224de6d1e34136b245332ebde8c88bd134a 100755 --- a/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm @@ -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 diff --git a/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm index 39b0d248429408a0eefa57eafd6d8479f5e273b7..f63af928a076bc0a1dd6a6aef8b9a4b8a8c744f0 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm @@ -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; diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm index ea86076702edd860aea3d611b7ba049ab98e1afe..471949c5d70db3d7da4f29ac03528cf83974c3f4 100755 --- a/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm @@ -92,8 +92,6 @@ case the convention is to go list_XXXX, such as (note: this method is poorly named) -=head1 METHODS - =cut package Bio::EnsEMBL::DBSQL::BaseAdaptor; @@ -101,7 +99,7 @@ require Exporter; use vars qw(@ISA @EXPORT); use strict; -use Bio::EnsEMBL::Utils::Exception qw(throw); +use Bio::EnsEMBL::Utils::Exception qw(throw deprecate); use Bio::EnsEMBL::Utils::Scalar qw(assert_ref assert_integer wrap_array); use DBI qw(:sql_types); use Data::Dumper; @@ -1096,7 +1094,7 @@ sub _build_id_cache { sub dump_data { my $self = shift; my $data = shift; - + deprecate('This method is deprecated and will be removed in e91. Please use the get_all_attributes() and add_attributes() methods of DnaDnaAlignFeature instead. In the more general case, many feature types allow attributes to be stored as well'); my $dumper = Data::Dumper->new([$data]); $dumper->Indent(0); $dumper->Terse(1); @@ -1109,7 +1107,7 @@ sub dump_data { sub get_dumped_data { my $self = shift; my $data = shift; - + deprecate('This method is deprecated and will be removed in e91. Please use the get_all_attributes() and add_attributes() methods of DnaDnaAlignFeature instead. In the more general case, many feature types allow attributes to be stored as well'); $data =~ s/\n|\r|\f|(\\\\)//g; return eval ($data); ## no critic } diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm index 9fade068415e99960bcb1014f6c27b46e1651a1c..e5816bb3823ec58cc8305d9963d0f0bea9a6d4ab 100644 --- a/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm @@ -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 diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm index 33330c7828fb982f93d4bdd972ecfd30733ceb7a..1e48340c167199823a7602696d02b60ad11dbae9 100755 --- a/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm @@ -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) = @_; diff --git a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm index d5bcf42f1bd1346d3b693bee0fa9ce7f9cfe6489..5475d8d0cae7fced9dace0ba9718f4aa203af38b 100755 --- a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm @@ -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); -} -sub password{ - my ($self, @args) = @_; - - 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("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("DBAdaptor->port is deprecated and will be removed in e87. Please use DBConnection->port instead."); - $self->dbc->port(@args); -} - -sub db_handle{ - my ($self, @args) = @_; - - - deprecate("DBAdaptor->db_handle is deprecated and will be removed in e87. Please use DBConnection->db_handle instead."); - $self->dbc->db_handle(@args); -} - 1; diff --git a/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm b/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm index 99caa4c7475bd80c33bd65578c3e7f52f6064f65..63156658eca4c57cea22996aabe7658a9604113f 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm @@ -71,7 +71,6 @@ package Bio::EnsEMBL::DBSQL::DBConnection; use vars qw(@ISA); use strict; -use Bio::EnsEMBL::Root; use DBI; use Bio::EnsEMBL::DBSQL::StatementHandle; @@ -81,8 +80,6 @@ use Bio::EnsEMBL::Utils::Argument qw/rearrange/; use Bio::EnsEMBL::Utils::Scalar qw/assert_ref wrap_array/; use Bio::EnsEMBL::Utils::SqlHelper; -@ISA = qw(Bio::EnsEMBL::Root); # for backwards compatibility - =head2 new Arg [DBNAME] : (optional) string @@ -1075,40 +1072,6 @@ sub to_hash { return $hash; } -#### -#deprecated functions -#### - -=head2 group - - group is no longer available in DBConnection and should be accessed if needed - from an adaptor. - -=cut - -sub group { - my ($self, $arg ) = @_; - ( defined $arg ) && - ( $self->{_group} = $arg ); - deprecate("DBConnection->group is deprecated and will be removed in e87. Please use adaptor->group instead."); - return $self->{_group}; -} - -=head2 species - - species is no longer available in DBConnection and should be accessed if needed - from an adaptor. - -=cut - -sub species { - my ($self, $arg ) = @_; - ( defined $arg ) && - ( $self->{_species} = $arg ); - deprecate("DBConnection->species is deprecated and will be removed in e87. Please use adaptor->species instead."); - return $self->{_species}; -} - =head2 _driver_object =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm index b934ab6f8b112cb4033499bd2c2fc506d718750e..d69e9767ab12072d55dadcf919b31bf322f0e63f 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm @@ -2376,44 +2376,5 @@ sub get_db_name_from_external_db_id{ } -=head2 geneids_by_extids - - Description: DEPRECATED use list_gene_ids_by_extids instead - -=cut - -sub geneids_by_extids{ - my ($self,$name) = @_; - 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 ); -} - - -=head2 translationids_by_extids - - DEPRECATED use list_translation_ids_by_extids instead - -=cut - -sub translationids_by_extids{ - my ($self,$name) = @_; - 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 ); -} - - -=head2 transcriptids_by_extids - - DEPRECATED use transcriptids_by_extids instead - -=cut - -sub transcriptids_by_extids{ - my ($self,$name) = @_; - 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 ); -} - - 1; diff --git a/modules/Bio/EnsEMBL/DBSQL/DataFileAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DataFileAdaptor.pm index b9ec20cccd92aa16b47b9037872c1f67c8e91d0a..252cbac8139a16cc930cf2ceaa46805f57a6911a 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DataFileAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DataFileAdaptor.pm @@ -109,24 +109,6 @@ sub get_base_path { throw "No base path discovered. Either provide a path, set a global using global_base_path() or specify 'data_file.base_path' in meta"; } -=head2 DataFile_to_extension - - Deprecated - Arg[1] : Bio::EnsEMBL::DataFile - Example : my $ext = $dfa->DataFile_to_extension($bam_df); - Description : Returns an expected extension for the given DataFile type - Returntype : Scalar of the expected file extension - Exceptions : Raised if the given file type is not understood - -=cut - -sub DataFile_to_extension { - my ($self, $df) = @_; - 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]; -} - =head2 DataFile_to_extensions Arg[1] : Bio::EnsEMBL::DataFile diff --git a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm index d220acd8ca6556ca6118d2988bb54d721831d359..9c2ea825a01c743d2427578b7c797b9346ca4faf 100644 --- a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm @@ -773,118 +773,6 @@ sub _objs_from_sth { return \@exons; } ## end sub _objs_from_sth -=head1 DEPRECATED METHODS - -=cut - - -=head2 get_stable_entry_info - - Description: DEPRECATED. This method is no longer necessary. Exons are - always fetched with their stable identifiers (if they exist) and - no lazy loading is necessary. - -=cut - -sub get_stable_entry_info { - my ($self,$exon) = @_; - - 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"); - } - if(!$exon->dbID){ - #$self->throw("can't fetch stable info with no dbID"); - return; - } - - my $created_date = $self->db->dbc->from_date_to_seconds("created_date"); - my $modified_date = $self->db->dbc->from_date_to_seconds("modified_date"); - my $sth = $self->prepare("SELECT stable_id, " . $created_date . ", - " . $modified_date . ", version - FROM exon - WHERE exon_id = "); - - $sth->bind_param(1, $exon->dbID, SQL_INTEGER); - $sth->execute(); - - # my @array = $sth->fetchrow_array(); - if( my $aref = $sth->fetchrow_arrayref() ) { - $exon->{'_stable_id'} = $aref->[0]; - $exon->{'_created'} = $aref->[1]; - $exon->{'_modified'} = $aref->[2]; - $exon->{'_version'} = $aref->[3]; - } - - return 1; -} - - -=head2 fetch_all_by_gene_id - - Description: DEPRECATED. This method should not be needed - Exons can - be fetched by Transcript. - -=cut - -sub fetch_all_by_gene_id { - my ( $self, $gene_id ) = @_; - my %exons; - my $hashRef; - my ( $currentId, $currentTranscript ); - - 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"); - } - - $self->{rchash} = {}; - - my $straight_join = $self->_can_straight_join ? 'STRAIGHT_JOIN' : ''; - my $query = qq { - SELECT - ${straight_join} - e.exon_id - , e.contig_id - , e.contig_start - , e.contig_end - , e.contig_strand - , e.phase - , e.end_phase - , e.sticky_rank - FROM transcript t - , exon_transcript et - , exon e - WHERE t.gene_id = ? - AND et.transcript_id = t.transcript_id - AND e.exon_id = et.exon_id - ORDER BY t.transcript_id,e.exon_id - , e.sticky_rank DESC - }; - - my $sth = $self->prepare( $query ); - $sth->bind_param(1,$gene_id,SQL_INTEGER); - $sth->execute(); - - while( $hashRef = $sth->fetchrow_hashref() ) { - if( ! exists $exons{ $hashRef->{exon_id} } ) { - - my $exon = $self->_exon_from_sth( $sth, $hashRef ); - - $exons{$exon->dbID} = $exon; - } - } - delete $self->{rchash}; - - my @out = (); - - push @out, values %exons; - - return \@out; -} - 1; diff --git a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm index 8bee80799dbeb191aa38e5de0a4001bab1cee110..09dc6445d6cb551ee26a99d538f444f7005e4746 100644 --- a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm @@ -2063,188 +2063,5 @@ sub fetch_all_by_transcript_supporting_evidence { return \@genes; } ## end sub fetch_all_by_transcript_supporting_evidence -########################## -# # -# DEPRECATED METHODS # -# # -########################## - -=head2 fetch_nearest_Gene_by_Feature - - Description: DEPRECATED - use fetch_nearest_Genes_by_Feature - -=cut - -sub fetch_nearest_Gene_by_Feature{ - my ($self, $feat, $stranded, $stream) = @_; - #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( "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); -} - - -=head2 fetch_by_maximum_DBLink - - DEPRECATED - use fetch_all_by_external_name instead - -=cut - -sub fetch_by_maximum_DBLink { - my ($self, $external_id) = @_; - - 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); - - my $biggest; - my $max = 0; - my $size = scalar(@$genes); - if ($size > 0) { - foreach my $gene (@$genes) { - my $size = scalar(@{$gene->get_all_Exons}); - if ($size > $max) { - $biggest = $gene; - $max = $size; - } - } - return $biggest; - } - return; -} - -=head2 get_display_xref - - DEPRECATED use $gene->display_xref - -=cut - -sub get_display_xref { - my ($self, $gene) = @_; - - 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"); - } - - my $sth = $self->prepare( - qq( - SELECT e.db_name, - x.display_label, - x.xref_id - FROM gene g, - xref x, - external_db e - WHERE g.gene_id = ? - AND g.display_xref_id = x.xref_id - AND x.external_db_id = e.external_db_id - )); - - $sth->bind_param(1, $gene->dbID, SQL_INTEGER); - $sth->execute(); - - my ($db_name, $display_label, $xref_id) = $sth->fetchrow_array(); - if (!defined $xref_id) { - return undef; - } - - my $db_entry = Bio::EnsEMBL::DBEntry->new(-dbid => $xref_id, - -adaptor => $self->db->get_DBEntryAdaptor(), - -dbname => $db_name, - -display_id => $display_label); - - return $db_entry; -} ## end sub get_display_xref - -=head2 get_description - - DEPRECATED, use gene->get_description - -=cut - -sub get_description { - my ($self, $dbID) = @_; - - 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"); - } - - my $sth = $self->prepare( - "SELECT description - FROM gene_description - WHERE gene_id = ?"); - - $sth->bind_param(1, $dbID, SQL_INTEGER); - $sth->execute(); - - my @array = $sth->fetchrow_array(); - return $array[0]; -} - -=head2 fetch_by_Peptide_id - - DEPRECATED, use fetch_by_translation_stable_id() - -=cut - -sub fetch_by_Peptide_id { - my ($self, $translation_stable_id) = @_; - - 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); -} - -=head2 get_stable_entry_info - - DEPRECATED use $gene->stable_id instead - -=cut - -sub get_stable_entry_info { - my ($self, $gene) = @_; - - 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"); - } - - my $created_date = $self->db->dbc->from_date_to_seconds("created_date"); - my $modified_date = $self->db->dbc->from_date_to_seconds("modified_date"); - - my $sth = $self->prepare("SELECT stable_id, " . $created_date . "," . $modified_date . ", version FROM gene WHERE gene_id = ?"); - - $sth->bind_param(1, $gene->dbID, SQL_INTEGER); - $sth->execute(); - - my @array = $sth->fetchrow_array(); - $gene->{'stable_id'} = $array[0]; - $gene->{'created'} = $array[1]; - $gene->{'modified'} = $array[2]; - $gene->{'version'} = $array[3]; - - return 1; -} ## end sub get_stable_entry_info - -=head2 fetch_all_by_DBEntry - - DEPRECATED - Use fetch_all_by_external_name instead - -=cut - -sub fetch_all_by_DBEntry { - my $self = shift; - - 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(@_); -} - 1; diff --git a/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm index f7e8727ec3d739c4ec90a17b2f2c4b3b8da68c27..16deefa142485d41d71c0bc9c497ae062b922513 100644 --- a/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm @@ -254,34 +254,6 @@ sub fetch_all_by_chr_band { } -=head2 fetch_by_chr_band - - Arg [1] : string $chr_name - Name of the chromosome from which to retrieve the band - Arg [2] : string $band - The name of the band to retrieve from the specified chromosome - Example : @bands = @{$kary_adaptor->fetch_all_by_chr_band('4', 'q23')}; - Description: Fetches the karyotype band object from the database - for the given chromosome and band name. If no such band - exists, undef is returned instead. This function uses fuzzy - matching of the band name. For example the bands 'q23.1' and - 'q23.4' could be matched by fetch_all_by_chr_band('20', 'q23'); - Returntype : Bio::EnsEMBL::KaryotypeBand in chromosomal coordinates. - Exceptions : throws if chr or band is missing in arguments - Caller : general - Status : Stable - -=cut - -sub fetch_by_chr_band { - my $self = shift; - 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; -} - - =head2 list_dbIDs Arg [1] : none diff --git a/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm b/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm index 4dfe7bec19372cff230bd9e0c4dd391c85ad006d..a74eaa0959e9fe00002335d3ac5068287fd28bb3 100644 --- a/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm +++ b/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm @@ -144,47 +144,6 @@ sub get_division { return $self->single_value_by_key('species.division'); } -=head2 get_Species - - Arg [1] : none - Example : $species = $meta_container->get_Species(); - Description: Obtains the species from this databases meta table. Call is - deprecated; please use other subroutines in this package - Returntype : Bio::Species - Exceptions : none - Caller : ? - Status : Deprecated - -=cut - -sub get_Species { - my ($self) = @_; - - 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 = - $self->list_value_by_key('species.classification'); - if ( !@$classification ) { - return undef; - } - - #Re-create the old classification data structure by adding the scientific - #name back onto the classification but with species before genus e.g. - # sapiens -> Homo -> Hominade - my $scientific_name = $self->get_scientific_name(); - my ($genus, @sp) = split(/ /, $scientific_name); - unshift(@{$classification}, join(q{ }, @sp), $genus); - - my $species = Bio::Species->new(); - $species->common_name($common_name); - - $species->classification($classification, 1); #always force it - - return $species; -} - - =head2 get_taxonomy_id Arg [1] : none @@ -202,30 +161,6 @@ sub get_taxonomy_id { return $self->single_value_by_key('species.taxonomy_id', 1); } - - -=head2 get_default_assembly - - Description: DEPRECATED. Use the version of the coordinate system you are - interested in instead. - - Example: #use this instead - my ($highest_cs) = @{$db->get_CoordSystemAdaptor->fetch_all()}; - my $assembly = $highest_cs->version(); - -=cut - -sub get_default_assembly { - my $self = shift; - - 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()}; - - return $cs->version(); -} - - =head2 get_genebuild Arg [1] : none diff --git a/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm index f1059ac9b30c27d809149cf36fe74c16272a3279..81686ab1e61a4b8e357daf9cfe5133f89dec717b 100755 --- a/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm @@ -143,13 +143,20 @@ sub fetch_all_by_logic_name { sub fetch_by_dbID { my ($self, $protfeat_id) = @_; - my $sth = $self->prepare("SELECT p.seq_start, p.seq_end, p.analysis_id, " . " p.score, p.perc_ident, p.evalue, " . " p.hit_start, p.hit_end, p.hit_name, " . " x.description, x.display_label, i.interpro_ac " . "FROM protein_feature p " . "LEFT JOIN interpro AS i ON p.hit_name = i.id " . "LEFT JOIN xref AS x ON x.dbprimary_acc = i.interpro_ac " . "WHERE p.protein_feature_id = ?"); + my $sth = $self->prepare("SELECT p.translation_id, p.seq_start, p.seq_end, p.analysis_id, " + . "p.score, p.perc_ident, p.evalue, " + . "p.hit_start, p.hit_end, p.hit_name, p.hit_description, " + . "x.description, x.display_label, i.interpro_ac " + . "FROM protein_feature p " + . "LEFT JOIN interpro AS i ON p.hit_name = i.id " + . "LEFT JOIN xref AS x ON x.dbprimary_acc = i.interpro_ac " + . "WHERE p.protein_feature_id = ?"); $sth->bind_param(1, $protfeat_id, SQL_INTEGER); my $res = $sth->execute(); - my ($start, $end, $analysis_id, $score, $perc_ident, $pvalue, $hstart, - $hend, $hseqname, $idesc, $ilabel, $interpro_ac) = $sth->fetchrow_array(); + my ($translation_id, $start, $end, $analysis_id, $score, $perc_ident, $pvalue, $hstart, + $hend, $hseqname, $hdesc, $idesc, $ilabel, $interpro_ac) = $sth->fetchrow_array(); if($sth->rows == 0) { $sth->finish(); @@ -168,13 +175,15 @@ sub fetch_by_dbID { -HSTART => $hstart, -HEND => $hend, -HSEQNAME => $hseqname, + -HDESCRIPTION => $hdesc, -ANALYSIS => $analysis, -SCORE => $score, -P_VALUE => $pvalue, -PERCENT_ID => $perc_ident, -IDESC => $idesc, - -ILABEL => $ilabel, - -INTERPRO_AC => $interpro_ac); + -ILABEL => $ilabel, + -INTERPRO_AC => $interpro_ac, + -TRANSLATION_ID => $translation_id); } ## end sub fetch_by_dbID =head2 store @@ -260,31 +269,6 @@ sub store { return $dbID; } ## end sub store -sub fetch_by_translation_id { - deprecate("fetch_by_translation_id is deprecated. Please use fetch_all_by_translation_id instead."); - fetch_all_by_translation_id(@_); -} - -sub fetch_all_by_feature_and_dbID { - my $self = shift; - my $feature = shift; - my $translation_id = shift; - deprecate("fetch_all_by_feature_and_dbID is deprecated. Please use fetch_all_by_translation_id instead."); - - print STDERR "translation_id = $translation_id feature = $feature\n"; - - my $features = $self->fetch_all_by_translation_id($translation_id); - - my @out; - foreach my $f (@$features) { - my $logic_name = lc($f->analysis->logic_name()); - print STDERR "LOGIC_NAME = $logic_name | FEATURE = $feature\n"; - push(@out, $f) if ($logic_name eq lc($feature)); - } - - return \@out; -} - sub save { my ($self, $features) = @_; diff --git a/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm index a6eb8380fc3573eb02964c3b39c74e0002e062be..5275b132276d0e3fdb5e71803f974837f739cebd 100644 --- a/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm @@ -180,12 +180,6 @@ sub fetch_all_by_class_seq { } -sub fetch_by_class_seq { - deprecate('fetch_by_class_seq is deprecated. Please use fetch_all_by_class_seq instead'); - fetch_all_by_class_seq(@_); -} - - =head2 _generic_fetch Arg [1] : string $where_clause diff --git a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm index 15b7d9b7da4ff03d41694382879ae758c7ff563d..e34ec91c549fce06de7b6af79c5abf643baa6f7d 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm @@ -501,42 +501,6 @@ sub remove { return; } - -=head2 fetch_by_assembly_location - - Description: DEPRECATED use fetch_by_Slice_start_end_strand() instead. - -=cut - -sub fetch_by_assembly_location { - my ( $self, $chrStart, $chrEnd, - $strand, $chrName, $assemblyType ) = @_; - - deprecate('fetch_by_assembly_location is deprecated and will be removed in e87. Please use fetch_by_Slice_start_end_strand() instead'); - - my $csa = $self->db->get_CoordSystem(); - my $top_cs = @{$csa->fetch_all}; - - my $slice_adaptor = $self->db->get_SliceAdaptor(); - my $slice = $slice_adaptor->fetch_by_region($top_cs->name(), $chrName, - $chrStart, $chrEnd, - $strand, $top_cs->version); - - return $self->fetch_by_Slice_start_end_strand($slice,1, $slice->length,1); -} - - -=head2 fetch_by_RawContig_start_end_strand - - Description: DEPRECATED use fetch_by_Slice_start_end_strand instead - -=cut - -sub fetch_by_RawContig_start_end_strand { - deprecate('fetch_by_RawContig_start_end_strand is deprecated and will be removed in e87. Please use fetch_by_Slice_start_end_strand instead.'); - fetch_by_Slice_start_end_strand(@_); -} - =head2 _populate_seq_region_edits Description: Query the database for any _rna_edit attributes attached to a seq region diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm index a8cecfecc90265979899428b39ac9bf4ad4b9253..5529b1237d9954c5716f09ed3aed6e3752b2e2f1 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm @@ -941,8 +941,8 @@ sub get_seq_region_id { The version of the coordinate system to retrieve slices of Arg [3] : bool $include_non_reference (optional) If this argument is not provided then only reference slices - will be returned. If set, both reference and non refeference - slices will be rerurned. + will be returned. If set, both reference and non reference + slices will be returned. Arg [4] : int $include_duplicates (optional) If set duplicate regions will be returned. @@ -2705,221 +2705,4 @@ sub _build_circular_slice_cache { } ## end _build_circular_slice_cache -##################################### -# sub DEPRECATED METHODs -##################################### - -=head2 fetch_by_mapfrag - - Function: DEPRECATED use fetch_by_misc_feature_attribute('synonym',$mapfrag) - -=cut - -sub fetch_by_mapfrag{ - my ($self,$mymapfrag,$flag,$size) = @_; - deprecate('fetch_by_mapfrag is deprecated and will be removed in e87. Please use fetch_by_misc_feature_attribute instead'); - $flag ||= 'fixed-width'; # alt.. 'context' - $size ||= $flag eq 'fixed-width' ? 100000 : 0; - return $self->fetch_by_misc_feature_attribute('synonym',$mymapfrag,$size); -} - - - -=head2 fetch_by_chr_start_end - - Description: DEPRECATED use fetch_by_region instead - -=cut - -sub fetch_by_chr_start_end { - my ($self,$chr,$start,$end) = @_; - deprecate('fetch_by_chr_start_end is deprecated and will be removed in e87. Please use fetch_by_region() instead'); - - #assume that by chromosome the user actually meant top-level coord - #system since this is the old behaviour of this deprecated method - my $csa = $self->db->get_CoordSystemAdaptor(); - my ($cs) = @{$csa->fetch_all()}; # get the highest coord system - - return $self->fetch_by_region($cs->name,$chr,$start,$end,1,$cs->version); -} - - - -=head2 fetch_by_contig_name - - Description: Deprecated. Use fetch_by_region(), Slice::project(), - Slice::expand() instead - -=cut - -sub fetch_by_contig_name { - my ($self, $name, $size) = @_; - - deprecate('fetch_by_contig_name is deprecated and will be removed in e87. Please use fetch_by_region(), Slice::project() and Slice::expand().'); - - #previously wanted chromosomal slice on a given contig. Assume this means - #a top-level slice on a given seq_region in the seq_level coord system - my $csa = $self->db()->get_CoordSystemAdaptor(); - my $seq_level = $csa->fetch_sequence_level(); - - my $seq_lvl_slice = $self->fetch_by_region($seq_level->name(), $name); - - if(!$seq_lvl_slice) { - return undef; - } - - my @projection = @{$seq_lvl_slice->project('toplevel')}; - - if(@projection != 1) { - warning("$name is mapped to multiple toplevel locations."); - } - - return $projection[0]->[2]->expand($size, $size); -} - - -=head2 fetch_by_clone_accession - - Description: DEPRECATED. Use fetch_by_region, Slice::project, Slice::expand - instead. - -=cut - -sub fetch_by_clone_accession{ - my ($self,$name,$size) = @_; - - deprecate('fetch_by_clone_accession is deprecated and will be removed in e87. Please use fetch_by_region(), Slice::project() and Slice::expand().'); - - my $csa = $self->db()->get_CoordSystemAdaptor(); - my $clone_cs = $csa->fetch_by_name('clone'); - - if(!$clone_cs) { - warning('Clone coordinate system does not exist for this species'); - return undef; - } - - #this unfortunately needs a version on the end to work - if(! ($name =~ /\./)) { - my $sth = - $self->prepare( "SELECT sr.name " - . "FROM seq_region sr, coord_system cs " - . "WHERE cs.name = 'clone' " - . "AND cs.coord_system_id = sr.coord_system_id " - . "AND sr.name LIKE '$name.%'" - . "AND cs.species_id = ?" ); - - $sth->bind_param( 1, $self->species_id(), SQL_INTEGER ); - $sth->execute(); - - ($name) = $sth->fetchrow_array(); - - if(!$sth->rows()) { - $sth->finish(); - throw("Clone $name not found in database"); - } - - $sth->finish(); - } - - my $clone = $self->fetch_by_region($clone_cs->name(), $name); - return undef if(!$clone); - - my @projection = @{$clone->project('toplevel')}; - - if(@projection != 1) { - warning("$name is mapped to multiple locations."); - } - - return $projection[0]->[2]->expand($size, $size); -} - - -=head2 fetch_by_supercontig_name - - Description: DEPRECATED. Use fetch_by_region(), Slice::project() and - Slice::expand() instead - -=cut - -sub fetch_by_supercontig_name { - my ($self,$name, $size) = @_; - - deprecate('fetch_by_supercontig_name is deprecated and will be removed in e87. Please use fetch_by_region(), Slice::project() and Slice::expand().'); - - my $csa = $self->db()->get_CoordSystemAdaptor(); - my $sc_level = $csa->fetch_by_name('supercontig'); - - if(!$sc_level) { - warning('No supercontig coordinate system exists for this species.'); - return undef; - } - - my $sc_slice = $self->fetch_by_region($sc_level->name(),$name); - - return undef if(!$sc_slice); - - my @projection = @{$sc_slice->project('toplevel')}; - - if(@projection > 1) { - warning("$name is mapped to multiple locations in toplevel"); - } - - return $projection[0]->[2]->expand($size, $size); -} - - - - -=head2 list_overlapping_supercontigs - - Description: DEPRECATED use Slice::project instead - -=cut - -sub list_overlapping_supercontigs { - my ($self,$slice) = @_; - - deprecate('list_overlapping_supercontigs is deprecated and will be removed in e87. Please use Slice::project() instead.'); - - my $csa = $self->db()->get_CoordSystemAdaptor(); - my $sc_level = $csa->fetch_by_name('supercontig'); - - if(!$sc_level) { - warning('No supercontig coordinate system exists for this species.'); - return undef; - } - - my @out; - foreach my $seg (@{$slice->project($sc_level->name(), $sc_level->version)}){ - push @out, $seg->[2]->seq_region_name(); - } - - return \@out; -} - - - -=head2 fetch_by_chr_name - - Description: DEPRECATED. Use fetch by region instead - -=cut - -sub fetch_by_chr_name{ - my ($self,$chr_name) = @_; - deprecate('fetch_by_chr_name is deprecated and will be removed in e87. Please use fetch_by_region() instead.'); - - my $csa = $self->db->get_CoordSystemAdaptor(); - - my $top_cs = @{$csa->fetch_all()}; - - return $self->fetch_by_region($top_cs->name(),$chr_name, - undef,undef,undef,$top_cs->version); -} - - - - - - 1; diff --git a/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm index da322dfd65d72b64a3cf18face842545867268fd..e18727d1617fc5ee1389fb30f4253c3f554d9f94 100644 --- a/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm @@ -2152,107 +2152,4 @@ sub fetch_all_by_transcript_supporting_evidence { } -########################## -# # -# DEPRECATED METHODS # -# # -########################## - - -=head2 get_display_xref - - Description: DEPRECATED. Use $transcript->display_xref() instead. - -=cut - -sub get_display_xref { - my ($self, $transcript) = @_; - - deprecate("get_display_xref is deprecated and will be removed in e87. display_xref should be retrieved from Transcript object directly."); - - if ( !defined $transcript ) { - throw("Must call with a Transcript object"); - } - - my $sth = $self->prepare(qq( - SELECT e.db_name, - x.display_label, - e.db_external_name, - x.xref_id - FROM transcript t, - xref x, - external_db e - WHERE t.transcript_id = ? - AND t.display_xref_id = x.xref_id - AND x.external_db_id = e.external_db_id - )); - - $sth->bind_param(1, $transcript->dbID, SQL_INTEGER); - $sth->execute(); - - my ($db_name, $display_label, $xref_id, $display_db_name ) = - $sth->fetchrow_array(); - - if ( !defined $xref_id ) { - return undef; - } - - my $db_entry = Bio::EnsEMBL::DBEntry->new( - -dbid => $xref_id, - -adaptor => $self->db->get_DBEntryAdaptor(), - -dbname => $db_name, - -display_id => $display_label - -db_display_name => $display_db_name - ); - - return $db_entry; -} - - -=head2 get_stable_entry_info - - Description: DEPRECATED. Use $transcript->stable_id() instead. - -=cut - -sub get_stable_entry_info { - my ($self, $transcript) = @_; - - deprecate("get_stable_entry_info is deprecated and will be removed in e87. Stable ids should be loaded directly instead"); - - unless ( defined $transcript && ref $transcript && - $transcript->isa('Bio::EnsEMBL::Transcript') ) { - throw("Needs a Transcript object, not a $transcript"); - } - - my $sth = $self->prepare(qq( - SELECT stable_id, version - FROM transcript - WHERE transcript_id = ? - )); - - $sth->bind_param(1, $transcript->dbID, SQL_INTEGER); - $sth->execute(); - - my @array = $sth->fetchrow_array(); - $transcript->{'_stable_id'} = $array[0]; - $transcript->{'_version'} = $array[1]; - - return 1; -} - - -=head2 fetch_all_by_DBEntry - - Description: DEPRECATED. Use fetch_all_by_external_name() instead. - -=cut - -sub fetch_all_by_DBEntry { - my $self = shift; - 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(@_); -} - - 1; diff --git a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm index 2c89bc8cef9dddec3ea11495ae14b22a78ef0ba1..3870054cf85a3ddd6d76fa7047cd08edbf61e44b 100644 --- a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm @@ -937,49 +937,6 @@ sub fetch_all_by_Transcript_list { } - -=head2 fetch_all_by_DBEntry - - Description: DEPRECATED, this has been renames fetch_all_by_external_name - -=cut - -sub fetch_all_by_DBEntry { - my $self = shift; - deprecate("fetch_all_by_DBEntry is deprecated and will be removed in e87. Use fetch_all_by_external_name instead."); - return $self->fetch_all_by_external_name(@_); -} - -=head2 get_stable_entry_info - - Description: DEPRECATED - This method should no longer be needed. Stable - id info is fetched when the transcript is. - -=cut - -sub get_stable_entry_info { - my ($self,$translation) = @_; - - deprecate( "get_stable_entry_info is deprecated and will be removed in e87. Use $translation->stable_id instead." ); - - unless(defined $translation && ref $translation && - $translation->isa('Bio::EnsEMBL::Translation') ) { - throw("Needs a Translation object, not a [$translation]"); - } - - my $sth = $self->prepare("SELECT stable_id, version - FROM translation - WHERE translation_id = ?"); - $sth->bind_param(1,$translation->dbID,SQL_INTEGER); - $sth->execute(); - - my @array = $sth->fetchrow_array(); - $translation->{'_stable_id'} = $array[0]; - $translation->{'_version'} = $array[1]; - - return 1; -} - =head2 fetch_all Example : $translations = $translation_adaptor->fetch_all(); diff --git a/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm b/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm index 8dd301aea7368b548735561264db64ba7add4db2..be0bdc39f14f23478c2f3d70c6a95c492bdfbd89 100644 --- a/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm +++ b/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm @@ -48,9 +48,7 @@ use strict; # Object preamble - inheriets from Bio::Root::Object -use Bio::EnsEMBL::Root; - -@ISA = qw(Bio::EnsEMBL::Root Exporter); +@ISA = qw(Exporter); #@EXPORT_OK = qw(); # new() is inherited from Bio::Root::Object diff --git a/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm b/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm index 447779a066f58b17422f2266d725bc259665a5ee..6acb0d675c93c52a491af3acb3cda3b6c34aad50 100644 --- a/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm +++ b/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm @@ -49,9 +49,7 @@ use Bio::EnsEMBL::DensityPlot::BinValue; # Object preamble - inheriets from Bio::Root::Object -use Bio::EnsEMBL::Root; - -@ISA = qw(Bio::EnsEMBL::Root Exporter); +@ISA = qw(Exporter); #@EXPORT_OK = qw(); # new() is inherited from Bio::Root::Object diff --git a/modules/Bio/EnsEMBL/Exon.pm b/modules/Bio/EnsEMBL/Exon.pm index f4ccf71831f5c01cce275b426acf37a992a7a8b0..acc8c43b423d8be07d052c8f031ddf815ed41622 100755 --- a/modules/Bio/EnsEMBL/Exon.pm +++ b/modules/Bio/EnsEMBL/Exon.pm @@ -1650,72 +1650,5 @@ sub summary_as_hash { return $summary_ref; } -=head1 DEPRECATED METHODS - -=cut - - - -=head2 temporary_id - - Description: DEPRECATED. This should not be necessary. - -=cut - -sub temporary_id { - my $self = shift; - deprecate('temporary_id is deprecated and will be removed in e87.'); - $self->{'tempID'} = shift if(@_); - return $self->{'tempID'}; -} - - -=head2 created - - Description: DEPRECATED. Do not use. - -=cut - -sub created { - my ($self,$value) = @_; - deprecate( "created is deprecated and will be removed in e87." ); - if(defined $value ) { - $self->{'_created'} = $value; - } - return $self->{'_created'}; -} - -=head2 modified - - Description: DEPRECATED. Do not use. - -=cut - - -sub modified { - my ($self,$value) = @_; - deprecate( "Modified is deprecated and will be removed in e87." ); - if( defined $value ) { - $self->{'_modified'} = $value; - } - return $self->{'_modified'}; -} - - -=head2 type - - Description: DEPRECATED. Do not use. - -=cut - -sub type { - my ($self,$value) = @_; - deprecate("Type is deprecated and will be removed in e87."); - if (defined($value)) { - $self->{'type'} = $value; - } - return $self->{'type'}; -} - 1; diff --git a/modules/Bio/EnsEMBL/Feature.pm b/modules/Bio/EnsEMBL/Feature.pm index c897e9623b76d98778c0dd7db4f69a73058b9219..c7900a1e04a0dfbc3c6c6c8c9f2544e279032bab 100644 --- a/modules/Bio/EnsEMBL/Feature.pm +++ b/modules/Bio/EnsEMBL/Feature.pm @@ -1497,17 +1497,6 @@ sub species { } -=head2 contig - - Deprecated - Included for backwards compatibility only. - Use slice() instead -=cut -sub contig { - deprecate('contig is deprecated and will be removed in e87. Please use slice() instead'); - slice(@_); -} - - =head2 sub_SeqFeature @@ -1595,22 +1584,6 @@ sub _deprecated_transform { } -=head2 id - -Deprecated - only included for backwards compatibility. -Use display_id, hseqname, dbID or stable_id instead - -=cut - -sub id { - my $self = shift; - deprecate("id method is deprecated and will be removed in e87. Please use display_id instead"); - return $self->{'stable_id'} if($self->{'stable_id'}); - return $self->{'hseqname'} if($self->{'hseqname'}); - return $self->{'seqname'} if($self->{'seqname'}); - return $self->{'dbID'}; -} - my $feature_tables = { 'Bio::EnsEMBL::AssemblyExceptionFeature' => 'assembly_exception', diff --git a/modules/Bio/EnsEMBL/FeaturePair.pm b/modules/Bio/EnsEMBL/FeaturePair.pm index 01eb45582003b4dd19aad9700c3fb847d86d403d..49919314262b89d2f6f650ab6f0ab71e25038387 100755 --- a/modules/Bio/EnsEMBL/FeaturePair.pm +++ b/modules/Bio/EnsEMBL/FeaturePair.pm @@ -718,64 +718,6 @@ sub level_id { =head1 DEPRECATED METHODS -=cut - -=head2 feature1 - - Description: DEPRECATED use start(), end(), strand(), slice(), etc. - methods instead - -=cut - -sub feature1 { - my ($self, $arg) = @_; - - deprecate('feature1 is deprecated and will be removed in e87. Please use start(), end(), strand(), slice(), etc. methods instead.'); - - if ($arg) { - $self->start($arg->start()); - $self->end($arg->end()); - $self->strand($arg->strand()); - $self->score($arg->score()); - $self->percent_id($arg->percent_id()); - $self->analysis($arg->analysis); - if ($arg->contig) { - $self->slice($arg->contig); - } - } - - return $self; -} - -=head2 feature2 - - Description: DEPRECATED use hstart(), hend(), hstrand() etc. - methods instead - -=cut - -sub feature2 { - my ($self, $arg) = @_; - - deprecate('feature2 is deprecated and will be removed in e87. Please use hstart(),hend(),hstrand(),hseqname() methods instead.'); - - if (defined($arg)) { - $self->hstart($arg->start()); - $self->hend($arg->end()); - $self->hstrand($arg->strand()); - $self->hseqname($arg->seqname()); - return $arg; - } - - return - new Bio::EnsEMBL::Feature(-START => $self->hstart(), - -END => $self->hend(), - -STRAND => $self->hstrand(), - -SCORE => $self->score(), - -PERCENT_ID => $self->percent_id(), - -ANALYSIS => $self->analysis, - -SEQNAME => $self->hseqname()); -} =head2 invert @@ -829,106 +771,6 @@ sub invert { $self->{'slice'} = $slice; } ## end sub invert -=head2 set_featurepair_fields - - Description: DEPRECATED do not use - -=cut - -sub set_featurepair_fields { - my ($self, $start, $end, $strand, $score, $seqname, $hstart, $hend, $hstrand, $hseqname, $analysis, $e_value, $perc_id, $phase, $end_phase) = @_; - - deprecate("set_featurepair_fields is deprecated and will be removed in e87. Please use individual Getter/Setters or Constructor arguments instead."); - - throw('interface fault') if (@_ < 12 or @_ > 15); - - $self->start($start); - $self->end($end); - $self->strand($strand); - $self->score($score); - $self->seqname($seqname); - $self->hstart($hstart); - $self->hend($hend); - $self->hstrand($hstrand); - $self->hseqname($hseqname); - $self->analysis($analysis); - $self->p_value($e_value) if (defined $e_value); - $self->percent_id($perc_id) if (defined $perc_id); - $self->phase($phase) if (defined $phase); - $self->end_phase($end_phase) if (defined $end_phase); -} - -=head2 gffstring - - Description: DEPRECATED do not use - -=cut - -sub gffstring { - my ($self) = @_; - - deprecate('gffstring is deprecated and will be removed in e87.'); - - my $str .= (defined $self->slice) ? $self->slice->name() . "\t" : "\t"; - $str .= "\t"; #source tag - $str .= "\t"; #primary tag - $str .= (defined $self->start) ? $self->start . "\t" : "\t"; - $str .= (defined $self->end) ? $self->end . "\t" : "\t"; - $str .= (defined $self->score) ? $self->score . "\t" : "\t"; - $str .= (defined $self->strand) ? $self->strand . "\t" : ".\t"; - $str .= ".\t"; #phase - $str .= ".\t"; #end phase - - my $hstrand = "+"; - - if (($self->hstrand) && ($self->hstrand == -1)) { - $hstrand = "-"; - } - - #Append a few FeaturePair specific things - $str .= (defined $self->hseqname) ? $self->hseqname . "\t" : "\t"; - $str .= (defined $self->hstart) ? $self->hstart . "\t" : "\t"; - $str .= (defined $self->hend) ? $self->hend . "\t" : "\t"; - $str .= (defined $self->hstrand) ? $hstrand . "\t" : "\t"; - $str .= (defined $self->hphase) ? $self->hphase . "\t" : ".\t"; - - return $str; -} ## end sub gffstring - -=head2 hphase - - Description: DEPRECATED do not use - -=cut - -sub hphase { - my ($self, $value) = @_; - - deprecate('hphase is deprecated and will be removed in e87.'); - - if (defined($value)) { - $self->{_hphase} = $value; - } - - return $self->{_hphase}; -} - -=head2 hend_phase - - Description: DEPRECATED do not use - -=cut - -sub hend_phase { - my ($self, $value) = @_; - - deprecate('hend_phase is deprecated and will be removed in e87.'); - - if (defined($value)) { - $self->{_hend_phase} = $value; - } - return $self->{_hend_phase}; -} sub extra_data { my $self = shift; diff --git a/modules/Bio/EnsEMBL/Gene.pm b/modules/Bio/EnsEMBL/Gene.pm index d6a4b5a7e60cb6b94b5645f4268751f8614e4966..16840e0e35e166582af8d0d8ae98090feedb3fc8 100755 --- a/modules/Bio/EnsEMBL/Gene.pm +++ b/modules/Bio/EnsEMBL/Gene.pm @@ -1554,76 +1554,6 @@ sub havana_gene { # DEPRECATED METHODS FOLLOW ########################### -=head2 DEPRECATED add_DBLink - - Description: DEPRECATED This method has been deprecated in favour of the - add_DBEntry method. Objects are responible for holding only - xrefs directly associated with themselves now. - -=cut - - -sub add_DBLink{ - my ($self,$value) = @_; - - throw("add_DBLink is deprecated and will be removed in e87. Please use add_DBEntry instead."); - - # unless(defined $value && ref $value - # && $value->isa('Bio::Annotation::DBLink') ) { - # throw("This [$value] is not a DBLink"); - # } - - # if( !defined $self->{'_db_link'} ) { - # $self->{'_db_link'} = []; - # } - - # push(@{$self->{'_db_link'}},$value); -} - - -=head2 temporary_id - - Function: DEPRECATED: Use dbID or stable_id or something else instead - -=cut - -sub temporary_id { - my ($obj,$value) = @_; - deprecate('temporary_id is deprecated and will be removed in e87.'); - if( defined $value) { - $obj->{'temporary_id'} = $value; - } - return $obj->{'temporary_id'}; -} - - -=head2 chr_name - - Description: DEPRECATED. Use project, tranform, or transfer to obtain this - gene in another coord system. Use $gene->slice->seq_region_name - to get the name of the underlying coord system. Or - $gene->slice->name(). - -=cut - -sub chr_name { - my $self = shift; - - deprecate( "chr_name is deprecated and will be removed in e87. Please use project() to obtain other coordinate systems" ); - - my $gene_slice = $self->slice(); - if( $gene_slice->coord_system()->name eq "chromosome" ) { - return $gene_slice->seq_region_name(); - } - - my $coords = $self->project( "toplevel" ); - - if( @$coords ) { - return $coords->[0]->[2]->seq_region_name(); - } -} - - =head2 fetch_coded_for_regulatory_factors Arg [1] : none @@ -1649,29 +1579,5 @@ sub fetch_coded_for_regulatory_factors { } -=head2 type - - Description: DEPRECATED. Use biotype() instead. - -=cut - -sub type { - deprecate("type is deprecated and will be removed in e87. Please use biotype() instead"); - biotype(@_); -} - - -=head2 confidence - - Description: DEPRECATED. Use status() instead. - -=cut - -sub confidence { - deprecate("confidence is deprecated and will be removed in e87. Please use status() instead"); - status(@_); -} - - 1; diff --git a/modules/Bio/EnsEMBL/IdentityXref.pm b/modules/Bio/EnsEMBL/IdentityXref.pm index d609561d7dcd9298f881d731c78584059d619b53..dfe630b76e834c7b87dcd6830ac483ed6fc5d340 100644 --- a/modules/Bio/EnsEMBL/IdentityXref.pm +++ b/modules/Bio/EnsEMBL/IdentityXref.pm @@ -441,92 +441,4 @@ sub map_feature { } -########################### -# DEPRECATED METHODS FOLLOW -########################### - -=head2 query_identity - - Description: DEPRECATED. Use xref_identity() instead. - Status : At Risk - -=cut - -sub query_identity{ - deprecate("query_identity is deprecated and will be removed in e87. Please use xref_identity instead"); - xref_identity(@_); -} - - -=head2 target_identity - - Description: DEPRECATED. Use ensembl_identity() instead. - Status : At Risk - -=cut - -sub target_identity{ - deprecate("target_identity is deprecated and will be removed in e87. Please use ensembl_identity instead"); - ensembl_identity(@_); -} - - - -=head2 translation_start - - Description: DEPRECATED. Use ensembl_start() instead. - Status : At Risk - -=cut - -sub translation_start { - deprecate("translation_start is deprecated and will be removed in e87. Please use ensembl_start instead"); - ensembl_start(@_); - -} - - -=head2 translation_end - - Description: DEPRECATED. Use ensembl_end() instead. - Status : At Risk - -=cut - -sub translation_end { - deprecate("translation_end is deprecated and will be removed in e87. Please use ensembl_end instead"); - ensembl_end(@_); -} - - - -=head2 query_start - - Description: DEPRECATED. Use xref_start() instead. - Status : At Risk - -=cut - -sub query_start { - deprecate("query_start is deprecated and will be removed in e87. Please use xref_start instead"); - xref_start(@_); - -} - - - -=head2 query_end - - Description: DEPRECATED. Use xref_end() instead. - Status : At Risk - -=cut - -sub query_end { - deprecate("query_end is deprecated and will be removed in e87. Please use xref_end instead"); - xref_end(@_); - -} - - 1; diff --git a/modules/Bio/EnsEMBL/KaryotypeBand.pm b/modules/Bio/EnsEMBL/KaryotypeBand.pm index e3bfb6d953d701f9f138bb850e44c4f8ce594d59..9df1d642ee06822989ff92116a3ee9e4463baa49 100644 --- a/modules/Bio/EnsEMBL/KaryotypeBand.pm +++ b/modules/Bio/EnsEMBL/KaryotypeBand.pm @@ -222,23 +222,5 @@ sub display_id { } -=head2 chr_name - - Description: DEPRECATED - use $kary_band->slice()->seq_region_name() instead - -=cut - -sub chr_name { - my $self = shift; - - deprecate('chr_name is deprecated and will be removed in e87. Please use $kary_band->slice()->seq_region_name() instead.'); - if(!$self->slice) { - warning('KaryotypeBand does not have Slice - cannot get seq_region_name.'); - return ''; - } - - return $self->slice->seq_region_name(); -} - 1; diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm index be7e44522f1accd013217a6e403577b0ce0ca4a8..6f690a70ac80999fa4e57bda5f5455cc0b94ec3a 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm @@ -145,24 +145,6 @@ sub fetch_all_by_Slice_and_priority { -=head2 fetch_all_by_RawContig_and_priority - - Description: DEPRECATED use fetch_all_by_Slice_and_priority instead - -=cut - -sub fetch_all_by_RawContig_and_priority { - deprecate('fetch_all_by_RawContig_and_priority is deprecated and will be removed in e87. Please use fetch_all_by_Slice_and_priority() instead.'); - fetch_all_by_Slice_and_priority(@_); -} - - -sub fetch_all_by_Slice_and_score { - my $self = shift; - throw('fetch_all_by_Slice_and_score should not be' . - 'used to fetch marker_features'); -} - sub _columns { my $self = shift; diff --git a/modules/Bio/EnsEMBL/Map/DitagFeature.pm b/modules/Bio/EnsEMBL/Map/DitagFeature.pm index db94aa34e97fd6e4d3eaae885630fd7a99626b2d..7e2365d41547d9702fd3b2311b14a09120e86fb9 100644 --- a/modules/Bio/EnsEMBL/Map/DitagFeature.pm +++ b/modules/Bio/EnsEMBL/Map/DitagFeature.pm @@ -165,17 +165,6 @@ sub new { } -=head2 fetch_ditag - - Description: Deprecated, use ditag() instead - -=cut - -sub fetch_ditag { - deprecate("fetch_ditag is deprecated and will be removed in e87. Please use ditag() instead.") -} - - =head2 ditag Arg [1] : (optional) ditag object diff --git a/modules/Bio/EnsEMBL/Map/MapLocation.pm b/modules/Bio/EnsEMBL/Map/MapLocation.pm index aae4839282398d1c169ef37eaa9c230cf7d93775..e1caf7800e5e90127c953a4f778c4c91e3a2e931 100644 --- a/modules/Bio/EnsEMBL/Map/MapLocation.pm +++ b/modules/Bio/EnsEMBL/Map/MapLocation.pm @@ -187,32 +187,4 @@ sub lod_score { } - -=head2 chromosome - - Description: DEPRECATED use chromosome_name() instead - -=cut - -sub chromosome { - my $self = shift; - deprecate('chromosome is deprecated and will be removed in e87. Please use chromosome_name instead'); - - if(@_) { - my $chr = shift; - if(ref($chr)) { - $self->chromosome_name($chr->seq_region_name()); - } else { - $self->chromosome_name($chr); - } - } - - #this object has no way to talk to db and thus no way to - #get a chromosome object - return $self->chromosome_name(); -} - - - - 1; diff --git a/modules/Bio/EnsEMBL/OperonTranscript.pm b/modules/Bio/EnsEMBL/OperonTranscript.pm index f8d64c1cec063ec42f1bb5458be02d5d361ae243..150c9c7579066607edb3fcae4418e38053c1bc29 100755 --- a/modules/Bio/EnsEMBL/OperonTranscript.pm +++ b/modules/Bio/EnsEMBL/OperonTranscript.pm @@ -292,21 +292,6 @@ sub add_Gene { return; } -=head2 add_gene - - Arg [1] : Bio::EnsEMBL::Gene - gene to attach to this polycistronic transcript - Example : $operon->add_gene($gene); - Description: Attach a gene to this polycistronic transcript - Exceptions : if argument is not Bio::EnsEMBL::Gene - Caller : general - Status : DEPRECATED - use add_Gene - -=cut -sub add_gene { - my ($self,$gene) = @_; - deprecate('add_gene is deprecated and will be removed in e87. Please use $self->add_Gene()'); - return $self->add_Gene($gene); -} =head2 add_DBEntry Arg [1] : Bio::EnsEMBL::DBEntry $dbe diff --git a/modules/Bio/EnsEMBL/PredictionTranscript.pm b/modules/Bio/EnsEMBL/PredictionTranscript.pm index 43d044d95cb6afa4f7d4dad030a141acacb5c8fa..5cd3cec948dfcfb6b0bbf9bd6a94db5b6a2b7432 100644 --- a/modules/Bio/EnsEMBL/PredictionTranscript.pm +++ b/modules/Bio/EnsEMBL/PredictionTranscript.pm @@ -582,31 +582,4 @@ sub get_all_Attributes { } - -=head2 get_exon_count - - Description: DEPRECATED - use get_all_Exons instead - -=cut - -sub get_exon_count { - my $self = shift; - deprecate('get_exon_count is deprecated and will be removed in e87. Please use scalar(@{$transcript->get_all_Exon()s}) instead'); - return scalar( @{$self->get_all_Exons} ); -} - - - -=head2 get_cdna - - Description : DEPRECATED - use spliced_seq() or translateable_seq instead - -=cut - -sub get_cdna { - my $self = shift; - deprecate('get_cdna is deprecated and will be removed in e87. Please use spliced_seq instead'); - return $self->spliced_seq(); -} - 1; diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm index 9f05be88beecd606636184f79e8f6a37f51e3e6e..1953cbb1eeb515bbac3b7810335af424e673306a 100644 --- a/modules/Bio/EnsEMBL/Registry.pm +++ b/modules/Bio/EnsEMBL/Registry.pm @@ -2709,32 +2709,6 @@ sub load_registry_from_multiple_dbs { # Web specific routines # -=head2 DEPRECATED load_registry_with_web_adaptors - - DEPRECATED: Use load_registry_from_db instead. - -=cut - -sub load_registry_with_web_adaptors{ - my $class = shift; - - deprecate('load_registry_with_web_adaptors is deprecated and will be removed in e87. Please use the load_registry_from_db instead'); - my $site_eval = eval{ require SiteDefs }; - if ($@ or (!defined($site_eval))){ die "Can't use SiteDefs.pm - $@\n"; } - SiteDefs->import(qw(:ALL)); - - my $species_eval = eval{ require SpeciesDefs }; - if ($@ or (!defined($species_eval))){ die "Can't use SpeciesDefs.pm - $@\n"; } - my $conf = new SpeciesDefs(); - - my %species_alias = %{$SiteDefs::ENSEMBL_SPECIES_ALIASES}; - - foreach my $spec (keys %species_alias){ - Bio::EnsEMBL::Registry->add_alias($species_alias{$spec},$spec); - } - return; -} - =head2 set_default_track Sets a flag to say that that this species/group are a default track and do not diff --git a/modules/Bio/EnsEMBL/Root.pm b/modules/Bio/EnsEMBL/Root.pm deleted file mode 100644 index 14df9238093323c2df667f92725fa0df38d5490e..0000000000000000000000000000000000000000 --- a/modules/Bio/EnsEMBL/Root.pm +++ /dev/null @@ -1,168 +0,0 @@ -=head1 LICENSE - -Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -Copyright [2016] EMBL-European Bioinformatics Institute - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -=cut - - -=head1 CONTACT - - Please email comments or questions to the public Ensembl - developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. - - Questions may also be sent to the Ensembl help desk at - <http://www.ensembl.org/Help/Contact>. - -=head1 AUTHOR - - Originally from Steve Chervitz. Refactored by Ewan Birney. - -=cut - -=head1 NAME - -Bio::EnsEMBL::Root - -=head1 DESCRIPTION - -Do not use Bio::EnsEMBL::Root anymore. It is included for backwards -compatibility (every object in EnsEMBL used to inherit from this class) -but will eventually be phased out. The replacement for the _rearrage -method is the rearrange method which can be imported in the following -way: - - use Bio::EnsEMBL::Utils::Argument qw(rearrange); - - # can now call rearrange as a class method (instead as object method) - my ( $start, $end ) = rearrange( [ 'START', 'END' ], @args ); - -If you want to use the throw or warn methods the replacement use the -class methods throw and warning from the Bio::EnsEMBL::Utils::Exception -class: - - use Bio::EnsEMBL::Utils::Exception qw(throw warning); - - # can now call throw or warning even without blessed reference - warning('This is a warning'); - throw('This is an exception'); - -This module was stolen from BioPerl to avoid problems with moving to -BioPerl 1 from 0.7 - -=head1 METHODS - -=cut - -package Bio::EnsEMBL::Root; - -use strict; -use vars qw($VERBOSITY); -use Bio::EnsEMBL::Utils::Exception qw( ); -use Bio::EnsEMBL::Utils::Argument qw( ); - - -$VERBOSITY = 0; - -sub new{ - my($caller,@args) = @_; - - my $class = ref($caller) || $caller; - return bless({}, $class); -} - - -=head2 throw - - DEPRECATED - -=cut - -sub throw{ - my ($self,$string) = @_; - - deprecate('Root->throw is deprecated and will be removed in e87. Please use Exception->throw instead'); - - Bio::EnsEMBL::Utils::Exception->throw($string); - - -} - -=head2 warn - - DEPRECATED - -=cut - -sub warn{ - my ($self,$string) = @_; - - deprecate('Root->warn is deprecated and will be removed in e87. Please use Exception->warning instead'); - - Bio::EnsEMBL::Utils::Exception->warning($string); - -} - - - - -=head2 verbose - - DEPRECATED - -=cut - -sub verbose{ - my ($self,$value) = @_; - - deprecate('Root->verbose is deprecated and will be removed in e87. Please use Exception->verbose instead'); - - Bio::EnsEMBL::Utils::Exception->verbose($value); - - } - -=head2 stack_trace_dump - - DEPRECATED - -=cut - -sub stack_trace_dump{ - my ($self) = @_; - - deprecate('Root->stack_trace_dump is deprecated and will be removed in e87. Please use Exception->stack_trace_dump instead'); - - Bio::EnsEMBL::Utils::Exception->stack_trace_dump(); - -} - - -=head2 stack_trace - - DEPRECATED - -=cut - -sub stack_trace{ - my ($self) = @_; - - deprecate('Root->stack_trace is deprecated and will be removed in e87. Please use Exception->stack_trace instead'); - - Bio::EnsEMBL::Utils::Exception->stack_trace(); - -} - - -1; diff --git a/modules/Bio/EnsEMBL/SeqFeature.pm b/modules/Bio/EnsEMBL/SeqFeature.pm index 578f79360b2fc072e6836e802273ac736510325e..8a063c63398abbcaaefb5a71438a6853000848db 100755 --- a/modules/Bio/EnsEMBL/SeqFeature.pm +++ b/modules/Bio/EnsEMBL/SeqFeature.pm @@ -71,9 +71,6 @@ use strict; use Bio::EnsEMBL::Analysis; -use Bio::EnsEMBL::Root; - -@ISA = qw(Bio::EnsEMBL::Root); use Bio::EnsEMBL::Utils::Argument qw(rearrange); diff --git a/modules/Bio/EnsEMBL/Slice.pm b/modules/Bio/EnsEMBL/Slice.pm index 95e4bfd8161417ab4a397cef3487a732c3229962..e8efd8a19cf2b875abb35eff540fc595a0845a2a 100644 --- a/modules/Bio/EnsEMBL/Slice.pm +++ b/modules/Bio/EnsEMBL/Slice.pm @@ -2704,47 +2704,6 @@ sub get_all_genotyped_VariationFeatures{ } -=head2 get_all_SNPs - - Description: DEPRECATED. Use get_all_VariationFeatures insted - -=cut - -sub get_all_SNPs { - my $self = shift; - deprecate('get_all_SNPs is deprecated and will be removed in e87. Please use get_all_VariationFeatures() instead.'); - my $snps; - my $vf = $self->get_all_genotyped_VariationFeatures(); - if( $vf->[0] ) { - #necessary to convert the VariationFeatures into SNP objects - foreach my $variation_feature (@{$vf}){ - push @{$snps},$variation_feature->convert_to_SNP(); - } - return $snps; - } - return []; -} - -=head2 get_all_genotyped_SNPs - - Description : DEPRECATED. Use get_all_genotyped_VariationFeatures insted - -=cut - -sub get_all_genotyped_SNPs { - my $self = shift; - deprecate("get_all_genotypes_SNPs is deprecated and will be removed in e87. Please use get_all_genotyped_VariationFeatures instead"); - my $vf = $self->get_all_genotyped_VariationFeatures; - my $snps; - if ($vf->[0]){ - foreach my $variation_feature (@{$vf}){ - push @{$snps},$variation_feature->convert_to_SNP(); - } - return $snps; - } - return []; -} - =head2 get_all_Genes Arg [1] : (optional) string $logic_name @@ -3926,165 +3885,4 @@ sub alphabet { return 'dna'; } sub accession_number { name(@_); } - -# sub DEPRECATED METHODS # -############################################################################### - -=head1 DEPRECATED METHODS - - -=head2 get_all_supercontig_Slices - - Description: DEPRECATED use get_tiling_path("NTcontig") instead - -=cut - -sub get_all_supercontig_Slices { - my $self = shift; - - deprecate("get_all_supercontig_Slices is deprecated and will be removed in e87. Please use get_tiling_path('NTcontig') instead"); - - my $result = []; - - if( $self->adaptor() ) { - my $superctg_names = - $self->adaptor()->list_overlapping_supercontigs( $self ); - - for my $name ( @$superctg_names ) { - my $slice; - $slice = $self->adaptor()->fetch_by_supercontig_name( $name ); - $slice->name( $name ); - push( @$result, $slice ); - } - } else { - warning( "Slice needs to be attached to a database to get supercontigs" ); - } - - return $result; -} - - - - - -=head2 get_Chromosome - - Description: DEPRECATED use this instead: - $slice_adp->fetch_by_region('chromosome', - $slice->seq_region_name) - -=cut - -sub get_Chromosome { - my $self = shift @_; - - deprecate("get_Chromosome is deprecated and will be removed in e87. Please use SliceAdaptor::fetch_by_region('chromosome',slice->seq_region_name) instead"); - - my $csa = $self->adaptor->db->get_CoordSystemAdaptor(); - my ($top_cs) = @{$csa->fetch_all()}; - - return $self->adaptor->fetch_by_region($top_cs->name(), - $self->seq_region_name(), - undef,undef,undef, - $top_cs->version()); -} - - - -=head2 chr_name - - Description: DEPRECATED use seq_region_name() instead - -=cut - -sub chr_name{ - deprecate("chr_name is deprecated and will be removed in e87. Please use seq_region_name() instead"); - seq_region_name(@_); -} - - - -=head2 chr_start - - Description: DEPRECATED use start() instead - -=cut - -sub chr_start{ - deprecate('chr_start is deprecated and will be removed in e87. Please use start() instead'); - start(@_); -} - - - -=head2 chr_end - - Description: DEPRECATED use end() instead - Returntype : int - Exceptions : none - Caller : SliceAdaptor, general - -=cut - -sub chr_end{ - deprecate('chr_end is deprecated and will be removed in e87. Please use end() instead'); - end(@_); -} - - -=head2 assembly_type - - Description: DEPRECATED use version instead - -=cut - -sub assembly_type{ - my $self = shift; - deprecate('assembly_type is deprecated and will be removed in e87. Please use $slice->coord_system()->version() instead.'); - return $self->coord_system->version(); -} - - -=head2 dbID - - Description: DEPRECATED use SliceAdaptor::get_seq_region_id instead - -=cut - -sub dbID { - my $self = shift; - deprecate('dbID is deprecated and will be removed in e87. Please use SliceAdaptor::get_seq_region_id instead.'); - if(!$self->adaptor) { - warning('Cannot retrieve seq_region_id without attached adaptor.'); - return 0; - } - return $self->adaptor->get_seq_region_id($self); -} - - -=head2 get_all_MapFrags - - Description: DEPRECATED use get_all_MiscFeatures instead - -=cut - -sub get_all_MapFrags { - my $self = shift; - deprecate('get_all_MapFrags is deprecated and will be removed in e87. Please use get_all_MiscFeatures instead'); - return $self->get_all_MiscFeatures(@_); -} - -=head2 has_MapSet - - Description: DEPRECATED use get_all_MiscFeatures instead - -=cut - -sub has_MapSet { - my( $self, $mapset_name ) = @_; - deprecate('has_MapSet is deprecated and will be removed in e87. Please use get_all_MiscFeatures instead'); - my $mfs = $self->get_all_MiscFeatures($mapset_name); - return (@$mfs > 0); -} - 1; diff --git a/modules/Bio/EnsEMBL/StrainSlice.pm b/modules/Bio/EnsEMBL/StrainSlice.pm index 7d42836c0ee2ee3eb1d6051bc1a6c45bdd421240..b989a13314cfe8618e4218d464eecf01e47398b3 100644 --- a/modules/Bio/EnsEMBL/StrainSlice.pm +++ b/modules/Bio/EnsEMBL/StrainSlice.pm @@ -799,17 +799,6 @@ sub mapper{ return $self->{'mapper'}; } -=head2 get_all_differences_Slice - - Description : DEPRECATED use get_all_AlleleFeatures instead - -=cut - -sub get_all_differences_Slice{ - my $self = shift; - deprecate('get_all_differences_Slice is deprecated and will be removed in e87. Please use get_all_AlleleFeatures_Slice instead'); - return $self->get_all_AlleleFeatures_Slice(@_); -} =head2 get_all_VariationFeatures diff --git a/modules/Bio/EnsEMBL/Transcript.pm b/modules/Bio/EnsEMBL/Transcript.pm index b5ab18231fc6540815f29cd91bb8f84ed9ffa50d..cfdc9c4bc09a8837b8cfd6abfbc45b8055d5c383 100755 --- a/modules/Bio/EnsEMBL/Transcript.pm +++ b/modules/Bio/EnsEMBL/Transcript.pm @@ -3225,83 +3225,6 @@ sub get_Gene { return $parent_gene; } -########################### -# DEPRECATED METHODS FOLLOW -########################### - -=head2 created - - Description: DEPRECATED - this attribute is not part of transcript anymore - -=cut - -sub created{ - my $obj = shift; - deprecate( "created is deprecated and will be removed in e87." ); - if( @_ ) { - my $value = shift; - $obj->{'created'} = $value; - } - return $obj->{'created'}; -} - - -=head2 modified - - Description: DEPRECATED - this attribute is not part of transcript anymore - -=cut - -sub modified{ - my $obj = shift; - deprecate( "modified is deprecated and will be removed in e87." ); - if( @_ ) { - my $value = shift; - $obj->{'modified'} = $value; - } - return $obj->{'modified'}; -} - - -=head2 temporary_id - - Function: DEPRECATED: Use dbID or stable_id or something else instead - -=cut - -sub temporary_id{ - my ($obj,$value) = @_; - deprecate( "temporary_id is deprecated and will be removed in e87." ); - if( defined $value) { - $obj->{'temporary_id'} = $value; - } - return $obj->{'temporary_id'}; -} - - -=head2 type - - Description: DEPRECATED. Use biotype() instead. - -=cut - -sub type { - deprecate("type is deprecated and will be removed in e87. Please use biotype() instead"); - biotype(@_); -} - - -=head2 confidence - - Description: DEPRECATED. Use status() instead. - -=cut - -sub confidence { - deprecate("confidence is deprecated and will be removed in e87. Please use status() instead"); - status(@_); -} - 1; diff --git a/modules/Bio/EnsEMBL/Translation.pm b/modules/Bio/EnsEMBL/Translation.pm index 7a977a9ae0aca17046c5904c6c3adb0c0e9f5efa..f4ad27c4025f3eb0784d8aa281c52e2fcd9dec01 100755 --- a/modules/Bio/EnsEMBL/Translation.pm +++ b/modules/Bio/EnsEMBL/Translation.pm @@ -1192,20 +1192,6 @@ sub load { } } -=head2 temporary_id - - Description: DEPRECATED This method should not be needed. Use dbID, - stable_id or something else. - -=cut - -sub temporary_id { - my $self = shift; - deprecate( "temporary_id is deprecated and will be removed in e87."); - $self->{'temporary_id'} = shift if( @_ ); - return $self->{'temporary_id'}; -} - =head2 get_all_DASFactories diff --git a/modules/Bio/EnsEMBL/Utils/CigarString.pm b/modules/Bio/EnsEMBL/Utils/CigarString.pm index c08ba9f0d58fde182c92e2f6b605a3a9ffb47f57..93f15537c1c61c9d72c54a6c9bc898674aa14837 100644 --- a/modules/Bio/EnsEMBL/Utils/CigarString.pm +++ b/modules/Bio/EnsEMBL/Utils/CigarString.pm @@ -76,9 +76,6 @@ package Bio::EnsEMBL::Utils::CigarString; use strict; use vars qw(@ISA); -use Bio::EnsEMBL::Root; - -@ISA = qw(Bio::EnsEMBL::Root); =head2 split_hsp diff --git a/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm b/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm index 98248e3de1a76c745e99464a5d46a39306405c63..7329627ddfc25769271df47aa49cb471c1f24422 100644 --- a/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm +++ b/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm @@ -563,17 +563,6 @@ sub user_proceed { return(1); } -=head2 user_confirm - - Description : DEPRECATED - please use user_proceed() instead - -=cut - -sub user_confirm { - my $self = shift; - deprecate("user_confirm is deprecated and will be removed in e87."); - exit unless $self->user_proceed("Continue?"); -} =head2 read_user_input diff --git a/modules/Bio/EnsEMBL/Utils/Converter.pm b/modules/Bio/EnsEMBL/Utils/Converter.pm index 5b99f754f24a10b18a2e72b260e9210175eae3da..0985c7d2ad4ac63d856831c28ca90c7768e1eeda 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter.pm @@ -70,8 +70,6 @@ What the ready conversions are, package Bio::EnsEMBL::Utils::Converter; use strict; -use Bio::EnsEMBL::Root; -our @ISA =qw(Bio::EnsEMBL::Root); =head2 new diff --git a/modules/Bio/EnsEMBL/Utils/Exception.pm b/modules/Bio/EnsEMBL/Utils/Exception.pm index f3cdcb9069622654ec11383d3f5e90b017c3555b..ee2b4892496f58599f1672050be0dcf003cf5fc5 100644 --- a/modules/Bio/EnsEMBL/Utils/Exception.pm +++ b/modules/Bio/EnsEMBL/Utils/Exception.pm @@ -80,7 +80,7 @@ Bio::EnsEMBL::Utils::Exception - Utility functions for error handling This is derived from the Bio::Root module in BioPerl. Some formatting has been changed and the deprecate function has been added. Most notably the object methods are now static class methods that can be -called without inheriting from Bio::Root or Bio::EnsEMBL::Root. This is +called without inheriting from Bio::Root. This is especially useful for throwing exceptions with stack traces outside of a blessed context. @@ -88,7 +88,7 @@ The originaly implementations of these methods were by Steve Chervitz and refactored by Ewan Birney. It is recommended that these functions be used instead of inheriting -unnecessarily from the Bio::EnsEMBL::Root or Bio::Root object. The +unnecessarily from the Bio::Root object. The functions exported by this package provide a set of useful error handling methods. diff --git a/modules/Bio/EnsEMBL/Utils/IO/BEDSerializer.pm b/modules/Bio/EnsEMBL/Utils/IO/BEDSerializer.pm index 116ca6aeb4049f81f2edabe7a463c7f42fe4ac10..b0da132f952e91fb1fa75eb4323003b36952d16c 100644 --- a/modules/Bio/EnsEMBL/Utils/IO/BEDSerializer.pm +++ b/modules/Bio/EnsEMBL/Utils/IO/BEDSerializer.pm @@ -49,7 +49,7 @@ use base qw(Bio::EnsEMBL::Utils::IO::FeatureSerializer); Arg [2] : Default source of the features. Defaults to . Arg [3] : RGB colour to emit. Defaults to black (0,0,0) - Returntype : Bio::EnsEMBL::Utils::IO::GFFSerializer + Returntype : Bio::EnsEMBL::Utils::IO::BEDSerializer =cut diff --git a/modules/Bio/EnsEMBL/Utils/PolyA.pm b/modules/Bio/EnsEMBL/Utils/PolyA.pm index a339c9f09df270a5062dcad34f776302fb22805b..de1b09965aed73dcf4d82b99f265c098232947df 100644 --- a/modules/Bio/EnsEMBL/Utils/PolyA.pm +++ b/modules/Bio/EnsEMBL/Utils/PolyA.pm @@ -59,14 +59,11 @@ Bio::EnsEMBL::Utils::PolyA package Bio::EnsEMBL::Utils::PolyA; -use Bio::EnsEMBL::Root; use Bio::Seq; use vars qw(@ISA); use strict; -@ISA = qw(Bio::EnsEMBL::Root); - =head2 new @@ -172,10 +169,10 @@ sub _find_polyA{ $count = $chunk =~ tr/Aa//; $n_count = $chunk =~ tr/Nn//; if ( ($count + $n_count) >= 2*( $piece )/3 ){ - $length_to_mask += 3; + $length_to_mask += 3; } else{ - last; + last; } } @@ -184,27 +181,27 @@ sub _find_polyA{ my $last_base = substr( $seq, ( $length - $length_to_mask ), 1); my $previous_to_last = substr( $seq, ( $length - $length_to_mask - 1), 1); if ( !( $last_base eq 'A' || $last_base eq 'a') ){ - $length_to_mask--; + $length_to_mask--; } elsif( $previous_to_last eq 'A' || $previous_to_last eq 'a' ){ - $length_to_mask++; + $length_to_mask++; } my $clipped_seq = substr( $seq, 0, $length - $length_to_mask ); my $mask; if ( $self->_clip ){ - $mask = ""; + $mask = ""; } elsif( $self->_mask ){ - $mask = "N" x ($length_to_mask); + $mask = "N" x ($length_to_mask); } elsif ( $self->_softmask ){ - $mask = lc substr( $seq, ( $length - $length_to_mask ) ); + $mask = lc substr( $seq, ( $length - $length_to_mask ) ); } $new_seq = $clipped_seq . $mask; } else{ $new_seq = $seq; - } + } } #### polyT #### elsif( $t_count >=5 && $t_count > $a_count ){ @@ -226,11 +223,11 @@ sub _find_polyA{ $count = $chunk =~ tr/Tt//; $n_count = $chunk =~ tr/Nn//; if ( ($count+$n_count) >= 2*( $piece )/3 ){ - $length_to_mask +=3; + $length_to_mask +=3; } else{ - last; - + last; + } } if ( $length_to_mask >= 0 ){ @@ -239,21 +236,21 @@ sub _find_polyA{ my $last_base = substr( $seq, ( $length_to_mask + 3 - 1 ), 1 ); my $previous_to_last = substr( $seq, ( $length_to_mask + 3 ), 1 ); if ( !( $last_base eq 'T' || $last_base eq 't' ) ){ - $length_to_mask--; + $length_to_mask--; } elsif( $previous_to_last eq 'T' || $previous_to_last eq 't' ){ - $length_to_mask++; + $length_to_mask++; } my $clipped_seq = substr( $seq, $length_to_mask + 3); my $mask; if ( $self->_clip ){ - $mask = ""; + $mask = ""; } elsif( $self->_mask ){ - $mask = "N" x ($length_to_mask+3); + $mask = "N" x ($length_to_mask+3); } elsif ($self->_softmask){ - $mask = lc substr( $seq, 0, ($length_to_mask + 3) ); + $mask = lc substr( $seq, 0, ($length_to_mask + 3) ); } $new_seq = $mask.$clipped_seq; } @@ -330,3 +327,4 @@ sub has_polyA_track{ ################ 1; + diff --git a/modules/t/gene.t b/modules/t/gene.t index 5a47bf2562be6a1b49e68ab01c5fa3870608a9bc..23788f72c2eb9b1a6304018ce4f9c8b0689540eb 100644 --- a/modules/t/gene.t +++ b/modules/t/gene.t @@ -398,17 +398,7 @@ $multi->restore(); $slice = $db->get_SliceAdaptor()->fetch_by_region("chromosome", "20", 30_252_000, 31_252_001); -my $known = 0; -my $unknown = 0; - $genes = $slice->get_all_Genes(); -for my $gene (@$genes) { - if ($gene->is_known()) { - $known++; - } else { - $unknown++; - } -} # try and count the genes on the slice note 'Processing counts'; @@ -433,9 +423,6 @@ is($geneCount, scalar(@$genes) - $vega_geneCount, "Almost all genes are of sourc is($gene_count, 14, 'Counts should span slices when given patches/haps/pars'); } -debug("known: $known Unknown: $unknown\n"); - -ok($known == 17); #save contents of gene table $multi->save('core', 'gene'); diff --git a/modules/t/metaContainer.t b/modules/t/metaContainer.t index 69c409d6e981c43c21ead48734823459791da70e..0826f9c9cd935530d91d38127ab9d61e8f7b7462 100644 --- a/modules/t/metaContainer.t +++ b/modules/t/metaContainer.t @@ -85,17 +85,6 @@ ok($div eq $divname); my $classification = [ qw/Hominidae Catarrhini Primates Eutheria Mammalia Vertebrata Chordata Metazoa Eukaryota/ ]; is_deeply($mc->get_classification(), $classification, 'Checking classification as expected'); -# -# Testing get_Species() -# - -capture_std_streams(sub { - my ($stdout_ref, $stderr_ref) = @_; - my $s = $mc->get_Species(); - is($s->binomial(), 'Homo sapiens', 'Checking binomial from Bio::Species continues to work'); - like(${$stderr_ref}, qr/.+ deprecated .+ get_scientific_name\(\)/xms, 'Make sure we warn about deprecation'); -}); - $mdb->restore('core', 'meta'); done_testing(); diff --git a/modules/t/proteinFeature.t b/modules/t/proteinFeature.t index 251c679d60fe1787661cf69d379de3684416c5ea..96500d203881419124d9bf774845a8c66e3c9e9f 100644 --- a/modules/t/proteinFeature.t +++ b/modules/t/proteinFeature.t @@ -45,6 +45,7 @@ my $hdes = "Hit description"; my $idesc = 'interpro description'; my $ilabel = 'interpro label'; my $interpro_ac = 'interpro accession'; +my $translation_id = 1234; my $analysis = Bio::EnsEMBL::Analysis->new(-LOGIC_NAME => 'test'); @@ -64,7 +65,8 @@ my $f = Bio::EnsEMBL::ProteinFeature->new -HDESCRIPTION=> $hdes, -IDESC => $idesc, -ILABEL => $ilabel, - -INTERPRO_AC => $interpro_ac); + -INTERPRO_AC => $interpro_ac, + -TRANSLATION_ID => $translation_id); @@ -73,6 +75,7 @@ ok($f && $f->isa('Bio::EnsEMBL::ProteinFeature')); ok($f->start == $start); ok($f->end == $end); ok($f->analysis == $analysis); +ok($f->translation_id == $translation_id); ok($f->hstart == $hstart); ok($f->hend == $hend); diff --git a/modules/t/proteinFeatureAdaptor.t b/modules/t/proteinFeatureAdaptor.t index c0f57e8763fba34b93fc01b5b9c6273f4f7bae66..a32b7649b7780b49225849c4294bfa0396e9d80b 100644 --- a/modules/t/proteinFeatureAdaptor.t +++ b/modules/t/proteinFeatureAdaptor.t @@ -88,9 +88,29 @@ my $f = Bio::EnsEMBL::ProteinFeature->new -IDESC => $idesc, -INTERPRO_AC => $interpro_ac); -$pfa->store($f,21724); +my $dbID = $pfa->store($f,21724); -my $pfs = $pfa->fetch_all_by_translation_id(21724); +ok($dbID, "New object created has dbID"); + +#fetch protein feature object by dbID and compare the core attributes +#deep comparison is not possible because all the attributes are not stored in the protein_feature table +my $f_by_dbID = $pfa->fetch_by_dbID($dbID); + +is($f_by_dbID->translation_id, 21724); +is($f_by_dbID->start, $start); +is($f_by_dbID->end, $end); +is($f_by_dbID->dbID, $dbID); +is($f_by_dbID->analysis->logic_name, 'test'); +is($f_by_dbID->hstart, $hstart); +is($f_by_dbID->hend, $hend); +is($f_by_dbID->hseqname, $hseqname); +is($f_by_dbID->hdescription, $hdes); +is($f_by_dbID->score, $score); +is($f_by_dbID->percent_id, $percent_id); +is($f_by_dbID->p_value, $p_value); + + +$pfs = $pfa->fetch_all_by_translation_id(21724); ok(@$pfs == 16);