JAL-2805 made needed color set methods public
[jalview.git] / forester / java / src / org / forester / sdi / GSDIR.java
index 7ca8dca..651383d 100644 (file)
@@ -73,7 +73,7 @@ public class GSDIR implements GSDII {
         }\r
         if ( gene_tree.getRoot().getNumberOfDescendants() == 2 ) {\r
             gene_tree_branches_post_order.add( new PhylogenyBranch( gene_tree.getRoot().getChildNode1(), gene_tree\r
-                    .getRoot().getChildNode2() ) );\r
+                                                                    .getRoot().getChildNode2() ) );\r
         }\r
         int min_duplications_sum = Integer.MAX_VALUE;\r
         int speciations_sum = 0;\r
@@ -90,10 +90,10 @@ public class GSDIR implements GSDII {
             if ( gsdi_result.getDuplicationsSum() < min_duplications_sum ) {\r
                 min_duplications_sum = gsdi_result.getDuplicationsSum();\r
                 speciations_sum = gsdi_result.getSpeciationsSum();\r
+                _min_duplications_sum_gene_tree = gene_tree.copy();\r
                 if ( transfer_taxonomy ) {\r
-                    transferTaxonomy( gene_tree );\r
+                    transferTaxonomy( _min_duplications_sum_gene_tree );\r
                 }\r
-                _min_duplications_sum_gene_tree = gene_tree.copy();\r
             }\r
             else if ( gsdi_result.getDuplicationsSum() == min_duplications_sum ) {\r
                 final List<Phylogeny> l = new ArrayList<Phylogeny>();\r
@@ -101,10 +101,10 @@ public class GSDIR implements GSDII {
                 l.add( gene_tree );\r
                 final int index = getIndexesOfShortestTree( l ).get( 0 );\r
                 if ( index == 1 ) {\r
+                    _min_duplications_sum_gene_tree = gene_tree.copy();\r
                     if ( transfer_taxonomy ) {\r
-                        transferTaxonomy( gene_tree );\r
+                        transferTaxonomy( _min_duplications_sum_gene_tree );\r
                     }\r
-                    _min_duplications_sum_gene_tree = gene_tree.copy();\r
                 }\r
             }\r
             _duplications_sum_stats.addValue( gsdi_result.getDuplicationsSum() );\r
@@ -188,7 +188,7 @@ public class GSDIR implements GSDII {
     /**\r
      * Places the root of this Phylogeny on Branch b. The new root is always\r
      * placed on the middle of the branch b.\r
-     * \r
+     *\r
      */\r
     static final void reRoot( final PhylogenyBranch b, final Phylogeny phy ) {\r
         final PhylogenyNode n1 = b.getFirstNode();\r
@@ -208,7 +208,7 @@ public class GSDIR implements GSDII {
         //        else if ( ( n1.getParent() != null ) && n1.getParent().isRoot()\r
         //                && ( ( n1.getParent().getChildNode1() == n2 ) || ( n1.getParent().getChildNode2() == n2 ) ) ) {\r
         //            phy.reRoot( n1 );\r
-        //           \r
+        //\r
         //        }\r
         else {\r
             throw new IllegalArgumentException( "reRoot( Branch b ): b is not a branch." );\r