From: jprocter Date: Fri, 30 Oct 2009 10:22:11 +0000 (+0000) Subject: na pdb: detect P backbone X-Git-Tag: Release_2_5~171 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2a198f35d10d35bd4c3eef1b0f5e623252bfa564;p=jalview.git na pdb: detect P backbone --- diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index b368b91..3df320c 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -64,8 +64,10 @@ public class PDBfile extends jalview.io.AlignFile String line; boolean modelFlag = false; boolean terFlag = false; + String lastID=""; int index = 0; + String atomnam=null; while ((line = nextLine()) != null) { if (line.indexOf("HEADER") == 0) @@ -110,7 +112,8 @@ public class PDBfile extends jalview.io.AlignFile terFlag = false; // Jalview is only interested in CA bonds???? - if (!line.substring(12, 15).trim().equals("CA")) + atomnam = line.substring(12, 15).trim(); + if (!atomnam.equals("CA") && !atomnam.equals("P")) { continue; } @@ -119,6 +122,11 @@ public class PDBfile extends jalview.io.AlignFile tmpchain = findChain(tmpatom.chain); if (tmpchain != null) { + if (tmpatom.resNumIns.trim().equals(lastID)) + { + // phosphorylated protein - seen both CA and P.. + continue; + } tmpchain.atoms.addElement(tmpatom); } else @@ -127,6 +135,7 @@ public class PDBfile extends jalview.io.AlignFile chains.addElement(tmpchain); tmpchain.atoms.addElement(tmpatom); } + lastID = tmpatom.resNumIns.trim(); } index++; }