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
impl CodecConsensusCaller
Sourcepub fn new(
read_name_prefix: String,
read_group_id: String,
options: CodecConsensusOptions,
) -> CodecConsensusCaller
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 namesread_group_id- Read group ID for consensus readsoptions- CODEC consensus calling options
Sourcepub fn new_with_rejects_tracking(
read_name_prefix: String,
read_group_id: String,
options: CodecConsensusOptions,
track_rejects: bool,
) -> CodecConsensusCaller
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].
Sourcepub fn statistics(&self) -> &CodecConsensusStats
pub fn statistics(&self) -> &CodecConsensusStats
Returns the statistics for this caller
Sourcepub fn clear(&mut self)
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.).
Sourcepub fn rejected_reads(&self) -> &[Vec<u8>]
pub fn rejected_reads(&self) -> &[Vec<u8>]
Returns a reference to the rejected reads (raw BAM bytes).
Sourcepub fn clear_rejected_reads(&mut self)
pub fn clear_rejected_reads(&mut self)
Clears the stored rejected reads.
Sourcepub fn take_rejected_reads(&mut self) -> Vec<Vec<u8>>
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.
impl CodecConsensusCaller
Bridge methods for encoding RecordBuf to raw bytes.
Used by tests (both unit and integration) to call the raw-byte pipeline.
Sourcepub fn consensus_reads_from_sam_records(
&mut self,
recs: Vec<RecordBuf>,
) -> Result<ConsensusOutput, Error>
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.
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>
fn consensus_reads( &mut self, records: Vec<Vec<u8>>, ) -> Result<ConsensusOutput, Error>
Source§fn total_reads(&self) -> usize
fn total_reads(&self) -> usize
Source§fn total_filtered(&self) -> usize
fn total_filtered(&self) -> usize
Source§fn consensus_reads_constructed(&self) -> usize
fn consensus_reads_constructed(&self) -> usize
Source§fn statistics(&self) -> ConsensusCallingStats
fn statistics(&self) -> ConsensusCallingStats
Source§fn log_statistics(&self)
fn log_statistics(&self)
Auto Trait Implementations§
impl Freeze for CodecConsensusCaller
impl RefUnwindSafe for CodecConsensusCaller
impl Send for CodecConsensusCaller
impl Sync for CodecConsensusCaller
impl Unpin for CodecConsensusCaller
impl UnsafeUnpin for CodecConsensusCaller
impl UnwindSafe for CodecConsensusCaller
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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