|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstatalign.postprocess.plugins.contree.CTMain
public class CTMain
The main thread for calculating consensus trees and networks. Note that networks is dependent on the initial tree...
| Constructor Summary | |
|---|---|
CTMain()
Initialise the class |
|
| Method Summary | |
|---|---|
void |
addNewTree(TreeNode root)
Add a new tree to the hash table |
void |
addTestSplit(java.util.BitSet partition)
FOR TESTING ONLY Add a single split to the hash table |
void |
addTestTree(java.util.ArrayList<java.util.BitSet> splits)
FOR TESTING ONLY Add a tree to the hash table |
CTree |
constructMajorityTree()
Constructs the majorityTree. |
CNetwork |
constructNetwork(CTree tree)
Constructs the network beginning with the consensus tree and then calls the network drawing function to calculate positions |
void |
CopyNode(java.util.ArrayList<CNetworkNode> nodesToCopy,
CNetworkSplit splitToAdd,
CNetwork network,
java.util.ArrayList<CNetworkEdge> incompatibleEdges)
Copy the list of nodes that need copying when adding a new split into a network. |
double |
getResPercentage()
|
long |
getSeed()
|
void |
InitialiseNetworkTester(int noOfTestTaxa,
int noOfTestSamples)
FOR TESTING ONLY Function called to initialise the Network Tester hash table & rest of CTMain |
void |
initialize(TreeNode root,
int noOfSamples)
Initialise a CTMain before usage with a first tree, going through and setting up the hash table etc. |
static void |
main(java.lang.String[] args)
|
void |
printConfig()
Print some configuration information |
void |
printDetails(CTree tree,
CNetwork network)
FOR TESTING ONLY Print details from the network - call after it has been constructed! |
static java.lang.String[] |
readTreesFromFile(java.lang.String fileName,
int n)
|
void |
setResPercentage(double resPercentage)
|
void |
setSeed(long seed)
|
CNetworkNode |
TaxonRefToNode(int taxonRef,
CNetwork network)
Find the taxon node in the network. |
void |
updateInterestThreshold()
Simply update our interest threshold |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CTMain()
| Method Detail |
|---|
public void printConfig()
public void initialize(TreeNode root,
int noOfSamples)
root - Root of the initial tree to initialise withnoOfSamples - Current number of samples takenpublic void updateInterestThreshold()
public void addNewTree(TreeNode root)
root - Root of new tree to addpublic CTree constructMajorityTree()
public CNetwork constructNetwork(CTree tree)
tree - Consensus tree already calculated
public void CopyNode(java.util.ArrayList<CNetworkNode> nodesToCopy,
CNetworkSplit splitToAdd,
CNetwork network,
java.util.ArrayList<CNetworkEdge> incompatibleEdges)
nodesToCopy - ArrayList of nodes in the network that need to be copiednetwork - Network we are working inincompatibleEdges - Edges that are in the path that joins up the nodes that are being copiedsplitToAdd - Split that we are currently adding in by copying these nodes
public CNetworkNode TaxonRefToNode(int taxonRef,
CNetwork network)
network - The network to find the taxon intaxonRef - Integer representation of taxon in the TaxaMap
public static java.lang.String[] readTreesFromFile(java.lang.String fileName,
int n)
throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionpublic double getResPercentage()
public void setResPercentage(double resPercentage)
public long getSeed()
public void setSeed(long seed)
public void InitialiseNetworkTester(int noOfTestTaxa,
int noOfTestSamples)
noOfTestTaxa - Number of taxanoOfTestSamples - number of trees inputpublic void addTestTree(java.util.ArrayList<java.util.BitSet> splits)
splits - Tree to add consisting of an arraylist of BitSet splitspublic void addTestSplit(java.util.BitSet partition)
partition - BitSet split to add
public void printDetails(CTree tree,
CNetwork network)
tree - Standard consensus treenetwork - The network
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||