|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoftparsmap.Node
softparsmap.GeneNode
Defines a gene node in a gene tree.
Constructor Summary | |
GeneNode(EdgeType edgeType,
int label)
Constructs a gene node given an edge type and a label. |
|
GeneNode(EdgeType edgeType,
int label,
double edge)
Constructs a gene node given an edge type, edge value, and label. |
Method Summary | |
GeneNode |
cloneNode()
Returns a copy of this GeneNode. |
GeneNode |
cloneTree()
Returns a copy of this subtree. |
java.util.Set |
collapsedEdges()
Return all nodes in the subtree where their collapse flag is set to true. |
void |
collapseEdges()
Collapsing all edges in this subtree where the collapsed flag is set. |
int |
countDuplications()
Returns the number of duplications in this subtree. |
int |
countGeneLosses()
Returns the number of losses in this subtree. |
Mutation |
countMutation()
Returns the number of duplications and losses in this subtree. |
int |
countStrongEdges()
Counting the number of strong edges in this subtree. |
boolean |
duplicatedNode()
Returns true if this node is duplicated. |
GeneLeaf |
findLeaf(GeneLeaf leaf)
Returns the leaf with the same label as given leaf. |
GeneLeaf |
findLeaf(int label)
Returns the leaf with given label. |
GeneNode |
findNode(GeneNode node)
Returns the gene node that exists in this subtree and has the same label. |
GeneNode |
findNodeForUnrootedSplit(java.util.Set splitLeavesA,
java.util.Set splitLeavesB)
Returns the gene node that harbor the split that contain the leaf set 'splitLeavesA'. |
ChildIterator |
getChildIterator()
Returns the child iterator for this node. |
boolean |
getCollapsedEdge()
Returns true if the node is flagged collapsed. |
java.util.Set |
getDuplicatedNodes()
Returns the set of all duplicated nodes in this subtree. |
int |
getDuplicationsNode()
Returns the number of duplications this node causes given a species tree. |
EdgeType |
getEdgeType()
Returns the edge type of the edge that belong to this node. |
double |
getEdgeValue()
Returns the edge value. |
Family |
getFamily()
Returns the family that this node belongs to. |
int |
getGeneLossesNode()
Returns the number of gene losses this node causes given a species tree. |
java.util.Set |
getInternalNodes()
Return all internal nodes in this subtree. |
SpeciesNode |
getM()
See the m-map in the article. |
java.util.Set |
getMM()
See the M-map in the article. |
PropertyFile |
getPropertyFile()
Returns the property file. |
java.util.Set |
getSL()
See the SL function in the article. |
boolean |
hasFamily()
Returns true if this node has a family. |
boolean |
hasM()
Returns true if M has been set. |
boolean |
hasMM()
Returns true if the M-map has been set. |
boolean |
hasSL()
Returns true if SL has been set. |
void |
insertSpeciesTreeSplits()
Insert splits from the species tree if it does not increase the minimum number of duplications and gene loss. |
boolean |
isEdgeWeak()
Returns true if the edge for this node is weak, else false. |
static GeneNode |
nextNode(EdgeType edgeType)
Return the next unique node with given edge type. |
static GeneNode |
nextNode(EdgeType edgeType,
double value)
Returns the next unique node with edge with give value and edge type. |
Node |
pruneOneChildNodes()
Collapsing all internal nodes with only one child node. |
GeneNode |
reroot()
Re-rooting the gene tree that this gene tree is a part of, using midpoint re-rooting. |
GeneNode |
rerootThis()
Re-rooting the gene tree that this node is a part of. |
GeneNode |
resolveUncertainties(GeneNode originalTree)
Try to resolve all uncertainties in this rooted gene tree using the original unrooted gene tree. |
boolean |
rootedEquals(GeneNode root)
Returns true if this subtrees have the same rooted topology as the given subtree. |
GeneNode |
setCollapsedEdge(boolean collapsedEdge)
Sets the collapsed flag to given value. |
GeneNode |
setEdge(EdgeType edgeType,
double edge)
Sets the edge type and edge value for this node. |
GeneNode |
setEdgeType(EdgeType edgeType)
Sets the edge type for this node. |
GeneNode |
setEdgeValue(double edge)
Sets the edge value for the edge that belongs to this node. |
void |
setFamily(Family family)
Sets the family that this node belongs to. |
void |
setFamilyTree(Family family)
Sets the family for this subtree. |
void |
setNewLabel()
Reassigns the label of this node to a new unique number. |
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, removeChild, setMap, setNextUnique, toString, toStringAll, toStringTable, toStringTree |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GeneNode(EdgeType edgeType, int label)
edgeType
- is the edge type that the edge of this node belong to.label
- is the label of this nodeEdgeType
public GeneNode(EdgeType edgeType, int label, double edge)
edgeType
- is the edge type that the edge of this node belong to.label
- is the label of this nodeedge
- is the edge value of this nodeEdgeType
Method Detail |
public Family getFamily()
Family
public void setFamily(Family family)
family
- is the family that this node belong topublic void setFamilyTree(Family family)
family
- is the family for this subtreepublic boolean hasFamily()
public GeneNode resolveUncertainties(GeneNode originalTree)
originalTree
- is the original unrooted gene tree.
public EdgeType getEdgeType()
public PropertyFile getPropertyFile()
public GeneNode findNodeForUnrootedSplit(java.util.Set splitLeavesA, java.util.Set splitLeavesB)
splitLeavesA
- is the first set that defines a splitsplitLeavesB
- is the second set that defines a split
GeneLeaf
public void collapseEdges()
public void insertSpeciesTreeSplits()
public void setNewLabel()
public java.util.Set getInternalNodes()
public int countStrongEdges()
public java.util.Set collapsedEdges()
public GeneNode cloneNode()
public GeneNode cloneTree()
public GeneLeaf findLeaf(int label)
label
- is a label
GeneLeaf
public GeneLeaf findLeaf(GeneLeaf leaf)
leaf
- is the leaf
GeneLeaf
public GeneNode findNode(GeneNode node)
node
- the node to look for.
public GeneNode reroot()
rerootThis()
.
public GeneNode rerootThis()
public boolean rootedEquals(GeneNode root)
root
- is the root of the subtree that this subtree will
be compared against
public GeneNode setEdgeValue(double edge)
edge
- is the new edge value.
public GeneNode setEdge(EdgeType edgeType, double edge)
edgeType
- is the edge typeedge
- is the new edge value
public GeneNode setEdgeType(EdgeType edgeType)
edgeType
- is the edge type for this node
public int getDuplicationsNode()
public int getGeneLossesNode()
public boolean duplicatedNode()
getDuplicationsNode()
>0public SpeciesNode getM()
public boolean hasM()
public java.util.Set getMM()
SpeciesNode
public boolean hasMM()
public java.util.Set getSL()
SpeciesNode
public boolean hasSL()
public ChildIterator getChildIterator()
ChildIterator
public Mutation countMutation()
public int countGeneLosses()
public int countDuplications()
public java.util.Set getDuplicatedNodes()
public GeneNode setCollapsedEdge(boolean collapsedEdge)
collapsedEdge
- is new value of the collapsed flag
public boolean getCollapsedEdge()
public double getEdgeValue()
public Node pruneOneChildNodes()
pruneOneChildNodes
in class Node
public boolean isEdgeWeak()
public static GeneNode nextNode(EdgeType edgeType, double value)
value
- is the edge valueedgeType
- is the edge type
public static GeneNode nextNode(EdgeType edgeType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |