softparsmap
Interface Inparalogous

All Known Implementing Classes:
AbstractInparalogous

public interface Inparalogous

This interface is responsible of handling inparalogous.


Method Summary
 boolean allLeavesIsFromSameSpecies(GeneNode node)
          Returns true if all gene leaves are coming from the same species.
 java.util.Set getInparalogous(Family family, GeneNode node)
          Returns a set of nodes N where all nodes n in N only have in-paralogous sequences in its subtree.
 java.util.Comparator getLeafComparator(Family family)
          Returns a comparator that compare gene leaves.
 boolean removeBeforeSaving()
          Returns true iff inparalogous are removed before saving the final gene tree.
 GeneNode removeInparalogous(Family family, GeneNode root)
          Removes all inparalogous in the gene tree.
 boolean removeWhileMinimizingMutation()
          Returns true iff inparalogous are removed after each mid point re-root, before duplications and loss is counted, else false.
 void setInparalogousOrder(GeneNode root)
          When inparalogous are removed one of the gene leaves will be chosen as the final sequence to represent the species.
 

Method Detail

getInparalogous

public java.util.Set getInparalogous(Family family,
                                     GeneNode node)
Returns a set of nodes N where all nodes n in N only have in-paralogous sequences in its subtree.

Parameters:
family - is the family of the gene tree
node - is the root node of the gene tree
Returns:
a set of internal nodes where all are in-paralogous
See Also:
GeneNode, Family

allLeavesIsFromSameSpecies

public boolean allLeavesIsFromSameSpecies(GeneNode node)
Returns true if all gene leaves are coming from the same species. That is if all genes are in-paralogous.

Parameters:
node - is the root of the subtree
Returns:
true if all genes in this subtree are in-paralogous.
See Also:
GeneNode

removeInparalogous

public GeneNode removeInparalogous(Family family,
                                   GeneNode root)
Removes all inparalogous in the gene tree.

Parameters:
family - is the family of the gene tree
root - is the root node of the gene tree
Returns:
the root node for the tree where all inparalogous are removed.
See Also:
Family, GeneNode

removeWhileMinimizingMutation

public boolean removeWhileMinimizingMutation()
Returns true iff inparalogous are removed after each mid point re-root, before duplications and loss is counted, else false.

Returns:
true iff inparalogous are removed while minimizing mutation.

removeBeforeSaving

public boolean removeBeforeSaving()
Returns true iff inparalogous are removed before saving the final gene tree.

Returns:
true iff inparalogous are removed before saving the gene tree

setInparalogousOrder

public void setInparalogousOrder(GeneNode root)
When inparalogous are removed one of the gene leaves will be chosen as the final sequence to represent the species. This order that is set here will then be used.

Parameters:
root - is the root of the gene tree
See Also:
GeneNode

getLeafComparator

public java.util.Comparator getLeafComparator(Family family)
Returns a comparator that compare gene leaves. If used when sorting the most preferred should come first.

Parameters:
family - is the family that this comparator will be used on
Returns:
a comparator that will be used to choose the right sequence
See Also:
Family