| Class | Ensembl::Core::CoordSystem |
| In: |
lib/ensembl/core/activerecord.rb
|
| Parent: | CoreDBConnection |
The CoordSystem class describes the coordinate system to which a given SeqRegion belongs. It is an interface to the coord_system table of the Ensembl mysql database.
Two virtual coordinate systems exist for every species:
This class uses ActiveRecord to access data in the Ensembl database. See the general documentation of the Ensembl module for more information on what this means and what methods are available.
coord_system = Ensembl::Core::CoordSystem.find_by_name('chromosome')
if coord_system == CoordSystem.toplevel
puts coord_system.name + " is the toplevel coordinate system."
end
The CoordSystem#find_default_by_name class method returns the coordinate system by that name with the lowest rank. Normally, a lower rank means a ‘bigger’ coordinate system. The ‘chromosome’ typically has rank 1. However, there might be more than one coordinate system with the name chromosome but with different version (e.g. in human, there is one for the NCBI36 and one for the NCBI35 version). The older version of these is typically given a high number and the one with the new version is the ‘default’ system.
| Arguments: | none |
| Returns: | CoordSystem object |
The CoordSystem#find_seqlevel class method returns the seqlevel coordinate system.
| Arguments: | none |
| Returns: | CoordSystem object |
The CoordSystem#find_toplevel class method returns the toplevel coordinate system.
| Arguments: | none |
| Returns: | CoordSystem object |
The CoordSystem#name_with_version returns a string containing the name and version of the coordinate system. If no version is available, then just the name is returned
| Arguments: | none |
| Returns: | String object |
The CoordSystem#seqlevel? method checks if this coordinate system is the seqlevel coordinate system or not.
| Arguments: | none |
| Returns: | TRUE or FALSE |