inprogress
[jalview.git] / forester / java / src / org / forester / analysis / TaxonomyDataManager.java
index 2534792..cddaa4f 100644 (file)
@@ -22,7 +22,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.analysis;
 
@@ -265,7 +265,7 @@ public final class TaxonomyDataManager extends RunnableProcess {
                 phy.deleteSubtree( node, true );
             }
             phy.externalNodesHaveChanged();
-            phy.hashIDs();
+            phy.clearHashIdToNodeMap();
             phy.recalculateNumberOfExternalDescendants( true );
         }
         return not_found;
@@ -337,13 +337,15 @@ public final class TaxonomyDataManager extends RunnableProcess {
                 for( final UniProtTaxonomy up_taxonomy : up_taxonomies ) {
                     boolean match = true;
                     I: for( int i = 0; i < lineage.size(); ++i ) {
-                        if ( !lineage.get( i ).equalsIgnoreCase( up_taxonomy.getLineage().get( i ) ) ) {
+                        if ( ( i == up_taxonomy.getLineage().size() )
+                                || !lineage.get( i ).equalsIgnoreCase( up_taxonomy.getLineage().get( i ) ) ) {
                             match = false;
                             break I;
                         }
                     }
                     if ( match ) {
                         if ( up_tax != null ) {
+                            //TODO this is dead code?!
                             throw new AncestralTaxonomyInferenceException( "lineage \""
                                     + ForesterUtil.stringListToString( lineage, " > " ) + "\" is not unique" );
                         }