NAME - EEDB::Chrom

SYNOPSIS

An object to encapsulate a Chromosome within an Assembly.

DESCRIPTION

An object that corresponds to specific chromosomes within an assembly. Because Chrom is tied to a specific assembly, an instance of a Chrom identifies not only the chromosome, but also the assembly and species

As with all objects in EEDB, Chrom interits from MQdb::DBObject and MQdb::MappedQuery. Please refer to these documents for all superclass methods

CONTACT

Jessica Severin <severin@gsc.riken.jp>

LICENSE

* Software License Agreement (BSD License)
* EdgeExpressDB [eeDB] system
* copyright (c) 2007-2009 Jessica Severin RIKEN OSC
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*     * Redistributions of source code must retain the above copyright
*       notice, this list of conditions and the following disclaimer.
*     * Redistributions in binary form must reproduce the above copyright
*       notice, this list of conditions and the following disclaimer in the
*       documentation and/or other materials provided with the distribution.
*     * Neither the name of Jessica Severin RIKEN OSC nor the
*       names of its contributors may be used to endorse or promote products
*       derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

set_cache_behaviour

Description  : class level method to turn on/off global caching of Chromsome objects
               since these are very small and used heavily, it is on my default 
               and it is recommended to not turn it off.
Parameter[1] : scalar 0/1 to turn the caching off/on
Returntype   : none
Exceptions   : none

get_cache_size

Description : get count of Chroms currently in the memory cache
Returntype  : scalar count
Exceptions  : none

init

Description: initialize a new instance of this object.
             generally not needed for users to call this method
Returntype : $self
Exceptions : none

chrom_name

Description  : simple getter/setter method for the chromosome name
Parameter[1] : <optional> if specififed it will set the chromsome name
Returntype   : string
Exceptions   : none

chrom_type

Description  : simple getter/setter method for the chromosome type
Parameter[1] : <optional> if specififed it will set the chromsome type
Returntype   : string
Exceptions   : none

description

Description  : simple getter/setter method for the chromosome description
Parameter[1] : <optional> if specififed it will set the chromsome description
Returntype   : string
Exceptions   : none

assembly

Description  : simple getter/setter method for the Assembly of this Chrom
Parameter[1] : <optional> of type EEDB::Assembly. if specififed it will set the assembly
Returntype   : EEDB::Assembly instance
Exceptions   : none

chrom_length

Description  : simple getter/setter method for the chromosome length
Parameter[1] : <optional scalar> if specififed it will set the chromsome length
Returntype   : scalar
Exceptions   : none

display_desc

Description  : overrides the superclass method.  
               returns a debugging description of this instance.
               calling display_info() will print this display_desc to STDOUT
Returntype   : string
Exceptions   : none

xml_start

Description  : overrides the superclass method.  
               returns the start of the XML description of this instance
Returntype   : string
Exceptions   : none

xml_end

Description  : overrides the superclass method.  
               returns the end tag of the XML description of this instance
Returntype   : string
Exceptions   : none

xml

Description  : overrides the superclass method.  
               returns the complete XML description of this instance
Returntype   : string
Exceptions   : none

get_subsequence

Description  : uses ChromChunk objects and the sequence in the database to 
               return the actual sequence in this region. Since the
               Chrom is assigned to a specific Assembly one only needs to specify
               the start/end and an optional strand to fetch the sequence.
Parameter[1] : chrom_start 
               the chromosome start of the region to fetch
Parameter[2] : chrom_end  
               the chromosome end of the region to fetch
Parameter[3] : strand <optional> as "-" or "+"
               the strand of the sequence. if "-" then it will return the sequence 
               on the reverse strand by reverse complementing the sequence
Returntype   : Bio::Seq instance or undef if a data error happens
Errors       : if the region is not valid or if data is not present it will return undef
Exceptions   : none

store

Description  : store this instance into an EEDB database
               on return the instance will have the primary_id() set.
Parameter[1] : a MQdb::Database to store into
Returntype   : $self or undef if a problem occurred
Exceptions   : none

update

Description  : updates the data of this instance. require the Chrom to have been
               fetched from database. It must have database() and primary_id()
Returntype   : $self
Exceptions   : none