AlignedDataView#
- class AlignedDataView(*, parent: AlignedSeqsDataABC, seqid: str, alphabet: AlphabetABC, slice_record: SliceRecord | None = None)#
A view class for
AlignedSeqsData
, providing methods for different representations of a single sequence.- Attributes:
- alphabet
array_value
returns the numpy array of indices for the ungapped sequence
bytes_value
returns the bytes value of the ungapped sequence
gapped_array_value
returns the numpy array of indices for the gapped sequence
gapped_bytes_value
returns the bytes value of the gapped sequence
gapped_str_value
returns the string value of the gapped sequence
is_reversed
whether the sliced view is reversed relative to the parent
map
indel map (gaps) for the sequence
offset
the annotation offset of this view
- parent
parent_len
length of the parent sequence
seqid
the name of the sequence
slice_record
the slice record for this view
str_value
returns the string value of the ungapped sequence
Methods
copy
([sliced])just returns self
returns view of ungapped sequence data for seqid
returns seqid, start, stop, strand on the parent sequence
with_offset
(offset)returns new instance with annotation offset set
Notes
str_value
/array_value
are not complemented, but can be reversed. The latter is done by theAligned
object which has a moltype. Theslice_record
attribute is shared with the containingAlignment
.- alphabet#
- property array_value: ndarray#
returns the numpy array of indices for the ungapped sequence
- property bytes_value: bytes#
returns the bytes value of the ungapped sequence
- copy(sliced: bool = False) Self #
just returns self
- property gapped_array_value: ndarray#
returns the numpy array of indices for the gapped sequence
- property gapped_bytes_value: bytes#
returns the bytes value of the gapped sequence
- property gapped_str_value: str#
returns the string value of the gapped sequence
- get_seq_view() SeqViewABC #
returns view of ungapped sequence data for seqid
- property is_reversed: bool#
whether the sliced view is reversed relative to the parent
- property map: IndelMap#
indel map (gaps) for the sequence
- property offset: int#
the annotation offset of this view
- parent#
- property parent_len: int#
length of the parent sequence
- parent_seq_coords() tuple[str, int, int, int] #
returns seqid, start, stop, strand on the parent sequence
- property seqid: str#
the name of the sequence
- property slice_record: SliceRecordABC#
the slice record for this view
- property str_value: str#
returns the string value of the ungapped sequence
- with_offset(offset: int) Self #
returns new instance with annotation offset set