FORESTER 1.6

forester.tools
Class SDIse

java.lang.Object
  |
  +--forester.tools.SDI
        |
        +--forester.tools.SDIse

public class SDIse
extends SDI

Implements our algorithm for speciation - duplication inference (SDI).

Reference:

The initialization is accomplished by:

The recursion part is accomplished by this class' method "geneTreePostOrderTraversal(Node)".

Requires JDK 1.2 or greater.

Version:
1.020 -- last modified: 01/11/01
Author:
Christian M. Zmasek
See Also:
SDI.linkExtNodesOfG(), Tree.preorderReID(int), SDI.stripTree(Tree,Tree), geneTreePostOrderTraversal(Node)

Fields inherited from class forester.tools.SDI
c, duplications, genetree, speciestree
 
Constructor Summary
SDIse(Tree gene_tree, Tree species_tree)
          Constructor which sets the gene tree and the species tree to be compared.
 
Method Summary
(package private)  void geneTreePostOrderTraversal(Node g)
          Traverses the subtree of Node g in postorder, calculating the mapping function M, and determines which nodes represent speciation events and which ones duplication events.
 int infer(boolean strip_species_tree)
          Infers for each Node of gene_tree (set in constructor) whether it represents a speciation or duplication event by calculating and interpreting the mapping function M.
 
Methods inherited from class forester.tools.SDI
computeMappingCost, linkExtNodesOfG, main, stripTree
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDIse

public SDIse(Tree gene_tree,
             Tree species_tree)
      throws java.lang.Exception
Constructor which sets the gene tree and the species tree to be compared. species_tree is the species tree to which the gene tree gene_tree will be compared to - with method "infer(boolean)". Both Trees must be completely binary and rooted. The actual inference is accomplished with method "infer(boolean)". The mapping cost L can then be calculated with method "computeMappingCost()".

(Last modified: 01/11/01)

Parameters:
gene_tree - reference to a rooted binary gene Tree to which assign duplication vs speciation, must have species names in the species name fields for all external nodes
species_tree - reference to a rooted binary species Tree which might get stripped in the process, must have species names in the species name fields for all external nodes
See Also:
infer(boolean), SDI.computeMappingCost()
Method Detail

infer

public int infer(boolean strip_species_tree)
          throws java.lang.Exception
Infers for each Node of gene_tree (set in constructor) whether it represents a speciation or duplication event by calculating and interpreting the mapping function M. The most parsimonious sequence of speciation and duplication events is assumed.

(Last modified: 01/11/01)

Overrides:
infer in class SDI
Parameters:
strip_species_tree - set to true to remove from the species tree species not found in the gene tree prior to analysis (optional)
Returns:
number of duplications which have been assigned in gene_tree
See Also:
SDIse(Tree,Tree)

geneTreePostOrderTraversal

void geneTreePostOrderTraversal(Node g)
Traverses the subtree of Node g in postorder, calculating the mapping function M, and determines which nodes represent speciation events and which ones duplication events.

Preconditions: Mapping M for external nodes must have been calculated and the species tree must be labelled in preorder.

(Last modified: 01/11/01)

Parameters:
g - starting node of a gene tree - normally the root

FORESTER 1.6