public void makeResidueList()
{
int count = 0;
+ Object symbol;
+ boolean nucleotide=false;
StringBuffer seq = new StringBuffer();
Vector resFeatures = new Vector();
Vector resAnnotation = new Vector();
resFeatures.addElement(sf);
resAnnotation.addElement(new Annotation(tmpat.tfactor));
// Keep totting up the sequence
- if (ResidueProperties.getAA3Hash().get(tmpat.resName) == null)
+ if ((symbol=ResidueProperties.getAA3Hash().get(tmpat.resName)) == null)
{
- seq.append("X");
+ if (ResidueProperties.nucleotideIndex[tmpat.resName.charAt(0)]==-1)
+ {
+ seq.append("X");
// System.err.println("PDBReader:Null aa3Hash for " +
// tmpat.resName);
+ } else {
+ // nucleotide flag
+ nucleotide=true;
+ seq.append(tmpat.resName.charAt(0));
+ }
}
else
{
-
- seq.append(ResidueProperties.aa[((Integer) ResidueProperties
- .getAA3Hash().get(tmpat.resName)).intValue()]);
+ if (nucleotide)
+ {
+ System.err.println("Warning: mixed nucleotide and amino acid chain.. its gonna do bad things to you!");
+ }
+ seq.append(ResidueProperties.aa[((Integer) symbol).intValue()]);
}
count++;
}
resAnnotation.setElementAt(null, i);
}
AlignmentAnnotation tfactorann = new AlignmentAnnotation(
- "PDB.CATempFactor", "CA Temperature Factor for "
+ "PDB.TempFactor", "Temperature Factor for "
+ sequence.getName(), annots, 0, max,
AlignmentAnnotation.LINE_GRAPH);
tfactorann.setSequenceRef(sequence);