pub struct MotifHit { /* private fields */ }Expand description
A motif hit with optional sequence or genomic location.
Implementations§
Source§impl MotifHit
impl MotifHit
Sourcepub const fn new(
name: MotifName,
pattern: MotifPattern,
kind: MotifKind,
) -> MotifHit
pub const fn new( name: MotifName, pattern: MotifPattern, kind: MotifKind, ) -> MotifHit
Creates motif hit metadata with no location.
Sourcepub fn with_genomic_range(self, range: GenomicRange) -> MotifHit
pub fn with_genomic_range(self, range: GenomicRange) -> MotifHit
Sets the optional genomic range.
Sourcepub fn with_sequence_range(
self,
start: usize,
end: usize,
) -> Result<MotifHit, MotifValueError>
pub fn with_sequence_range( self, start: usize, end: usize, ) -> Result<MotifHit, MotifValueError>
Sets the optional sequence range.
§Errors
Returns MotifValueError::SequenceRangeEndBeforeStart when end < start.
Sourcepub const fn pattern(&self) -> &MotifPattern
pub const fn pattern(&self) -> &MotifPattern
Returns the motif pattern.
Sourcepub const fn genomic_range(&self) -> Option<&GenomicRange>
pub const fn genomic_range(&self) -> Option<&GenomicRange>
Returns the optional genomic range.
Sourcepub const fn sequence_range(&self) -> Option<(usize, usize)>
pub const fn sequence_range(&self) -> Option<(usize, usize)>
Returns the optional sequence range as (start, end).
Trait Implementations§
impl Eq for MotifHit
impl StructuralPartialEq for MotifHit
Auto Trait Implementations§
impl Freeze for MotifHit
impl RefUnwindSafe for MotifHit
impl Send for MotifHit
impl Sync for MotifHit
impl Unpin for MotifHit
impl UnsafeUnpin for MotifHit
impl UnwindSafe for MotifHit
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