X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FNJTree.java;h=144ec2c6ea14328cb69c066c38a6d06b9663f2ee;hb=0f8e8fef1abe7837642706ee5b5f97d3e1eda9db;hp=160d8538923936a2a90312ced7b8aed49a1d2e76;hpb=d06711617796df6df18ec872326a6b6b76d447c8;p=jalview.git diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index 160d853..144ec2c 100644 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -1,13 +1,13 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -275,8 +275,8 @@ public class NJTree { jalview.io.NewickFile fout = new jalview.io.NewickFile(getTopNode()); - return fout.print(isHasBootstrap(), - isHasDistances(), isHasRootDistance()); // output all data available for tree + return fout.print(isHasBootstrap(), isHasDistances(), + isHasRootDistance()); // output all data available for tree } /** @@ -346,24 +346,29 @@ public class NJTree } } } + /** - * rename any nodes according to their associated sequence. - * This will modify the tree's metadata! (ie the original NewickFile or newly generated BinaryTree's label data) + * rename any nodes according to their associated sequence. This will modify + * the tree's metadata! (ie the original NewickFile or newly generated + * BinaryTree's label data) */ - public void renameAssociatedNodes() { - applyToNodes(new NodeTransformI() { + public void renameAssociatedNodes() + { + applyToNodes(new NodeTransformI() + { @Override public void transform(BinaryNode node) { Object el = node.element(); - if (el!=null && el instanceof SequenceI) + if (el != null && el instanceof SequenceI) { - node.setName(((SequenceI)el).getName()); + node.setName(((SequenceI) el).getName()); } } }); } + /** * DOCUMENT ME! */