X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBChain.java;h=49d7d4a429c094db5a3ca85a8f74468b5722422f;hb=c3d80a77b6782d563325e9fed92c8de371e07188;hp=e8f1bc956d7fd371deb15691b87758ad306ca2d3;hpb=13317fa1bc7bf640dc1967ce4438676e89390ad3;p=jalview.git diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index e8f1bc9..49d7d4a 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -392,8 +392,8 @@ public class PDBChain } AlignmentAnnotation tfactorann = new AlignmentAnnotation( - "PDB.TempFactor", "Temperature Factor for " - + sequence.getName(), annots, 0, max, + "Temperature Factor", "Temperature Factor for " + pdbid + id, + annots, 0, max, AlignmentAnnotation.LINE_GRAPH); tfactorann.setSequenceRef(sequence); sequence.addAlignmentAnnotation(tfactorann); @@ -522,6 +522,7 @@ public class PDBChain ana.getCalcId(), ana.label); if (transfer == null || transfer.size() == 0) { + ana = new AlignmentAnnotation(ana); ana.liftOver(sequence, shadowMap); ana.liftOver(dsq, sqmpping); dsq.addAlignmentAnnotation(ana); @@ -534,52 +535,56 @@ public class PDBChain } else { - if (sequence != null && sequence.getAnnotation() != null) - { - for (AlignmentAnnotation ana : sequence.getAnnotation()) + if (sequence != null && sequence.getAnnotation() != null) { - List transfer = sq.getAlignmentAnnotations( - ana.getCalcId(), ana.label); - if (transfer == null || transfer.size() == 0) - { - ana.liftOver(dsq, sqmpping); - // mapping.transfer(ana); - } - else + for (AlignmentAnnotation ana : sequence.getAnnotation()) { - continue; + List transfer = sq + .getAlignmentAnnotations(ana.getCalcId(), ana.label); + if (transfer == null || transfer.size() == 0) + { + ana = new AlignmentAnnotation(ana); + ana.liftOver(dsq, sqmpping); + // mapping.transfer(ana); + } + else + { + continue; + } } } } - } - float min = -1, max = 0; - Annotation[] an = new Annotation[sq.getEnd() - sq.getStart() + 1]; - for (int i = sq.getStart(), j = sq.getEnd(), k = 0; i <= j; i++, k++) + if (false) { - int prn = mapping.getPDBResNum(k + 1); - - an[k] = new Annotation(prn); - if (min == -1) + // Useful for debugging mappings - adds annotation for mapped position + float min = -1, max = 0; + Annotation[] an = new Annotation[sq.getEnd() - sq.getStart() + 1]; + for (int i = sq.getStart(), j = sq.getEnd(), k = 0; i <= j; i++, k++) { - min = k; - max = k; - } - else - { - if (min > k) + int prn = mapping.getPDBResNum(k + 1); + + an[k] = new Annotation(prn); + if (min == -1) { min = k; + max = k; } - else if (max < k) + else { - max = k; + if (min > k) + { + min = k; + } + else if (max < k) + { + max = k; + } } } + sq.addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM", + "PDB Residue Numbering for " + this.pdbid + ":" + this.id, + an, min, max, AlignmentAnnotation.LINE_GRAPH)); } - sq.addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM", - "PDB Residue Numbering for " + this.pdbid + ":" + this.id, - an, min, max, AlignmentAnnotation.LINE_GRAPH)); - } } }