FORESTER 1.7

forester.tools
Class SDIdirectory

java.lang.Object
  |
  +--forester.tools.SDIdirectory

public class SDIdirectory
extends java.lang.Object

Allows to infer duplications - speciations on all (rooted or unrooted) gene trees in a directory by using method "infer" of class SDIunrooted.

The output of this is a (re)rooted tree with speciation - duplication assigned (in NHX format) for each tree (in "gene tree directory" with suffix "suffix for gene trees"), as well as a summary list ("outputfile name").

The summary list contains the following. The number in brackets indicates how many external nodes of the gene tree had to be removed since the associated species was not found in the species tree. "en" indicates the number of external nodes in the resulting (analyzed and returned) gene tree. "x" indicates how many differently rooted trees minimized the criterion. "d" are the number of duplications, "L=" the mapping cost, "h=" the height, "d=" the minimal difference in tree heights (of the two subtrees at the root; this number is 0.0 for a midpoint rooted tree) of the resulting, analyzed and rooted gene tree(s).

The output file ending with "_Sdist" is a file which lists the distribution of trees sizes, "_Ddist" lists the distribution of the sums of duplications (up to a certain maximal size, set with final variables MAX_EXT_NODE_DIST and MAX_DUP_DIST).

Version:
1.200 -- last modified: 02/02/01
Author:
Christian M. Zmasek
See Also:
SDIunrooted

Constructor Summary
SDIdirectory()
           
 
Method Summary
static void infer(java.io.File indir, java.io.File species_tree_file, java.io.File outdir, java.io.File outfile, java.lang.String suffix, boolean write_trees, boolean minimize_mapping_cost, boolean minimize_sum_of_dup, boolean minimize_height, boolean use_eulenstein, boolean input_trees_in_nh)
          Runs method "infer" of class SDIunrooted on all gene trees in directory indir.
static void main(java.lang.String[] args)
          Main method for this class.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDIdirectory

public SDIdirectory()
Method Detail

infer

public static void infer(java.io.File indir,
                         java.io.File species_tree_file,
                         java.io.File outdir,
                         java.io.File outfile,
                         java.lang.String suffix,
                         boolean write_trees,
                         boolean minimize_mapping_cost,
                         boolean minimize_sum_of_dup,
                         boolean minimize_height,
                         boolean use_eulenstein,
                         boolean input_trees_in_nh)
                  throws java.lang.Exception
Runs method "infer" of class SDIunrooted on all gene trees in directory indir.

Trees are rooted by minimizing either the sum of duplications, the mapping cost L, or the tree height (or combinations thereof). One resulting tree for each (out of possibly many) is stored in outdir and a summary outfile is created. The distributions of the tree sizes (name of outfile + _Ddist) and the distributions of the sum of duplications per tree (name of outfile + _Sdist) are written out as well.

If both minimize_sum_of_dup and minimize_mapping_cost are true, trees are rooted by minimizing by minimizing the mapping cost L.

If minimize_sum_of_dup, minimize_mapping_cost, and minimize_height are false trees are assumed to be alreadty rooted.

(Last modified: 02/02/01)

Parameters:
indir - a directory containing gene trees in NHX format
species_tree_file - a species tree file in NHX format
outdir - a directory where to write trees
outfile - a file name for the summary file
suffix - a suffix for the trees to read (e.g. nhx), is case sensitive
write_trees - set to true to write out one tree with minmal duplications or L each
minimize_mapping_cost - set to true to root by minimizing the mapping cost L
minimize_sum_of_dup - set to true to root by minimizing the sum of duplications
minimize_height - set to true to root by minimizing the tree height -- if minimize_mapping_cost is set to true or minimize_sum_of_dup is set to true, then out of the resulting trees with minimal mapping cost or minimal number of duplications the tree with the minimal height is chosen
use_eulenstein - set to true to use Eulenstein's algorithm, otherwise the SDIse algorithm is used for the duplication inference
input_trees_in_nh - set to true if input trees are in New Hampshire format instead of NHX; or gene trees are in NHX, but species information in gene trees is only present in the form of SWISS-PROT sequence names
See Also:
SDIunrooted.infer(Tree,Tree,boolean,boolean,boolean,boolean,int,boolean)

main

public static void main(java.lang.String[] args)
Main method for this class.

(Last modified: 01/13/01)

Parameters:
[args[0] - -e to use Eulenstein's algorithm instead of SDIse]
[args[0] - -l to root by minimizing mapping cost L]
[args[0] - -d to root by minimizing sum of duplications]
[args[0] - -w to write out trees into outdir]
[args[0] - -h to root by minimizing tree height]
[args[0] - -n input trees are in New Hampshire format instead of NHX -- or gene tree is in NHX, but species information in gene tree is only present in the form of SWISS-PROT sequence names]
args[0or1] - trees directory name
args[1or2] - suffix for gene trees
args[2or3] - speciestree file name
args[3or4] - output directory name
args[4or5] - output file name

FORESTER 1.7