X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FDBRefUtils.java;h=e6aa47246536da0f8e6a6e950c08df3ff2264a5e;hb=37de9310bec3501cbc6381e0c3dcb282fcaad812;hp=2d09088051d0a580419bb46094aadeaee4c54d7b;hpb=4699d1858999c49dfbab4d98004b20df974fdc57;p=jalview.git diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 2d09088..e6aa472 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -29,7 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; -import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Set; @@ -508,9 +507,7 @@ public class DBRefUtils PDBEntry pdbr = new PDBEntry(); pdbr.setId(pdbid); pdbr.setType(PDBEntry.Type.PDB); - pdbr.setProperty(new Hashtable()); pdbr.setChainCode(chaincode); - // pdbr.getProperty().put("CHAIN", chaincode); seq.addPDBId(pdbr); } else @@ -618,21 +615,21 @@ public class DBRefUtils * sequences if they have an appropriate primary ref * * - * - * - * + * + * + * * - * + * * * * * - * + * * * * * - * + * * * * @@ -650,8 +647,16 @@ public class DBRefUtils return; } List selfs = new ArrayList(); - selfs.addAll(Arrays.asList(selectDbRefs(!sequence.isProtein(), - sequence.getDBRefs()))); + { + DBRefEntry[] selfArray = selectDbRefs(!sequence.isProtein(), + sequence.getDBRefs()); + if (selfArray == null || selfArray.length == 0) + { + // nothing to do + return; + } + selfs.addAll(Arrays.asList(selfArray)); + } // filter non-primary refs for (DBRefEntry p : pr)
Seq TypePrimary DBDirect which will be promotedSeq TypePrimary DBDirect which will be promoted
peptidesEnsemblUniprot
peptidesEnsemblUniprot
dnaEnsemblENA