Struct lightmotif_py::EncodedSequence
source · pub struct EncodedSequence { /* private fields */ }
Expand description
A biological sequence encoded as digits.
Implementations§
source§impl EncodedSequence
impl EncodedSequence
sourcepub fn __init__<'py>(
sequence: Bound<'py, PyString>,
) -> PyResult<PyClassInitializer<Self>>
pub fn __init__<'py>( sequence: Bound<'py, PyString>, ) -> PyResult<PyClassInitializer<Self>>
Encode a sequence with the given alphabet.
sourcepub fn __getitem__(&self, index: Py_ssize_t) -> PyResult<u8>
pub fn __getitem__(&self, index: Py_ssize_t) -> PyResult<u8>
Get an element of the encoded sequence.
sourcepub fn stripe(&self) -> PyResult<StripedSequence>
pub fn stripe(&self) -> PyResult<StripedSequence>
Convert this sequence into a striped matrix.
Trait Implementations§
source§impl Clone for EncodedSequence
impl Clone for EncodedSequence
source§fn clone(&self) -> EncodedSequence
fn clone(&self) -> EncodedSequence
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EncodedSequence
impl Debug for EncodedSequence
source§impl From<EncodedSequence<Dna>> for EncodedSequence
impl From<EncodedSequence<Dna>> for EncodedSequence
source§fn from(data: EncodedSequence<Dna>) -> Self
fn from(data: EncodedSequence<Dna>) -> Self
Converts to this type from the input type.
source§impl PyClassImpl for EncodedSequence
impl PyClassImpl for EncodedSequence
source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type ThreadChecker = SendablePyClass<EncodedSequence>
type ThreadChecker = SendablePyClass<EncodedSequence>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<EncodedSequence> for PyClassImplCollector<EncodedSequence>
impl PyClassNewTextSignature<EncodedSequence> for PyClassImplCollector<EncodedSequence>
fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a EncodedSequence
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a EncodedSequence
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut EncodedSequence
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut EncodedSequence
source§impl PyMethods<EncodedSequence> for PyClassImplCollector<EncodedSequence>
impl PyMethods<EncodedSequence> for PyClassImplCollector<EncodedSequence>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for EncodedSequence
impl PyTypeInfo for EncodedSequence
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
source§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
impl DerefToPyAny for EncodedSequence
Auto Trait Implementations§
impl Freeze for EncodedSequence
impl RefUnwindSafe for EncodedSequence
impl Send for EncodedSequence
impl Sync for EncodedSequence
impl Unpin for EncodedSequence
impl UnwindSafe for EncodedSequence
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)