|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoftparsmap.Node
softparsmap.SpeciesNode
Defines a species node in a species tree.
Constructor Summary | |
SpeciesNode(DataSource dataSource,
int label)
Constructs a species node given a data source and the label. |
Method Summary | |
static SpeciesNode |
computeLca(java.util.Set species)
Returns the last common ancestor of the given set of species nodes. |
static SpeciesNode |
computeLca(SpeciesNode na,
SpeciesNode nb)
Returns the last common ancestor of the two given species nodes. |
DataSource |
getDataSource()
Returns the data source for this species node. |
PropertyFile |
getPropertyFile()
Returns the property file. |
Mutation |
inferMutation(GeneNode geneNode,
boolean collapseWeakEdges,
Inparalogous inparalogous)
Infers duplications and loss using this species subtree. |
boolean |
isBelow(SpeciesNode s)
Returns true if this node is below given node. |
boolean |
isOnSameRootPath(SpeciesNode s)
Returns true if this node and the given node is on the same root path. |
java.util.List |
minimizeMutation(GeneNode geneTree,
boolean collapseEdges,
Inparalogous inparalogous)
Returns a list of rooted gene trees. |
static SpeciesNode |
nextNodeS(DataSource ds)
Return the next unique labeled species node. |
static SpeciesNode |
parseNewick(DataSource ds,
java.lang.String treeText)
Parse a string in Neiwck format with gene sequences in the inner bracket. |
int |
setPreorder()
Preorder this tree will give every species node two numbers. |
java.lang.String |
toNewick()
Returns the subtree in Newick format. |
Methods inherited from class softparsmap.Node |
addChild, compareTo, equals, findLCA, getChildren, getLabel, getLeaves, getMap, getNodes, getParent, getRoot, getSplits, hasChildren, hashCode, isBinaryTree, isConsistentWith, isRoot, nextUnique, numChildren, pruneOneChildNodes, removeChild, setMap, setNextUnique, toString, toStringAll, toStringTable, toStringTree |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SpeciesNode(DataSource dataSource, int label)
dataSource
- is the data source where the species tree was created.label
- is label of the species nodeMethod Detail |
public DataSource getDataSource()
public PropertyFile getPropertyFile()
public static SpeciesNode computeLca(java.util.Set species)
setPreorder()
has been run.
species
- is a set of species nodes
public static SpeciesNode computeLca(SpeciesNode na, SpeciesNode nb)
public int setPreorder()
isBelow(softparsmap.SpeciesNode)
and isOnSameRootPath(softparsmap.SpeciesNode)
are
two methods that can be run in constant time after this method
has been called.
public boolean isBelow(SpeciesNode s)
s
- is the given species node
public boolean isOnSameRootPath(SpeciesNode s)
public java.util.List minimizeMutation(GeneNode geneTree, boolean collapseEdges, Inparalogous inparalogous)
geneTree
- is the unrooted gene treecollapseEdges
- if true weak edges will be collapsed if it
gives lower mutationinparalogous
- is the inparalogous handler
public Mutation inferMutation(GeneNode geneNode, boolean collapseWeakEdges, Inparalogous inparalogous)
geneNode
- is the rooted gene treecollapseWeakEdges
- if true the method will collapse weak edges
when it gives lower mutationinparalogous
- is the inparalogous handler and decides if
inparalogous should be removed before counting mutation
public java.lang.String toNewick()
public static SpeciesNode parseNewick(DataSource ds, java.lang.String treeText)
InferMutation
to see
an example.
ds
- is the data sourcetreeText
- is the species tree in text format
public static SpeciesNode nextNodeS(DataSource ds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |