|
FORESTER 1.9 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--forester.tools.SDIunrooted
Allows to infer duplications - speciations on a unrooted gene tree. It reroots the gene trees on each of its branches and performs SDIse on each of the resulting trees. Trees which minimize a certain criterion are returned as the "correctly" rooted ones. The criterions are:
SDIse
,
SDI
Constructor Summary | |
SDIunrooted()
Default contructor which creates an "empty" SDIunrooted object. |
Method Summary | |
(package private) Tree |
fastInfer(Tree gene_tree,
Tree species_tree)
This method is mainly to be used by the RIO classes as the returned tree is quite incomplete -- for improved time efficiency (number of external nodes of each Node are off, will have lost most annotations). |
int |
getCount()
Returns the number of differently rooted trees which minimize the (rooting) "criterion" - as determined by method "infer". |
double |
getMinimalDiffInSubTreeHeights()
Returns the (absolue value of the) minimal difference in tree heights of the two subtrees at the root (of the (re)rooted gene tree) - as determined by method "infer" - if minimize_height is set to true. |
int |
getMinimalDuplications()
Returns the minimal number of duplications - as determined by method "infer". |
int |
getMinimalMappingCost()
Returns the minimal mapping cost L - as determined by method "infer" - if minimize_mapping_cost is set to true. |
double |
getMinimalTreeHeight()
Returns the minimal tree height - as determined by method "infer" - if minimize_height is set to true. |
long |
getTimeSumSDI()
Returns the sum of times (in ms) needed to run method infer of class SDI. |
Tree[] |
infer(Tree gene_tree,
Tree species_tree,
boolean minimize_mapping_cost,
boolean minimize_sum_of_dup,
boolean minimize_height,
boolean return_trees,
int max_trees_to_return)
Infers gene duplications on a possibly unrooted gene Tree gene_tree. |
static void |
main(java.lang.String[] args)
Main method for this class. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public SDIunrooted()
Method Detail |
public int getCount()
#infer(Tree,Tree,boolean,boolean,boolean,boolean,int,boolean)
public int getMinimalDuplications()
IMPORTANT: If the tree is not rooted by minimizing the sum of duplications or the mapping cost L, then this number is NOT NECESSARILY the MINIMAL number of duplications.
#infer(Tree,Tree,boolean,boolean,boolean,boolean,int,boolean)
public int getMinimalMappingCost()
(Last modified: 11/07/00)
#infer(Tree,Tree,boolean,boolean,boolean,boolean,int,boolean)
public double getMinimalTreeHeight()
(Last modified: 01/12/00)
#infer(Tree,Tree,boolean,boolean,boolean,boolean,int,boolean)
public double getMinimalDiffInSubTreeHeights()
If a tree is midpoint rooted this number is zero.
IMPORTANT: If minimize_mapping_cost or minimize_sum_of_dup are also set to true, then this returns the minimal difference in tree heights of the trees which minimize the first criterion, and is therefore not necessarily zero.
(Last modified: 01/22/00)
#infer(Tree,Tree,boolean,boolean,boolean,boolean,int,boolean)
public long getTimeSumSDI()
public Tree[] infer(Tree gene_tree, Tree species_tree, boolean minimize_mapping_cost, boolean minimize_sum_of_dup, boolean minimize_height, boolean return_trees, int max_trees_to_return) throws java.lang.Exception
Conditions:
(Last modified: 10/01/01)
gene_tree
- a binary (except deepest node)
gene Treespecies_tree
- a rooted binary species Treeminimize_mapping_cost
- set to true to root by minimizing the
mapping cost L (and also the
sum of duplications)minimize_sum_of_dup
- set to true to root by minimizing
the sum of duplicationsminimize_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 chosenreturn_trees
- set to true to return Array of Trees,
otherwise null is returnedmax_trees_to_return
- maximal number of Trees to return
(=maximal size of returned Array)
must be no lower than 1Tree fastInfer(Tree gene_tree, Tree species_tree) throws java.lang.Exception
It makes use of the fact that after each rerooting most of the mapping function does not need to be recalculated. If the root is only moved one branch at a time, the mapping function needs to be recalculated only for the new root and one of its children.
This method always roots by minimizing the sum of duplication, followed by selection of the tree with minimal height. It always uses SDIse.
(In order to be able to write the returned Tree to a file, method Tree.adjustNodeCount() must be called on it.)
Conditions:
(Last modified: 06/12/01)
gene_tree
- a binary (except deepest node)
gene Treespecies_tree
- a rooted binary species Treepublic static void main(java.lang.String[] args)
(Last modified: 01/11/01)
[args[0]
- -l to root by minimizing mapping cost L][args[0]
- -d to root by minimizing sum of duplications][args[0]
- -h to root by minimizing tree height][args[0]
- -x use fast infer, always minimizes sum of duplications|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]
- species tree file name (in NHX format with
species names in species name fields;
unless -n option is used)args[1or2]
- gene tree file name (in NHX format with
species names in species name fields and sequence names
in sequence name fields; unless -n option is used)
|
FORESTER 1.9 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |