X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBChain.java;fp=src%2FMCview%2FPDBChain.java;h=ef86cfd647d2191b71f606410aea9e34cb2fa337;hb=b9d3d1f71c6a8aee09cd23e1303b062cbe43a239;hp=1f4701477e1f4f7849ccda827b9a823929bf873e;hpb=ce4840757da155836d19edb70821fce6d2258d88;p=jalview.git diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index 1f47014..ef86cfd 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -204,16 +204,16 @@ public class PDBChain } for (int i = 0; i < features.length; i++) { - if (features[i].getFeatureGroup() != null - && features[i].getFeatureGroup().equals(pdbid)) + SequenceFeature feature = features[i]; + if (feature.getFeatureGroup() != null + && feature.getFeatureGroup().equals(pdbid)) { - int newBegin = 1 + residues.elementAt(features[i].getBegin() - - offset).atoms + int newBegin = 1 + residues.elementAt(feature.getBegin() - offset).atoms .elementAt(0).alignmentMapping; - int newEnd = 1 + residues.elementAt(features[i].getEnd() - offset).atoms + int newEnd = 1 + residues.elementAt(feature.getEnd() - offset).atoms .elementAt(0).alignmentMapping; - SequenceFeature tx = new SequenceFeature(features[i], newBegin, - newEnd, features[i].getFeatureGroup()); + SequenceFeature tx = new SequenceFeature(feature, newBegin, newEnd, + feature.getFeatureGroup(), feature.getScore()); tx.setStatus(status + ((tx.getStatus() == null || tx.getStatus().length() == 0) ? "" : ":" + tx.getStatus())); @@ -355,25 +355,25 @@ public class PDBChain && !residues.isEmpty() && residues.lastElement().atoms.get(0).resNumber == currAtom.resNumber) { - SequenceFeature sf = new SequenceFeature("INSERTION", - currAtom.resName + ":" + currAtom.resNumIns + " " + pdbid - + id, "", offset + count - 1, offset + count - 1, - "PDB_INS"); + String desc = currAtom.resName + ":" + currAtom.resNumIns + " " + + pdbid + id; + SequenceFeature sf = new SequenceFeature("INSERTION", desc, offset + + count - 1, offset + count - 1, "PDB_INS"); resFeatures.addElement(sf); residues.lastElement().atoms.addAll(resAtoms); } else { - // Make a new Residue object with the new atoms vector residues.addElement(new Residue(resAtoms, resNumber - 1, count)); Residue tmpres = residues.lastElement(); Atom tmpat = tmpres.atoms.get(0); // Make A new SequenceFeature for the current residue numbering - SequenceFeature sf = new SequenceFeature(RESNUM_FEATURE, tmpat.resName - + ":" + tmpat.resNumIns + " " + pdbid + id, "", offset - + count, offset + count, pdbid); + String desc = tmpat.resName + + ":" + tmpat.resNumIns + " " + pdbid + id; + SequenceFeature sf = new SequenceFeature(RESNUM_FEATURE, desc, + offset + count, offset + count, pdbid); resFeatures.addElement(sf); resAnnotation.addElement(new Annotation(tmpat.tfactor)); // Keep totting up the sequence