.getRenderOrder();
if (existingFeatures.contains(attName))
{
+ // TODO check if feature of this name is in group Chimera
+ // if so don't create a new feature name!
+ // problem: needs a lookup of features for feature group
attName = getStructureFeaturePrefix() + attName;
}
* and then traverse it to find feature ranges.
*/
boolean featureAdded = false;
+ String featureGroup = getViewerFeatureGroup();
+
for (String residue : residues)
{
AtomSpec spec = null;
}
String atomSpec = tokens[2];
String attValue = tokens[4];
- if ("None".equals(attValue))
+
+ /*
+ * ignore 'None' (e.g. for phi) or 'False' (e.g. for isHelix)
+ */
+ if ("None".equalsIgnoreCase(attValue)
+ || "False".equalsIgnoreCase(attValue))
{
continue;
}
+
try
{
spec = AtomSpec.fromChimeraAtomspec(atomSpec);
System.err.println("Problem parsing atomspec " + atomSpec);
continue;
}
+
+ String chainId = spec.getChain();
+ String description = attValue;
+ float score = Float.NaN;
+ try
+ {
+ score = Float.valueOf(attValue);
+ description = chainId;
+ } catch (NumberFormatException e)
+ {
+ // was not a float value
+ }
+
String pdbFile = getPdbFileForModel(spec.getModelNumber());
spec.setPdbFile(pdbFile);
SequenceI seq = m.getSequence();
int start = m.getStart();
int end = m.getEnd();
-
- float score = Float.NaN;
- try
- {
- score = Float.valueOf(attValue);
- } catch (NumberFormatException e)
- {
- // was not a float value
- }
- String featureGroup = getViewerFeatureGroup();
- SequenceFeature sf = new SequenceFeature(attName, attValue, start,
- end, score, featureGroup);
+ SequenceFeature sf = new SequenceFeature(attName, description,
+ start, end, score, featureGroup);
+ // todo: should SequenceFeature have an explicit property for chain?
// note: repeating the action shouldn't duplicate features
featureAdded |= seq.addSequenceFeature(sf);
}