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<String> keys = canonicalSourceNameLookup.keySet();
for (String k : keys)
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;
}