Skip to main content

CodecConsensusCaller

Struct CodecConsensusCaller 

Source
pub struct CodecConsensusCaller { /* private fields */ }
Expand description

CODEC consensus caller

Calls consensus from CODEC sequencing data where R1 and R2 from a single read-pair sequence opposite strands of the same molecule.

Implementations§

Source§

impl CodecConsensusCaller

Source

pub fn new( read_name_prefix: String, read_group_id: String, options: CodecConsensusOptions, ) -> CodecConsensusCaller

Creates a new CODEC consensus caller

§Arguments
  • read_name_prefix - Prefix for consensus read names
  • read_group_id - Read group ID for consensus reads
  • options - CODEC consensus calling options
Source

pub fn new_with_rejects_tracking( read_name_prefix: String, read_group_id: String, options: CodecConsensusOptions, track_rejects: bool, ) -> CodecConsensusCaller

Creates a new CODEC consensus caller with optional rejected-reads tracking.

When track_rejects is true, raw BAM bytes of rejected reads are stored and can be retrieved via [rejected_reads] / [take_rejected_reads].

Source

pub fn statistics(&self) -> &CodecConsensusStats

Returns the statistics for this caller

Source

pub fn clear(&mut self)

Clears all per-group state to prepare for reuse

This resets statistics while preserving the caller’s configuration and reusable components (consensus builder, RNG, etc.).

Source

pub fn rejected_reads(&self) -> &[Vec<u8>]

Returns a reference to the rejected reads (raw BAM bytes).

Source

pub fn clear_rejected_reads(&mut self)

Clears the stored rejected reads.

Source

pub fn take_rejected_reads(&mut self) -> Vec<Vec<u8>>

Takes ownership of the stored rejected reads, leaving an empty vec.

Source§

impl CodecConsensusCaller

Bridge methods for encoding RecordBuf to raw bytes. Used by tests (both unit and integration) to call the raw-byte pipeline.

Source

pub fn consensus_reads_from_sam_records( &mut self, recs: Vec<RecordBuf>, ) -> Result<ConsensusOutput, Error>

Encode RecordBufs to raw bytes and delegate to consensus_reads.

§Errors

Returns an error if consensus calling fails on the provided records.

Trait Implementations§

Source§

impl ConsensusCaller for CodecConsensusCaller

Implementation of the ConsensusCaller trait for CODEC consensus calling.

This allows CodecConsensusCaller to be used polymorphically with other consensus callers (e.g., VanillaUmiConsensusCaller, DuplexConsensusCaller).

Source§

fn consensus_reads( &mut self, records: Vec<Vec<u8>>, ) -> Result<ConsensusOutput, Error>

Takes a group of raw-byte BAM records with the same UMI and generates consensus reads. Read more
Source§

fn total_reads(&self) -> usize

Returns the total number of input reads examined by the consensus caller
Source§

fn total_filtered(&self) -> usize

Returns the total number of reads filtered/rejected for any reason
Source§

fn consensus_reads_constructed(&self) -> usize

Returns the number of consensus reads constructed by this caller
Source§

fn statistics(&self) -> ConsensusCallingStats

Returns statistics about the consensus calling process
Source§

fn log_statistics(&self)

Logs statistics about consensus calling to the logger

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.