ensembl-hive  2.6
Bio::EnsEMBL::CoordSystem Class Reference
+ Inheritance diagram for Bio::EnsEMBL::CoordSystem:

Public Member Functions

public Bio::EnsEMBL::CoordSystem new ()
 
public String name ()
 
public String version ()
 
public String species ()
 
public String equals ()
 
public Boolean is_top_level ()
 
public Boolean is_sequence_level ()
 
public Boolean is_default ()
 
public Int rank ()
 
public Bio::EnsEMBL::CoordSystem alias_to ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Storable
public Bio::EnsEMBL::Storable new ()
 
public Instance new_fast ()
 
public Int dbID ()
 
public Bio::EnsEMBL::DBSQL::BaseAdaptor adaptor ()
 
public Boolean is_stored ()
 
public get_all_DAS_Features ()
 

Detailed Description

Synopsis

my $csa = $db->get_CoordSystemAdaptor();
#
# Get all coord systems in the database:
#
foreach my $cs ( @{ $csa->fetch_all() } ) {
my $str = join ':', $cs->name(), $cs->version(), $cs->dbID();
print "$str\n";
}

Description

This is a simple object which contains a few coordinate system attributes:
name, internal identifier, version.  A coordinate system is uniquely defined
by its name and version.  A version of a coordinate system applies to all
sequences within a coordinate system.  This should not be confused with
individual sequence versions.

Take for example the Human assembly.  The version 'NCBI33' applies to
to all chromosomes in the NCBI33 assembly (that is the entire 'chromosome'
coordinate system).  The 'clone' coordinate system in the same database would
have no version however.  Although the clone sequences have their own sequence
versions, there is no version which applies to the entire set of clones.

Coordinate system objects are immutable. Their name and version, and other
attributes may not be altered after they are created.

Definition at line 40 of file CoordSystem.pm.

Member Function Documentation

◆ alias_to()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::CoordSystem::alias_to ( )
  Arg [1]    : string
  Example    :
$coord->alias_to('chromosome');
  Description: Getter/Setter for the alias of this coordinate system.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ equals()

public String Bio::EnsEMBL::CoordSystem::equals ( )
  Arg [1]    : Bio::EnsEMBL::CoordSystem $cs
               The coord system to compare to for equality.
  Example    :
if($coord_sys->equals($other_coord_sys)) { ... }
  Description: Compares 2 coordinate systems and returns true if they are
               equivalent.  The definition of equivalent is sharing the same
               name and version.
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ is_default()

public Boolean Bio::EnsEMBL::CoordSystem::is_default ( )
  Arg [1]    : none
  Example    :
if($coord_sys->is_default()) { ... }
  Description: Returns true if this coordinate system is the default
               version of the coordinate system of this name.
  Returntype : 1 or 0
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ is_sequence_level()

public Boolean Bio::EnsEMBL::CoordSystem::is_sequence_level ( )
  Arg [1]    : none
  Example    :
if($coord_sys->is_sequence_level()) { ... }
  Description: Returns true if this is a sequence level coordinate system
  Returntype : 1 or 0
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ is_top_level()

public Boolean Bio::EnsEMBL::CoordSystem::is_top_level ( )
  Arg [1]    : none
  Example    :
if($coord_sys->is_top_level()) { ... }
  Description: Returns true if this is the toplevel pseudo coordinate system.
               The toplevel coordinate system is not a real coordinate system
               which is stored in the database, but it is a placeholder that
               can be used to request transformations or retrievals to/from
               the highest defined coordinate system in a given region.
  Returntype : 1 or 0
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ name()

public String Bio::EnsEMBL::CoordSystem::name ( )
  Arg [1]    : (optional) string $name
  Example    :
print $coord_system->name();
  Description: Getter for the name of this coordinate system
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::CoordSystem::new ( )
  Arg [..]   : List of named arguments:
               -NAME      - The name of the coordinate system
               -VERSION   - (optional) The version of the coordinate system.
                            Note that if the version passed in is undefined,
                            it will be set to the empty string in the
                            resulting CoordSystem object.
               -RANK      - The rank of the coordinate system. The highest
                            level coordinate system should have rank 1, the
                            second highest rank 2 and so on.  An example of
                            a high level coordinate system is 'chromosome' an
                            example of a lower level coordinate system is
                            'clone'.
               -TOP_LEVEL - (optional) Sets whether this is a top-level coord
                            system. Default = 0. This should only be set to
                            true if you are creating an artificial toplevel
                            coordsystem by the name of 'toplevel'
               -SEQUENCE_LEVEL - (optional) Sets whether this is a sequence
                            level coordinate system. Default = 0
               -DEFAULT   - (optional)
                            Whether this is the default version of the 
                            coordinate systems of this name. Default = 0
               -DBID      - (optional) The internal identifier of this
                             coordinate system
               -ADAPTOR   - (optional) The adaptor which provides database
                            interaction for this object
               -ALIAS_TO  - (optional) Sets an alias for a coordsystem. If set 
                            it should only be set to 'chromosome'
  Example    :
$cs = Bio::EnsEMBL::CoordSystem->new(-NAME => 'chromosome',
-VERSION => 'NCBI33',
-RANK => 1,
-DBID => 1,
-ADAPTOR => adaptor,
-DEFAULT => 1,
-SEQUENCE_LEVEL => 0);
  Description: Creates a new CoordSystem object representing a coordinate
               system.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ rank()

public Int Bio::EnsEMBL::CoordSystem::rank ( )
  Arg [1]    : none
  Example    :
if($cs1->rank() < $cs2->rank()) {
print $cs1->name(), " is a higher level coord system than",
$cs2->name(), "\n";
}
  Description: Returns the rank of this coordinate system.  A lower number
               is a higher coordinate system.  The highest level coordinate
               system has a rank of 1 (e.g. 'chromosome').  The toplevel
               pseudo coordinate system has a rank of 0.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ species()

public String Bio::EnsEMBL::CoordSystem::species ( )
  Arg [1]    : none
  Example    :
print $coord->species();
  Description: Shortcut method to get the species this CoordSystem refers to.
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ version()

public String Bio::EnsEMBL::CoordSystem::version ( )
  Arg [1]    : none
  Example    :
print $coord->version();
  Description: Getter for the version of this coordinate system.  This
               will return an empty string if no version is defined for this
               coordinate system.
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::DBSQL::DBAdaptor
Definition: DBAdaptor.pm:40
Bio::EnsEMBL::CoordSystem::name
public String name()
Bio::EnsEMBL::CoordSystem::equals
public String equals()
Bio::EnsEMBL::CoordSystem::new
public Bio::EnsEMBL::CoordSystem new()
Bio::EnsEMBL::CoordSystem
Definition: CoordSystem.pm:40
Bio::EnsEMBL::CoordSystem::alias_to
public Bio::EnsEMBL::CoordSystem alias_to()
Bio::EnsEMBL::CoordSystem::is_sequence_level
public Boolean is_sequence_level()
Bio::EnsEMBL::CoordSystem::version
public String version()
Bio::EnsEMBL::CoordSystem::rank
public Int rank()
Bio::EnsEMBL::DBSQL::DBAdaptor::new
public Bio::EnsEMBL::DBSQL::DBAdaptor new()
Bio::EnsEMBL::CoordSystem::is_default
public Boolean is_default()
Bio::EnsEMBL::CoordSystem::species
public String species()
Bio::EnsEMBL::CoordSystem::is_top_level
public Boolean is_top_level()
Bio::EnsEMBL::Storable::adaptor
public Bio::EnsEMBL::DBSQL::BaseAdaptor adaptor()