X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FDBRefUtils.java;fp=src%2Fjalview%2Futil%2FDBRefUtils.java;h=b9939e6437720485175f1777e269b59244701ca3;hb=9f20cd3f523c61db9fa6c44022d50baa692356f4;hp=50a34fc9b5017cc4000f6d28c018b8d8a93f9a43;hpb=446058de46699818a4d8cb965259e0eabd0d9c0a;p=jalview.git diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 50a34fc..b9939e6 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -65,6 +65,9 @@ public class DBRefUtils canonicalSourceNameLookup.put("ensembl-tr", DBRefSource.ENSEMBL); canonicalSourceNameLookup.put("ensembl-gn", DBRefSource.ENSEMBL); + canonicalSourceNameLookup.put("ensemblgenomes", + DBRefSource.ENSEMBLGENOMES); + // Make sure we have lowercase entries for all canonical string lookups Set keys = canonicalSourceNameLookup.keySet(); for (String k : keys) @@ -160,6 +163,20 @@ public class DBRefUtils return null; } String canonical = canonicalSourceNameLookup.get(source.toLowerCase()); + if (canonical==null) + { + if (source.toLowerCase().startsWith("ensembl")) + { + canonical = DBRefSource.ENSEMBL; + for (String ensembls: new String[] { "Protists","Plants","Bacteria","Fungi","Metazoa"}) + { + if (source.toLowerCase().endsWith(ensembls.toLowerCase())) + { + canonical = DBRefSource.ENSEMBLGENOMES; + } + } + } + } return canonical == null ? source : canonical; }