public String pdbid = "";
- public PDBChain(String thePdbid, String theId)
+ String tfacName = "Temperature Factor";
+
+
+ public PDBChain(String thePdbid, String theId, String tempFactorColumnName)
{
this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase();
this.id = theId;
+ if (tempFactorColumnName!=null && tempFactorColumnName.length()>0)
+ {
+ tfacName = tempFactorColumnName;
+ }
+ }
+
+ /**
+ * import chain data assuming Temperature Factor is in the Temperature Factor column
+ * @param thePdbid
+ * @param theId
+ */
+ public PDBChain(String thePdbid, String theId)
+ {
+ this(thePdbid,theId, null);
}
/**
min = Math.min(min, annots[i].value);
resAnnotation.setElementAt(null, i);
}
-
AlignmentAnnotation tfactorann = new AlignmentAnnotation(
- "Temperature Factor", "Temperature Factor for " + pdbid + id,
+ tfacName, tfacName + " for " + pdbid + id,
annots, min, max, AlignmentAnnotation.LINE_GRAPH);
+
+ tfactorann.setCalcId(getClass().getName());
+
tfactorann.setSequenceRef(sequence);
sequence.addAlignmentAnnotation(tfactorann);
}
}
+
/**
* Colour start/end of bonds by charge
* <ul>
for (AlignmentAnnotation ana : shadow.getAnnotation())
{
- List<AlignmentAnnotation> transfer = sq
- .getAlignmentAnnotations(ana.getCalcId(), ana.label);
+ // match on calcId, label and description so annotations from
+ // different structures are preserved
+ List<AlignmentAnnotation> transfer = sq.getAlignmentAnnotations(
+ ana.getCalcId(), ana.label, ana.description);
if (transfer == null || transfer.size() == 0)
{
ana = new AlignmentAnnotation(ana);
{
for (AlignmentAnnotation ana : sequence.getAnnotation())
{
+ // match on calcId, label and description so annotations from
+ // different structures are preserved
List<AlignmentAnnotation> transfer = dsq
- .getAlignmentAnnotations(ana.getCalcId(), ana.label);
+ .getAlignmentAnnotations(ana.getCalcId(), ana.label,
+ ana.description);
if (transfer == null || transfer.size() == 0)
{
ana = new AlignmentAnnotation(ana);