From 065e78a9a486362e2dd3ab8b64b8fd5111d4c656 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 22 Aug 2017 22:10:27 +0100 Subject: [PATCH] JAL-2681 canonicalise DB source before fetching to avoid fetching the same ref ! --- src/jalview/ws/seqfetcher/ASequenceFetcher.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/ws/seqfetcher/ASequenceFetcher.java b/src/jalview/ws/seqfetcher/ASequenceFetcher.java index a07e88b..9284f82 100644 --- a/src/jalview/ws/seqfetcher/ASequenceFetcher.java +++ b/src/jalview/ws/seqfetcher/ASequenceFetcher.java @@ -130,11 +130,12 @@ public class ASequenceFetcher Hashtable> queries = new Hashtable<>(); for (DBRefEntry ref : refs) { - if (!queries.containsKey(ref.getSource())) + String canonical = DBRefUtils.getCanonicalName(ref.getSource()); + if (!queries.containsKey(canonical)) { - queries.put(ref.getSource(), new ArrayList()); + queries.put(canonical, new ArrayList()); } - List qset = queries.get(ref.getSource()); + List qset = queries.get(canonical); if (!qset.contains(ref.getAccessionId())) { qset.add(ref.getAccessionId()); -- 1.7.10.2