|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectphylonet.ilp.IlpGenerator
public class IlpGenerator
IlpGenerator defines methods for generating CPLEX inputs.
Constructor Summary | |
---|---|
IlpGenerator()
|
Method Summary | |
---|---|
void |
assignNodeTime(STITree<java.lang.Double> tree)
Convert the tree with branch lengths into the tree with time. |
java.util.List<java.util.BitSet> |
computeAllClusters(java.util.List<Tree> geneTrees)
Compute all clusters induced by a list of trees. |
java.util.List<java.util.BitSet> |
computeTreeClusters(Tree tree)
Computer clusters induced by a tree. |
static void |
genCplex(java.lang.String[] args)
|
void |
generateCplexInput(STITree<java.lang.Integer> speciesTree,
java.util.List<Tree> geneTrees,
java.lang.String cplexFileName,
java.lang.String variableFileName,
java.lang.String scriptFileName)
This function generates CPLEX inputs according to the method described in the paper "Accurate and efficient tree reconstruction from genome-size multi-locus data under the coalescent". |
void |
generateSpeciesTrees(java.util.List<Tree> geneTrees,
java.io.File destination)
Generates a list of species trees by constructing from maximal sets of compatible clusters induced by gene trees, and writes this list to the supplied file. |
static void |
genSpeciesTrees(java.lang.String[] args)
|
void |
getValidGeneTrees(java.lang.String gtFile,
java.lang.String validGtFile)
This function filters from the set of gene trees those whose node times satisfy: time(parent) > time(children). |
static void |
printUsage()
Print help message about how to use |
void |
setSfWeight(double w)
Set weight for sf. |
void |
setSgWeight(double w)
Set weight for sg. |
void |
setTaxa(java.util.List<java.lang.String> t)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IlpGenerator()
Method Detail |
---|
public void setTaxa(java.util.List<java.lang.String> t)
public static void genSpeciesTrees(java.lang.String[] args)
public static void genCplex(java.lang.String[] args)
public void setSfWeight(double w)
w:
- sf weight.public void setSgWeight(double w)
w:
- sg weight.public void generateSpeciesTrees(java.util.List<Tree> geneTrees, java.io.File destination) throws java.io.IOException
geneTrees
- the list of gene trees from which we want to build
species treesdestination
- the file to which the generated species trees
should be written
java.io.IOException
- if an I/O error is encountered while opening,
writing to, or closing the destination filepublic void generateCplexInput(STITree<java.lang.Integer> speciesTree, java.util.List<Tree> geneTrees, java.lang.String cplexFileName, java.lang.String variableFileName, java.lang.String scriptFileName)
speciesTree:
- File containing the species treegeneTrees:
- File containing the gene trees. The function assumes that all gene trees in this file
satisfy the property that time(parent) > time(children).cplexFileName:
- File will contain the input to CPLEXvariableFileName:
- File will contain variable mappings. This is valuable when one wants to parse CPLEX outputs.scriptFileName:
- File containing CPLEX commands to run CPLEX, and get the optimization solution.public void getValidGeneTrees(java.lang.String gtFile, java.lang.String validGtFile)
gtFile:
- File containing the original gene trees.validGtFile:
- File containing new "valid" gene trees (ie., those satisfy the description above).public void assignNodeTime(STITree<java.lang.Double> tree)
tree:
- The tree with branch lengths.public static void printUsage()
public java.util.List<java.util.BitSet> computeAllClusters(java.util.List<Tree> geneTrees)
geneTrees:
- List of gene trees.public java.util.List<java.util.BitSet> computeTreeClusters(Tree tree)
tree:
- The tree we want to compute clusters.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |