pub struct VariantCaller { /* private fields */ }Expand description
Variant caller that processes pileup data to call SNPs
Implementations§
Source§impl VariantCaller
impl VariantCaller
Sourcepub fn new(config: VariantCallerConfig) -> Self
pub fn new(config: VariantCallerConfig) -> Self
Create a new variant caller with the given configuration
Sourcepub fn call_snp(
&self,
pileup: &PileupColumn,
reference_base: u8,
) -> Option<VariantCall>
pub fn call_snp( &self, pileup: &PileupColumn, reference_base: u8, ) -> Option<VariantCall>
Call a SNP at a single pileup position
Returns Some(VariantCall) if a variant is detected, None if all reads
match the reference or depth is insufficient.
Sourcepub fn call_indel(
&self,
pileup: &PileupColumn,
reference_base: u8,
next_ref_bases: &[u8],
) -> Option<VariantCall>
pub fn call_indel( &self, pileup: &PileupColumn, reference_base: u8, next_ref_bases: &[u8], ) -> Option<VariantCall>
Detect insertions/deletions from pileup data
Looks for gaps (represented as b’-’) in the pileup bases that indicate indels relative to the reference.
Sourcepub fn filter_variants(&self, calls: &mut [VariantCall])
pub fn filter_variants(&self, calls: &mut [VariantCall])
Apply quality and depth filters to a list of variant calls
Sourcepub fn to_vcf(&self, calls: &[VariantCall], sample_name: &str) -> String
pub fn to_vcf(&self, calls: &[VariantCall], sample_name: &str) -> String
Generate VCF-formatted output for variant calls
Auto Trait Implementations§
impl Freeze for VariantCaller
impl RefUnwindSafe for VariantCaller
impl Send for VariantCaller
impl Sync for VariantCaller
impl Unpin for VariantCaller
impl UnsafeUnpin for VariantCaller
impl UnwindSafe for VariantCaller
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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