X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fanalysis%2FAncestralTaxonomyInference.java;h=73af2c142c86be1e23ec5858599e7b0db661a8fe;hb=5a79605dde82b956c0cf429dd016c3b478012f9c;hp=09291f6b1a8efb6ccb20c51831b2062744726034;hpb=cd262b9df153624d042b47de8c142f70e27474ec;p=jalview.git diff --git a/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java b/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java index 09291f6..73af2c1 100644 --- a/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java +++ b/forester/java/src/org/forester/analysis/AncestralTaxonomyInference.java @@ -392,7 +392,7 @@ public final class AncestralTaxonomyInference { return not_found; } - synchronized private static UniProtTaxonomy obtainUniProtTaxonomy( final Taxonomy tax, Object query, QUERY_TYPE qt ) + synchronized public static UniProtTaxonomy obtainUniProtTaxonomy( final Taxonomy tax, Object query, QUERY_TYPE qt ) throws IOException, AncestralTaxonomyInferenceException { if ( isHasAppropriateId( tax ) ) { query = tax.getIdentifier().getValue(); @@ -499,7 +499,8 @@ public final class AncestralTaxonomyInference { tax.setRank( "" ); } } - if ( ( qt != QUERY_TYPE.ID ) && !ForesterUtil.isEmpty( up_tax.getId() ) && ( tax.getIdentifier() == null ) ) { + if ( ( qt != QUERY_TYPE.ID ) && !ForesterUtil.isEmpty( up_tax.getId() ) + && ( ( tax.getIdentifier() == null ) || ForesterUtil.isEmpty( tax.getIdentifier().getValue() ) ) ) { tax.setIdentifier( new Identifier( up_tax.getId(), "uniprot" ) ); } if ( up_tax.getLineage() != null ) {