cogent3.core.annotation.Feature#
- class Feature(*, parent, seqid: str, map: cogent3.core.location.Map, biotype: str, name: str)#
new style annotation, created on demand
- Attributes
- biotype
- map
- name
- parent
- seqid
Methods
as_one_span
()returns a feature that preserves any gaps
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])The corresponding sequence fragment.
shadow
()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
get_shadow
remapped_to