edu.uconn.mcb.lineageevolver
Class Lineage

java.lang.Object
  extended byedu.uconn.mcb.lineageevolver.Lineage
All Implemented Interfaces:
Visitable

public class Lineage
extends java.lang.Object
implements Visitable

Model of Lineages comprised of a collection of Genomes.

Author:
Hasan Khalil, Lina Pezzella

Nested Class Summary
 class Lineage.HGTDenied
          Exception thrown when HGT failed a reasonable number of times.
 
Field Summary
private  int _currentTime
          The amount of time that has passed since the beginning of evolution.
private  java.util.ArrayList _edges
          The edges we are currently processing.
private  int[] _hgtCounts
          The amount of substitions before horizontal gene transfer is to be processed.
private  int _totalTime
          The total time to process evolution.
private  GraphTopology _tree
          The tree topology to follow for this lineage.
 
Constructor Summary
Lineage(Configuration c)
          Default constructor for objects of type lineage.
 
Method Summary
private  float getCategoryDifference(Genome gnm1, Genome gnm2)
          Returns the weighted difference in Lake's categories between two Genomes.
 Genome[] getTopLevel()
          Returns the top level of genomes in this lineage.
 void hgt()
          Processes horizontal gene transfer by selecting two genomes weighted according to their enviornments and transfer propensities.
static void main(java.lang.String[] args)
          Main driver for LineageEvolver - runs the simulation and outputs results.
 void processTree()
          Processes evolution and hgt according to the configured tree.
 void visit(Visitor v)
          Method to visit this visitable object with a visitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_edges

private java.util.ArrayList _edges
The edges we are currently processing.


_tree

private GraphTopology _tree
The tree topology to follow for this lineage. This tree must have all of its leaf nodes terminate at exactly the same aggregate time interval (counting time intervals on all branches between the root of the tree and each leaf).


_hgtCounts

private int[] _hgtCounts
The amount of substitions before horizontal gene transfer is to be processed.


_currentTime

private int _currentTime
The amount of time that has passed since the beginning of evolution.


_totalTime

private int _totalTime
The total time to process evolution.

Constructor Detail

Lineage

public Lineage(Configuration c)
Default constructor for objects of type lineage.

Parameters:
c - the configuration file for this lineage.
Method Detail

hgt

public void hgt()
         throws Lineage.HGTDenied
Processes horizontal gene transfer by selecting two genomes weighted according to their enviornments and transfer propensities.

First, generates relative pairwise probabilites for compatbility between Genomes based on similarites in Lake Category variables. Then uses a RandomSelection object to select one pair of Genomes randomly, weighted according to the calculated probabilities. Randomly determines (with no weighting) which of the genomes in the pair will fill origin and destination roles. Recombination is delegated to the Genome via Genome.hgt(Genome)

Throws:
Lineage.HGTDenied - If HGT was repeatedly not processed.
See Also:
RandomSelection, Genome.hgt(Genome)

getTopLevel

public Genome[] getTopLevel()
Returns the top level of genomes in this lineage.

Returns:
the top level of genomes in this lineage.

processTree

public void processTree()
Processes evolution and hgt according to the configured tree.


getCategoryDifference

private float getCategoryDifference(Genome gnm1,
                                    Genome gnm2)
Returns the weighted difference in Lake's categories between two Genomes.

Parameters:
gnm1 - the first genome.
gnm2 - the second genome.
Returns:
the weighted difference in Lake's categories between the two Genomes.

visit

public void visit(Visitor v)
Description copied from interface: Visitable
Method to visit this visitable object with a visitor.

Specified by:
visit in interface Visitable
Parameters:
v - the visitor with which to visit this visitable object.
See Also:
Visitable.visit(edu.uconn.mcb.lineageevolver.misc.Visitor)

main

public static void main(java.lang.String[] args)
Main driver for LineageEvolver - runs the simulation and outputs results. This driver manually constructs a topology and reads initial genome configuration from the file specified by the first argument, or LineageEvolver.xml if not specified.

This is the place to add custom topologies, events, etc.

Parameters:
args - Should be an array containing one variable: the path to the input configuration file.