cogent3.core.slice_record.SliceRecord#
- class SliceRecord(*, parent_len: int, start: int | None = None, stop: int | None = None, step: int | None = None, offset: int = 0)#
records cumulative slice operations on an object without modifying it
- Attributes:
- is_reversed
- offset
- parent_len
parent_startreturns the start on the parent plus strand
parent_stopreturns the stop on the parent plus strand
plus_startstart on plus strand
plus_stepstep on plus strand
plus_stopstop on plus strand
- start
- step
- stop
Methods
absolute_position(rel_index[, include_boundary])Converts an index relative to the current view to be with respect to the coordinates of the original "Python sequence".
copy([sliced])returns self
relative_position(abs_index[, stop])converts an index on the original "Python sequence" into an index on this "view"
to_rich_dict()returns dict suitable for serialisation
Notes
Basis for lazy evaluation of slicing operations on sequences and alignments. A reference to an instance of this class is used by different view objects.