|
ensembl-hive
2.7.0
|
Inheritance diagram for Bio::EnsEMBL::DBSQL::CoordSystemAdaptor:
This adaptor allows the querying of information from the coordinate
system adaptor.
Note that many coordinate systems do not have a concept of a version
for the entire coordinate system (though they may have a per-sequence
version). The 'chromosome' coordinate system usually has a version
(i.e. the assembly version) but the clonal coordinate system does not
(despite having individual sequence versions). In the case where a
coordinate system does not have a version an empty string ('') is used
instead.
Definition at line 91 of file CoordSystemAdaptor.pm.
| protected Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::_cache_mapping_paths | ( | ) |
Undocumented method
Code:
| protected Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::_cache_seq_region_mapping | ( | ) |
Undocumented method
Code:
| public Listref Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_all | ( | ) |
Arg [1] : none Example :
Description: Retrieves every coordinate system defined in the DB. These will be returned in ascending order of rank. I.e. The highest coordinate system with rank=1 would be first in the array. Returntype : listref of Bio::EnsEMBL::CoordSystems Exceptions : none Caller : general Status : Stable
Code:
| public Reference Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_all_by_attrib | ( | ) |
Arg [1] : string attrib Example :
Description: Retrieves all CoordSystem object from the database that have the specified attrib. Returntype : reference to a list of Bio::EnsEMBL::CoordSystem objects Exceptions : throw when attrib not present Caller : general Status : Stable
Code:
| public Listref Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_all_by_name | ( | ) |
Arg [1] : string $name
The name of the coordinate system to retrieve. This can be
the name of an actual coordinate system or an alias for a
coordinate system. Valid aliases are 'toplevel' and 'seqlevel'.
Example :Description: Retrieves all coordinate systems of a particular name Returntype : listref of Bio::EnsEMBL::CoordSystem objects Exceptions : throw if no name argument provided Caller : general Status : Stable
Code:
| public ArrayRef Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_all_by_version | ( | ) |
Arg [1] : string $version
The version of the coordinate systems to retrieve.
Example :Description: Retrieves all coordinate systems of a particular version Returntype : ArrayRef of Bio::EnsEMBL::CoordSystem objects Exceptions : throw if no name argument provided Caller : general Status : Stable
Code:
| public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_by_attrib | ( | ) |
Arg [1] : string attrib Arg [2] : (optional) string version Example :
Description: Retrieves a CoordSystem object from the database that have the specified attrib and version, if no version is specified, returns the default version Returntype : Bio::EnsEMBL::CoordSystem object Exceptions : throw when attrib not present Caller : general Status : Stable
Code:
| public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_by_dbID | ( | ) |
Arg [1] : int dbID Example :
Description: Retrieves a coord_system via its internal
identifier, or undef if no coordinate system with the provided
id exists.
Returntype : Bio::EnsEMBL::CoordSystem or undef
Exceptions : thrown if no coord_system exists for specified dbID
Caller : general
Status : Stable
Code:
| public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_by_name | ( | ) |
Arg [1] : string $name
The name of the coordinate system to retrieve. Alternatively
this may be an alias for a real coordinate system. Valid
aliases are 'toplevel' and 'seqlevel'.
Arg [2] : string $version (optional)
The version of the coordinate system to retrieve. If not
specified the default version will be used.
Example :Description: Retrieves a coordinate system by its name Returntype : Bio::EnsEMBL::CoordSystem Exceptions : throw if no name argument provided warning if no version provided and default does not exist Caller : general Status : Stable
Code:
| public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_by_rank | ( | ) |
Arg [1] : int $rank Example :
Description: Retrieves a CoordinateSystem via its rank. 0 is a special
rank reserved for the pseudo coordinate system 'toplevel'.
undef is returned if no coordinate system of the specified rank
exists.
Returntype : Bio::EnsEMBL::CoordSystem
Exceptions : none
Caller : general
Status : Stable
Code:
| public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_sequence_level | ( | ) |
Arg [1] : none Example :
Description: Retrieves the coordinate system at which sequence
is stored at.
Returntype : Bio::EnsEMBL::CoordSystem
Exceptions : throw if no sequence_level coord system exists at all
throw if multiple sequence_level coord systems exists
Caller : general
Status : Stable
Code:
| public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::fetch_top_level | ( | ) |
Arg [1] : none Example :
Description: Retrieves the toplevel pseudo coordinate system. Returntype : Bio::EnsEMBL::CoordSystem object Exceptions : none Caller : general Status : Stable
Code:
| public Listref Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::get_all_versions | ( | ) |
Arg [1] : none Example :
Description: Retrieves all the available versions of assemblies Returntype : Listref of versions (strings) Exceptions : throw if no version is defined Caller : general Status : Stable
Code:
| public String Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::get_default_version | ( | ) |
Arg [1] : none Example :
Description: Retrieves the default version of the assembly Returntype : String Exceptions : throw if no default version is defined Caller : general Status : Stable
Code:
| public Reference Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::get_mapping_path | ( | ) |
Arg [1] : Bio::EnsEMBL::CoordSystem $cs1 Arg [2] : Bio::EnsEMBL::CoordSystem $cs2 Example :
Description: Given two coordinate systems this will return a mapping path
between them if one has been defined. Allowed Mapping paths are
explicitly defined in the meta table. The following is an
example: mysql> select * from meta where meta_key = 'assembly.mapping';
+---------+------------------+--------------------------------------+
| meta_id | meta_key | meta_value |
+---------+------------------+--------------------------------------+
| 20 | assembly.mapping | chromosome:NCBI34|contig |
| 21 | assembly.mapping | clone|contig |
| 22 | assembly.mapping | supercontig|contig |
| 23 | assembly.mapping | chromosome:NCBI34|contig|clone |
| 24 | assembly.mapping | chromosome:NCBI34|contig|supercontig |
| 25 | assembly.mapping | supercontig|contig|clone |
+---------+------------------+--------------------------------------+ For a one-step mapping path to be valid there needs to be
a relationship between the two coordinate systems defined in
the assembly table. Two step mapping paths work by building
on the one-step mapping paths which are already defined. The first coordinate system in a one step mapping path must
be the assembled coordinate system and the second must be
the component. Example of use:
my $cs1 = $cs_adaptor->fetch_by_name('contig');
my $cs2 = $cs_adaptor->fetch_by_name('chromosome');my @path =$cs_adaptor->get_mapping_path($cs1,$cs2)};
if(!@path) {
print "No mapping path.";
}
elsif(@path == 2) {
print "2 step mapping path.";
print "Assembled = " . $path[0]->name() . "\n";
print "Component = " . $path[1]->name() . "\n";
} else {
print "Multi step mapping path\n";
}Returntype : reference to a list of Bio::EnsEMBL::CoordSystem objects
Exceptions : none Caller : general Status : Stable
Code:
| public Bio::EnsEMBL::DBSQL::CoordSystemAdaptor Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::new | ( | ) |
Arg [1] : See BaseAdaptor for arguments (none specific to this subclass) Example :
Description: Creates a new CoordSystem adaptor and caches the contents of the coord_system table in memory. Returntype : Bio::EnsEMBL::DBSQL::CoordSystemAdaptor Exceptions : none Caller : Status : Stable
Code:
| public void Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::remove | ( | ) |
Arg [1] : Bio::EnsEMBL::CoordSystem Example :
Description: Removes a CoordSystem object from the database. Returntype : none Exceptions : Warning if CoordSystem is not stored in this database. Caller : none Status : Stable
Code:
| public void Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::store | ( | ) |
Arg [1] : Bio::EnsEMBL::CoordSystem Example :
Description: Stores a CoordSystem object in the database. Returntype : none Exceptions : Warning if CoordSystem is already stored in this database. Caller : none Status : Stable
Code:
| public Reference Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::store_mapping_path | ( | ) |
Arg [1] : Bio::EnsEMBL::CoordSystem $cs1 Arg [2] : Bio::EnsEMBL::CoordSystem $cs2 Arg [3..n] : Bio::EnsEMBL::CoordSystem $cs3..$csN Example :
Description: Given two or more coordinate systems this will store
mapping paths between them in the database. For example, if $cs1 represents chrs of version
V1, $cs2 represents contigs, and $cs3 clones then, unless
they already exist, the following entries will be created
in the meta table;
+------------------+---------------------+
| meta_key | meta_value |
+------------------+---------------------+
| assembly.mapping | chr:V1|clone |
| assembly.mapping | clone|contig |
| assembly.mapping | chr:V1|clone|contig |
+------------------+---------------------+ For a one-step mapping path to be valid there needs to be
a relationship between the two coordinate systems defined in
the assembly table. Two step mapping paths work by building
on the one-step mapping paths which are already defined. The first coordinate system in a one step mapping path must
be the assembled coordinate system and the second must be
the component. Returntype : reference to a list of lists of new meta_value mapping strings
created for assembly.mapping
Exceptions : CoordSystems with no rank/duplicated rank
Caller : general
Status : Experimental
Code:
| public Reference Bio::EnsEMBL::DBSQL::CoordSystemAdaptor::store_multiple_mapping_path | ( | ) |
Arg [1] : Bio::EnsEMBL::CoordSystem $cs1 Arg [2] : Bio::EnsEMBL::CoordSystem $cs2 Arg [3..n] : Bio::EnsEMBL::CoordSystem $cs3..$csN Example :
Description: Given two or more coordinate systems this will store
multiple mapping paths between them in the database. Works similarly to the store_mapping_path method
But will presume every coord system can be mapped in multiple
ways to the other coord systems
This is represented by the use of '#' instead of '|'
in the mapping key Returntype : reference to a list of lists of new meta_value mapping strings
created for assembly.mapping
Exceptions : CoordSystems with no rank/duplicated rank
Caller : general
Status : Experimental
Code: