X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fsdi%2FGSDIR.java;h=651383d424183139b07d68dd4d4e5e3c9779be6e;hb=eb22dac14771c467104f57362e3a624d0140f897;hp=7ca8dca5e490411d96f5dddf454e310b4e8f8587;hpb=b819fa043cac2722618af63f0d4752ffa1a40890;p=jalview.git diff --git a/forester/java/src/org/forester/sdi/GSDIR.java b/forester/java/src/org/forester/sdi/GSDIR.java index 7ca8dca..651383d 100644 --- a/forester/java/src/org/forester/sdi/GSDIR.java +++ b/forester/java/src/org/forester/sdi/GSDIR.java @@ -73,7 +73,7 @@ public class GSDIR implements GSDII { } if ( gene_tree.getRoot().getNumberOfDescendants() == 2 ) { gene_tree_branches_post_order.add( new PhylogenyBranch( gene_tree.getRoot().getChildNode1(), gene_tree - .getRoot().getChildNode2() ) ); + .getRoot().getChildNode2() ) ); } int min_duplications_sum = Integer.MAX_VALUE; int speciations_sum = 0; @@ -90,10 +90,10 @@ public class GSDIR implements GSDII { if ( gsdi_result.getDuplicationsSum() < min_duplications_sum ) { min_duplications_sum = gsdi_result.getDuplicationsSum(); speciations_sum = gsdi_result.getSpeciationsSum(); + _min_duplications_sum_gene_tree = gene_tree.copy(); if ( transfer_taxonomy ) { - transferTaxonomy( gene_tree ); + transferTaxonomy( _min_duplications_sum_gene_tree ); } - _min_duplications_sum_gene_tree = gene_tree.copy(); } else if ( gsdi_result.getDuplicationsSum() == min_duplications_sum ) { final List l = new ArrayList(); @@ -101,10 +101,10 @@ public class GSDIR implements GSDII { l.add( gene_tree ); final int index = getIndexesOfShortestTree( l ).get( 0 ); if ( index == 1 ) { + _min_duplications_sum_gene_tree = gene_tree.copy(); if ( transfer_taxonomy ) { - transferTaxonomy( gene_tree ); + transferTaxonomy( _min_duplications_sum_gene_tree ); } - _min_duplications_sum_gene_tree = gene_tree.copy(); } } _duplications_sum_stats.addValue( gsdi_result.getDuplicationsSum() ); @@ -188,7 +188,7 @@ public class GSDIR implements GSDII { /** * Places the root of this Phylogeny on Branch b. The new root is always * placed on the middle of the branch b. - * + * */ static final void reRoot( final PhylogenyBranch b, final Phylogeny phy ) { final PhylogenyNode n1 = b.getFirstNode(); @@ -208,7 +208,7 @@ public class GSDIR implements GSDII { // else if ( ( n1.getParent() != null ) && n1.getParent().isRoot() // && ( ( n1.getParent().getChildNode1() == n2 ) || ( n1.getParent().getChildNode2() == n2 ) ) ) { // phy.reRoot( n1 ); - // + // // } else { throw new IllegalArgumentException( "reRoot( Branch b ): b is not a branch." );