From: Jim Procter Date: Mon, 20 Oct 2014 12:46:05 +0000 (+0100) Subject: JAL-674 test for presence of annotation derived from particular PDB file X-Git-Tag: Jalview_2_9~169^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=edd9416eff32b8938511c5b9ed81b7cea8966e62;p=jalview.git JAL-674 test for presence of annotation derived from particular PDB file --- 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 {