core.seqview.AlignedDataView
core.seqview.AlignedDataView(parent, seqid, alphabet, slice_record=None)A view class for AlignedSeqsData, providing methods for different representations of a single sequence.
Notes
str_value / array_value are not complemented, but can be reversed. The latter is done by the Aligned object which has a moltype. The slice_record attribute is shared with the containing Alignment.
Attributes
| Name | Description |
|---|---|
| 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 slice offset of this view |
| parent_len | length of the parent sequence |
| parent_offset | returns the offset from the true parent |
| 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
| Name | Description |
|---|---|
| copy | just returns self |
| get_seq_view | returns view of ungapped sequence data for seqid |
| parent_coords | returns seqid, start, stop, strand on the parent |
| with_offset | returns new instance with annotation offset set |
copy
core.seqview.AlignedDataView.copy(sliced=False)just returns self
get_seq_view
core.seqview.AlignedDataView.get_seq_view()returns view of ungapped sequence data for seqid
parent_coords
core.seqview.AlignedDataView.parent_coords(
seq_coords=False,
apply_offset=False,
**kwargs,
)returns seqid, start, stop, strand on the parent
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| seq_coords | bool | if True, parent is the ungapped sequence | False |
| apply_offset | bool | if True and seq_coords, adds annotation offset from parent | False |
with_offset
core.seqview.AlignedDataView.with_offset(offset)returns new instance with annotation offset set