Region

class of dascore.core.annotations
inherits from: dascore.core.annotations._AnnotationModel, DascoreBaseModel, pydantic.main.BaseModel
source

Region(
    object_type: Literal[‘Region’] = Region,
    bounds: collections.abc.Mapping[str, tuple[Any, Any]] = ,
)-> None

Per-dimension bounds: the box an annotation occupies.

Each dimension the annotation constrains maps to a half-open (start, end) pair; equal values are a point, and a dimension the mapping omits is unconstrained. Region subsumes a point, a span and a box, which differ only in how many dimensions they name.

Methods

Name Description
is_point Whether this region is a point, rather than a span, along a dimension.
new Create new instance with some attributed updated.