cogent3.core.annotation.Feature#
- class Feature(*, parent: TSeqOrAlign, seqid: str, map: FeatureMap, biotype: str, name: str, strand: int | str, xattr: dict[str, Any] | None = None)#
new style annotation, created on demand
- Attributes:
biotypetype of biological feature
mapcoordinate map and properties of this feature
namename of the feature
parentsequence or aligned or alignment
reversedwhether Feature is on the reverse strand relative to bound object
seqidthe sequence id of the parent sequence
xattrextra attributes for this feature
Methods
as_one_span([name])returns a feature that preserves any gaps in the underlying sequence
get_children([biotype])generator returns sub-features of self optionally matching biotype
get_coordinates()returns sequence coordinates of this Feature as [(start1, end1), ...]
get_drawable()returns plotly trace
get_parent(**kwargs)generator returns parent features of self optionally matching biotype
get_slice([complete, allow_gaps, apply_name])The corresponding sequence fragment.
shadow([name])returns new instance corresponding to disjoint of self coordinates
to_dict()returns
union(features)return as a single Feature
without_lost_spans()Keeps only the parts which are actually present in the underlying sequence
remapped_to