public TreeModel(SequenceI[] seqs, AlignmentView odata,
NewickFile treefile)
{
- this(seqs, treefile.getTree(), treefile.HasDistances(),
+ this(seqs, treefile.getTree(), treefile.HasDistances(),
treefile.HasBootstrap(), treefile.HasRootDistance());
seqData = odata;
*/
public TreeModel(TreeBuilder tree)
{
- this(tree.getSequences(), tree.getTopNode(), tree.hasDistances(),
+ this(tree.getSequences(), tree.getTopNode(), tree.hasDistances(),
tree.hasBootstrap(), tree.hasRootDistance());
seqData = tree.getOriginalData();
}
while (i < leaves.size())
{
// TODO - decide if we get rid of the polymorphism here ?
- j = (SequenceNode)leaves.elementAt(i++);
+ j = (SequenceNode) leaves.elementAt(i++);
realnam = j.getName();
nam = null;
*
* @return Vector of leaf nodes on binary tree
*/
- Vector<BinaryNode> findLeaves(BinaryNode nd,
- Vector<BinaryNode> leaves)
+ Vector<BinaryNode> findLeaves(BinaryNode nd, Vector<BinaryNode> leaves)
{
if (nd == null)
{
if ((nd.left() == null) && (nd.right() == null))
{
- System.out.println("Leaf = " + ((SequenceI) nd.element()).getName());
- System.out.println("Dist " + nd.dist);
- System.out.println("Boot " + nd.getBootstrap());
+ // TODO FIX FOR COLUMN TREES
+ jalview.bin.Console
+ .outPrintln("Leaf = " + ((SequenceI) nd.element()).getName());
+ jalview.bin.Console.outPrintln("Dist " + nd.dist);
+ jalview.bin.Console.outPrintln("Boot " + nd.getBootstrap());
}
else
{
- System.out.println("Dist " + nd.dist);
+ jalview.bin.Console.outPrintln("Dist " + nd.dist);
printNode((BinaryNode) nd.left());
printNode((BinaryNode) nd.right());
}
}
else
{
- _groupNodes(groups, (SequenceNode) nd.left(), threshold);
- _groupNodes(groups, (SequenceNode) nd.right(), threshold);
+ _groupNodes(groups, nd.left(), threshold);
+ _groupNodes(groups, nd.right(), threshold);
}
}
if ((nd.left() == null) && (nd.right() == null))
{
- nd.height = ((BinaryNode) nd.parent()).height + nd.dist;
+ nd.height = nd.parent().height + nd.dist;
if (nd.height > maxheight)
{
{
if (nd.parent() != null)
{
- nd.height = ((BinaryNode) nd.parent()).height + nd.dist;
+ nd.height = nd.parent().height + nd.dist;
}
else
{
}
else
{
- System.out.println(" name = " + ((SequenceI) nd.element()).getName());
+ jalview.bin.Console.outPrintln(
+ " name = " + ((SequenceI) nd.element()).getName());
}
- System.out.println(
+ jalview.bin.Console.outPrintln(
" dist = " + nd.dist + " " + nd.count + " " + nd.height);
}
{
// if (_lycount<_lylimit)
// {
- // System.err.println("Warning: depth of _recount greater than number of
+ // jalview.bin.Console.errPrintln("Warning: depth of _recount greater than
+ // number of
// nodes.");
// }
if (nd == null)