pub struct StringPattern { /* private fields */ }Expand description
String-method pattern using fixed-position characters.
Pattern characters:
N— UMI base (extracted to read name)C— Cell barcode base (extracted to read name)X— Sample/discard base (stays in output sequence, removed from barcode region)
Implementations§
Source§impl StringPattern
impl StringPattern
Sourcepub fn parse(
pattern_str: &str,
prime_end: PrimeEnd,
) -> Result<Self, ExtractError>
pub fn parse( pattern_str: &str, prime_end: PrimeEnd, ) -> Result<Self, ExtractError>
Parse a string-method pattern like NNNXXXXNN.
§Errors
Returns error if pattern is empty or contains characters other than N, X, C.
Sourcepub fn extract(
&self,
sequence: &[u8],
quality: &[u8],
) -> Result<ExtractionResult, ExtractError>
pub fn extract( &self, sequence: &[u8], quality: &[u8], ) -> Result<ExtractionResult, ExtractError>
Extract barcodes from a read’s sequence and quality strings.
§Errors
Returns error if the read is shorter than the pattern.
Trait Implementations§
Source§impl Clone for StringPattern
impl Clone for StringPattern
Source§fn clone(&self) -> StringPattern
fn clone(&self) -> StringPattern
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for StringPattern
impl RefUnwindSafe for StringPattern
impl Send for StringPattern
impl Sync for StringPattern
impl Unpin for StringPattern
impl UnsafeUnpin for StringPattern
impl UnwindSafe for StringPattern
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