SeqDataView#
- class SeqDataView(*, parent: str | bytes | ndarray, alphabet: AlphabetABC, parent_len: int, seqid: str | None = None, slice_record: SliceRecordABC = None, offset: int = 0)#
A view class for
SeqsData
, providing methods for different representations of a single sequence.- Attributes:
- alphabet
array_value
returns the sequence as a numpy array
bytes_value
returns the sequence as bytes
- is_reversed
- offset
- parent
- parent_len
- seqid
- slice_record
str_value
returns the sequence as a string
Methods
copy
([sliced])returns copy
returns a json serialisable dict.
with_offset
Notes
str_value
/array_value
are not complemented, but can be reversed. The latter is done by theSequence
object which has a moltype.- alphabet#
- property array_value: ndarray#
returns the sequence as a numpy array
- property bytes_value: bytes#
returns the sequence as bytes
- copy(sliced: bool = False)#
returns copy
- property is_reversed: bool#
- property offset: int#
- parent#
- property parent_len: int#
- property seqid: str#
- property slice_record: SliceRecordABC#
- property str_value: str#
returns the sequence as a string
- to_rich_dict() dict[str, str | dict[str, str]] #
returns a json serialisable dict.
Notes
This method will slice the underlying sequence to the start and stop values
- with_offset(offset: int)#