From: Jim Procter Date: Fri, 26 Aug 2016 12:20:51 +0000 (+0100) Subject: JAL-2154 don’t add any remaining xrefed sequences of the wrong molecule type to the... X-Git-Tag: Release_2_10_0~47^2~4^2~43^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5f92754aa0aa65d11c2ccf7f1daa29fb5a7b421c;p=jalview.git JAL-2154 don’t add any remaining xrefed sequences of the wrong molecule type to the alignment --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index cc80384..e0ec22b 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -2596,7 +2596,7 @@ public class AlignmentUtils { AlignmentI copy = new Alignment(new Alignment(seqs)); copy.setDataset(dataset); - + boolean isProtein = !copy.isNucleotide(); SequenceIdMatcher matcher = new SequenceIdMatcher(seqs); if (xrefs != null) { @@ -2607,7 +2607,8 @@ public class AlignmentUtils { for (DBRefEntry dbref : dbrefs) { - if (dbref.getMap() == null || dbref.getMap().getTo() == null) + if (dbref.getMap() == null || dbref.getMap().getTo() == null + || dbref.getMap().getTo().isProtein() != isProtein) { continue; }