com.objex.panywhere
Class Chromosome

java.lang.Object
  extended by com.objex.panywhere.Chromosome
All Implemented Interfaces:
java.io.Serializable

public class Chromosome
extends java.lang.Object
implements java.io.Serializable

Class defines the makeup of a Chromosome object. Among other things defined by this class are the markers that contain the Allele pairs for each chromosome indicating which alleles have been inherited from which parent. This class was introcuded in release 1.01 of the Pedigree Javabean to enable the tracking, manipulation and rendering of genetic/haplotype data on the Pedigree.

Since:
Introduced version 1.01
See Also:
Serialized Form

Constructor Summary
Chromosome()
          Creates a new Chromosome instance.
 
Method Summary
 void addMarker(ChromosomeMarker marker)
          Adds the specified marker to the list of markers making up this Chromosome exists.
 Chromosome cloneChromosome()
          A new Chromosome with the same marker and allele properties and this Chromosome or an empty chromosome if an error was encountered in the cloning process.
 ChromosomeMarker getMarker(java.lang.String name)
           
 java.util.Map getMarkers()
          Getter for property markers.
 java.lang.String getName()
          Getter for property name.
 int getNextMarkerSequence()
          Getter for property nextMarkerSequence.
 void setMarkers(java.util.Map rhs)
          Setter for property markers.
 void setName(java.lang.String rhs)
          Setter for property name.
 void setNextMarkerSequence(int rhs)
          Setter for property nextMarkerSequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chromosome

public Chromosome()
Creates a new Chromosome instance. A chromosome with default name of "1" is created

Method Detail

getMarker

public ChromosomeMarker getMarker(java.lang.String name)
Parameters:
name - The marker ID or name
Returns:
A Marker whose name is specified or NULL if no such marker with that name exists

addMarker

public void addMarker(ChromosomeMarker marker)
Adds the specified marker to the list of markers making up this Chromosome exists. This is the point at which the class loading is done if no Hashmap had been created for carrying the markers for this chromosome.

Parameters:
marker - The new chromosome marker to be added

getMarkers

public java.util.Map getMarkers()
Getter for property markers. The markers that make up this chromosome. A chromosome will have any number of markers. If all the Maternal markers of a chromosome have been inherited from one parent then the result is a linked set of Alleles inherited together making up a Haplotype. Each marker in the markers map is retrivable using the marker ID/name but the actual key used is the marker object itself so that its Comparable interface is automatically used to sort marker objects inside a collection such as SortedMap etc.

Returns:
A Map object containing the markers making up this chromosome. The map is an ordered treemap where the markers are ordered by sequence number

setMarkers

public void setMarkers(java.util.Map rhs)
Setter for property markers. The markers that make up this chromosome. A chromosome will have any number of markers. If all the Maternal markers of a chromosome have been inherited from one parent then the result is a linked set of Alleles inherited together making up a Haplotype. Each marker in the markers map is retrivable using the marker ID/name.

Parameters:
rhs - A Map containg the new markers for the chromosome

getName

public java.lang.String getName()
Getter for property name. Default ID/Name for chromosome is "1"

Returns:
Value of property name. The name of the Chromosome e.g. X, Y or some other ID

setName

public void setName(java.lang.String rhs)
Setter for property name. Sets the name of the Chromosome e.g. X, Y or some other ID. Default ID/Name for chromosome is "1"

Parameters:
rhs - New value of property name.

getNextMarkerSequence

public int getNextMarkerSequence()
Getter for property nextMarkerSequence.

Returns:
Value of property nextMarkerSequence.

setNextMarkerSequence

public void setNextMarkerSequence(int rhs)
Setter for property nextMarkerSequence.

Parameters:
rhs - New value of property nextMarkerSequence.

cloneChromosome

public Chromosome cloneChromosome()
A new Chromosome with the same marker and allele properties and this Chromosome or an empty chromosome if an error was encountered in the cloning process.