From b135a253684e74d75c4050d9a1b70157e977c438 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 22 Aug 2016 13:01:35 +0100 Subject: [PATCH] JAL-2154 verify recovered xref sequence not already in dataset before adding it --- src/jalview/analysis/CrossRef.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index 81fad27..ddfd7ff 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -438,8 +438,11 @@ public class CrossRef } else { - dataset.addSequence(map.getTo()); - matcher.add(map.getTo()); + if (dataset.findIndex(map.getTo()) == -1) + { + dataset.addSequence(map.getTo()); + matcher.add(map.getTo()); + } } try { @@ -509,8 +512,11 @@ public class CrossRef } retrievedSequence.updatePDBIds(); rseqs.add(retrievedDss); - dataset.addSequence(retrievedDss); - matcher.add(retrievedDss); + if (dataset.findIndex(retrievedDss) == -1) + { + dataset.addSequence(retrievedDss); + matcher.add(retrievedDss); + } } } } -- 1.7.10.2