From: Jim Procter Date: Fri, 17 Sep 2021 12:13:35 +0000 (+0100) Subject: JAL-2226 transfer chain annotation when calcId, label and description are distinct... X-Git-Tag: Release_2_11_2_0~34^2~3^2~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=aeba223cbf5028332d3b1a8fcfad7857bd840409;p=jalview.git JAL-2226 transfer chain annotation when calcId, label and description are distinct - so annotations from multiple chains and structures are all shown. --- diff --git a/src/mc_view/PDBChain.java b/src/mc_view/PDBChain.java index 60c289e..2a813d0 100755 --- a/src/mc_view/PDBChain.java +++ b/src/mc_view/PDBChain.java @@ -501,6 +501,9 @@ public class PDBChain AlignmentAnnotation tfactorann = new AlignmentAnnotation( tfacName, tfacName + " for " + pdbid + id, annots, min, max, AlignmentAnnotation.LINE_GRAPH); + + tfactorann.setCalcId(getClass().getName()); + tfactorann.setSequenceRef(sequence); sequence.addAlignmentAnnotation(tfactorann); } @@ -627,8 +630,10 @@ public class PDBChain for (AlignmentAnnotation ana : shadow.getAnnotation()) { - List transfer = sq - .getAlignmentAnnotations(ana.getCalcId(), ana.label); + // match on calcId, label and description so annotations from + // different structures are preserved + List transfer = sq.getAlignmentAnnotations( + ana.getCalcId(), ana.label, ana.description); if (transfer == null || transfer.size() == 0) { ana = new AlignmentAnnotation(ana); @@ -648,8 +653,11 @@ public class PDBChain { for (AlignmentAnnotation ana : sequence.getAnnotation()) { + // match on calcId, label and description so annotations from + // different structures are preserved List transfer = dsq - .getAlignmentAnnotations(ana.getCalcId(), ana.label); + .getAlignmentAnnotations(ana.getCalcId(), ana.label, + ana.description); if (transfer == null || transfer.size() == 0) { ana = new AlignmentAnnotation(ana);