pub struct ContigExtender { /* private fields */ }Expand description
K-mer based contig extender using paired-end reads.
Loads reads into memory for efficient repeated scanning. Supports both sequential and parallel extension strategies.
Implementations§
Source§impl ContigExtender
impl ContigExtender
Sourcepub fn new(config: ExtenderConfig) -> Self
pub fn new(config: ExtenderConfig) -> Self
Creates a new contig extender with the given configuration.
Loads paired-end reads (R1 then R2) into a shared Arc<Vec<String>>, in
parallel from both files. Reusable across extender instances.
Sourcepub fn load_reads(&mut self, r1_path: &Path, r2_path: &Path) -> Result<()>
pub fn load_reads(&mut self, r1_path: &Path, r2_path: &Path) -> Result<()>
Loads reads from the two FASTQs into this extender.
Sourcepub fn set_reads(&mut self, reads: Arc<Vec<String>>)
pub fn set_reads(&mut self, reads: Arc<Vec<String>>)
Reuses an already-loaded shared read set (see load_reads_shared).
Sourcepub fn extend_contigs(
&self,
contigs: &[FastaRecord],
) -> Result<Vec<ExtendedContig>>
pub fn extend_contigs( &self, contigs: &[FastaRecord], ) -> Result<Vec<ExtendedContig>>
Extends all contigs using hybrid parallel strategy.
Combines shared read scanning with parallel extension application. This is the recommended method for most use cases.
§Algorithm
- Build edge k-mer index for active contigs
- Parallel read scanning (shared across all contigs)
- Parallel extension application per contig
- Repeat until no contigs can be extended
Sourcepub fn extend_all_hybrid(
&self,
contigs: &[FastaRecord],
) -> Result<Vec<ExtendedContig>>
pub fn extend_all_hybrid( &self, contigs: &[FastaRecord], ) -> Result<Vec<ExtendedContig>>
Alias for extend_contigs() - hybrid parallel method.
Auto Trait Implementations§
impl Freeze for ContigExtender
impl RefUnwindSafe for ContigExtender
impl Send for ContigExtender
impl Sync for ContigExtender
impl Unpin for ContigExtender
impl UnsafeUnpin for ContigExtender
impl UnwindSafe for ContigExtender
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> 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