com.objex.progeny.anywhere.data
Class MarkerData

java.lang.Object
  extended by com.objex.progeny.anywhere.data.MarkerData
All Implemented Interfaces:
java.io.Serializable

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

MarkerData contains a map of chromosomes that define the genetic data of a person.

See Also:
Chromosome, ChromosomeMarker, Serialized Form

Constructor Summary
MarkerData()
          Creates a new instance of MarkerData
 
Method Summary
 void addChromosome(Chromosome a_chromosome)
          Add a new chromosome to the genetic data map
 MarkerData clone()
           
 Chromosome getChromosome(int ai_chromoid)
           
 java.util.Map<java.lang.Integer,Chromosome> getChromosomes()
           
 ChromosomeMarker getMarker(java.lang.String as_name)
           
 java.util.Iterator<Chromosome> iterator()
           
 java.util.Iterator<ChromosomeMarker> iterator(boolean ab_chromosome_order)
           
 int markersCount()
           
 void setChromosomes(java.util.Map<java.lang.Integer,Chromosome> a_chromosomes)
          Sets a new map of chromosomes keyed by chromosome ID.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkerData

public MarkerData()
Creates a new instance of MarkerData

Method Detail

setChromosomes

public void setChromosomes(java.util.Map<java.lang.Integer,Chromosome> a_chromosomes)
Sets a new map of chromosomes keyed by chromosome ID.

Parameters:
a_chromosomes - The new map of chromosomes keyed by chromosome ID.

getChromosomes

public java.util.Map<java.lang.Integer,Chromosome> getChromosomes()
Returns:
The current map of chromosomes keyed by chromosome ID.

getChromosome

public Chromosome getChromosome(int ai_chromoid)
Parameters:
ai_chromoid - The ID of the chromosome to be retrieved
Returns:
The chromosome with specified ID

addChromosome

public void addChromosome(Chromosome a_chromosome)
Add a new chromosome to the genetic data map

Parameters:
a_chromosome - The new chromosome

iterator

public java.util.Iterator<Chromosome> iterator()
Returns:
An iterator of chromosomes in chromosome sequence. The sequence is determined when the chromosomes are added to the genetic data map

markersCount

public int markersCount()
Returns:
Number of markers on all the chromosomes making up this genetic data object. If there are 10 chromosomes and each with 5 markers, then 50 will be returned.

getMarker

public ChromosomeMarker getMarker(java.lang.String as_name)
Parameters:
as_name - The name of the marker to be retrieved.
Returns:
The marker with the specified name or NULL if no such marker exists on any chromosome in the genetic data map

iterator

public java.util.Iterator<ChromosomeMarker> iterator(boolean ab_chromosome_order)
Parameters:
ab_chromosome_order - If true then markers will be returned in chromosome order and then by marker sequence within a chromosome. Otherwise the order will be marker sequence regardless of what chromosome the marker is on.
Returns:
An Iterator of all markers on all chromosomes on this marker set.

clone

public MarkerData clone()
Overrides:
clone in class java.lang.Object
Returns:
create a new GeneticData with same chromosomes and markers as this one