PhyloSort

phylosort
Class TreeCluster

java.lang.Object
  extended by phylosort.TreeCluster

public class TreeCluster
extends java.lang.Object

A cluster of overlapping phylogenetic trees.

Version:
$Revision: 1.5 $
Author:
Ahmed Moustafa

Field Summary
static int DEFAULT_MINIMUM_OVERLAP
          Default minimum overlap
 
Constructor Summary
TreeCluster()
           
 
Method Summary
 void add(java.io.File file)
          Adds a file to cluster
 void add(java.io.File file, TreeNode tree)
          Adds a tree to cluster
 boolean contains(java.io.File file)
          Returns true if cluster contains at least one taxon from a tree file
 boolean contains(java.io.File file, int minimumOverlap)
          Returns true if cluster contains at least one taxon from a tree file
 boolean contains(java.lang.Iterable<java.lang.String> taxa)
          Returns true if cluster contains at least one taxon from a list of taxa
 boolean contains(java.lang.Iterable<java.lang.String> taxa, int minimumOverlap)
          Returns true if cluster contains at least one taxon from a list of taxa
 boolean contains(java.lang.String taxon)
          Returns true if cluster contains a specific taxon
 boolean contains(TreeNode tree)
          Returns true if cluster contains at least one taxon from a tree
 boolean contains(TreeNode tree, int minimumOverlap)
          Returns true if cluster contains at least one taxon from a tree
 java.lang.Iterable<java.lang.String> getFiles()
          Returns a list of the tree files in the cluster
 java.lang.Iterable<java.lang.String> getTaxa()
          Returns a list of the taxa in the cluster
 void merge(TreeCluster other)
          Merges two clusters into one cluster
 boolean overlaps(TreeCluster other)
          Checks if two clusters overlap with at least one taxon
 boolean overlaps(TreeCluster other, int minimumOverlap)
          Checks if two clusters overlap with a minimum number of overlapping taxa
 int size()
          Returns the cluster size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MINIMUM_OVERLAP

public static final int DEFAULT_MINIMUM_OVERLAP
Default minimum overlap

See Also:
Constant Field Values
Constructor Detail

TreeCluster

public TreeCluster()
Method Detail

contains

public boolean contains(java.lang.String taxon)
Returns true if cluster contains a specific taxon

Parameters:
taxon - Taxon to be checked for inclusion
Returns:
True if cluster contain a specific taxon, otherwise returns false

contains

public boolean contains(java.lang.Iterable<java.lang.String> taxa)
Returns true if cluster contains at least one taxon from a list of taxa

Parameters:
taxa - List of taxa to be checked
Returns:
True if cluster contains at least one taxon from a list of taxa, otherwise returns false

contains

public boolean contains(java.lang.Iterable<java.lang.String> taxa,
                        int minimumOverlap)
Returns true if cluster contains at least one taxon from a list of taxa

Parameters:
taxa - List of taxa to be checked
minimumOverlap - Minimum number of overlapping taxa
Returns:
True if cluster contains at least minimum number of overlapping taxa from a list of taxa, otherwise returns false

contains

public boolean contains(TreeNode tree)
Returns true if cluster contains at least one taxon from a tree

Parameters:
tree - TreeNode to be checked
Returns:
True if cluster contains at least one taxon from a tree, otherwise returns false

contains

public boolean contains(TreeNode tree,
                        int minimumOverlap)
Returns true if cluster contains at least one taxon from a tree

Parameters:
tree - TreeNode to be checked
minimumOverlap - Minimum number of overlapping taxa
Returns:
True if cluster contains at least minimum number of overlapping taxa from a tree, otherwise returns false

contains

public boolean contains(java.io.File file)
Returns true if cluster contains at least one taxon from a tree file

Parameters:
file - Tree file to be checked
Returns:
True if cluster contains at least one taxon from a tree file, otherwise returns false

contains

public boolean contains(java.io.File file,
                        int minimumOverlap)
Returns true if cluster contains at least one taxon from a tree file

Parameters:
file - Tree file to be checked
minimumOverlap - Minimum number of overlapping taxa
Returns:
True if cluster contains at least minimum number of overlapping taxa from a tree file, otherwise returns false

add

public void add(java.io.File file,
                TreeNode tree)
Adds a tree to cluster

Parameters:
file - File to be added
tree - TreeNode to be added

add

public void add(java.io.File file)
Adds a file to cluster

Parameters:
file - File to be added

overlaps

public boolean overlaps(TreeCluster other)
Checks if two clusters overlap with at least one taxon

Parameters:
other - TreeCluster
Returns:
true if two clusters overlap with at least one taxon, otherwise returns false

overlaps

public boolean overlaps(TreeCluster other,
                        int minimumOverlap)
Checks if two clusters overlap with a minimum number of overlapping taxa

Parameters:
other - Other TreeCluster
minimumOverlap - Minimum number of overlapping taxa
Returns:
True if two clusters overlap with a minimum number of overlapping taxa, otherwise returns false

merge

public void merge(TreeCluster other)
Merges two clusters into one cluster

Parameters:
other - TreeCluster to be merged

getFiles

public java.lang.Iterable<java.lang.String> getFiles()
Returns a list of the tree files in the cluster

Returns:
A list of the tree files in the cluster

getTaxa

public java.lang.Iterable<java.lang.String> getTaxa()
Returns a list of the taxa in the cluster

Returns:
A list of the taxa in the cluster

size

public int size()
Returns the cluster size

Returns:
The cluster size

PhyloSort

SourceForge.Net