transfer of taxonomy in GSDI and RIO
[jalview.git] / forester / java / src / org / forester / sdi / GSDIR.java
index 7ca8dca..52620a2 100644 (file)
@@ -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