From edd9416eff32b8938511c5b9ed81b7cea8966e62 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 20 Oct 2014 13:46:05 +0100 Subject: [PATCH] JAL-674 test for presence of annotation derived from particular PDB file --- src/MCview/PDBfile.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 20b3171..ae2eb50 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -269,8 +269,29 @@ public class PDBfile extends jalview.io.AlignFile System.err.println(line); } } + markCalcIds(); } + public static boolean isCalcIdForFile(String calcId, String pdbFile) + { + return (calcId != null && calcId.startsWith("JalviewPDB:" + pdbFile + + ":JalviewPDB:")); + } + private void markCalcIds() + { + for (SequenceI sq : seqs) + { + for (AlignmentAnnotation aa : sq.getAnnotation()) + { + String oldId = aa.getCalcId(); + if (oldId == null) + { + oldId = ""; + } + aa.setCalcId("JalviewPDB:" + getDataName() + ":JalviewPDB:" + oldId); + } + } + } private void processPdbFileWithJmol(ArrayList prot) throws Exception { -- 1.7.10.2