Components & Features¶
The Component class is very similar to Bio.SeqRecord.SeqRecord, but does not currently sub-class it—mainly because the features property is implemented differently.
- class co.Component(seq, parent=None, features=None, removed_features=None, feature_class=None, id=None, name=None, description=None, annotations=None, mutations=None)¶
A unique identifier for this component; preferably either str or UniqueIdentifier.
- features – A list of additional features (features in addition to those inherited from parent)
- removed_features – A list of removed features (features present in parent or one of its parents, but not present in this component)
- mutations – A list of mutations that have been applied to parent to arrive at seq. The mutations will not be applied to seq again. Use Component.mutate() to mutate a component.
The Feature class inherits from Bio.SeqFeature.SeqFeature but stores some additional information. Proceed with caution when using the two types interchangeably.
- class co.Feature(component, *args, **kwargs)¶
- class co.FeatureSet(feature_class=None)¶
An ordered collection of SeqFeature objects.
Parameters: feature_class (type) – type of the features stored in the collection; defaults to SeqFeature and must inherit from it.
- class co.ComponentFeatureSet(component, removed_features=None, feature_class=None)¶
When iterating over this feature set, any inherited features are also returned.