pub struct Scan1 {
pub min_mapq_uni: i32,
pub max_circle: i32,
pub min_circle: i32,
pub linear_range_size_min: i32,
pub mem_limit: u64,
pub read_len: i32,
pub mapped_reads: u64,
pub bsj1_reads: usize,
}Expand description
First-pass BSJ detector.
Design constraints:
- Behavior is anchored to Java CIRI3, so this type keeps the same two-pass boundaries and candidate layout.
- Performance work is intentionally concentrated in record ingestion and
process_group_view, because profiling showed merge and final write are not meaningful bottlenecks.
Fields§
§min_mapq_uni: i32§max_circle: i32§min_circle: i32§linear_range_size_min: i32§mem_limit: u64§read_len: i32§mapped_reads: u64Total read groups observed during Scan1 input traversal.
bsj1_reads: usizeUnique read IDs emitted into the merged Scan1 BSJ file.
Implementations§
Source§impl Scan1
impl Scan1
Sourcepub fn new(
min_mapq_uni: i32,
min_circle: i32,
max_circle: i32,
linear_range_size_min: i32,
) -> Self
pub fn new( min_mapq_uni: i32, min_circle: i32, max_circle: i32, linear_range_size_min: i32, ) -> Self
Creates a Scan1 runner with CIRI3-compatible thresholds.
Sourcepub fn set_mem_limit(&mut self, limit: u64)
pub fn set_mem_limit(&mut self, limit: u64)
Overrides the per-thread page-cache eviction threshold.
Sourcepub fn run(
&mut self,
sam_file: &str,
bsj_path: &str,
fasta_map: &HashMap<String, String>,
annotation: &Annotation,
) -> Result<HashSet<String>>
pub fn run( &mut self, sam_file: &str, bsj_path: &str, fasta_map: &HashMap<String, String>, annotation: &Annotation, ) -> Result<HashSet<String>>
Dispatches to the SAM or BAM implementation while preserving one Scan1 API.
Sourcepub fn run_with_display(
&mut self,
sam_file: &str,
bsj_path: &str,
display_path: Option<&str>,
fasta_map: &HashMap<String, String>,
annotation: &Annotation,
) -> Result<HashSet<String>>
pub fn run_with_display( &mut self, sam_file: &str, bsj_path: &str, display_path: Option<&str>, fasta_map: &HashMap<String, String>, annotation: &Annotation, ) -> Result<HashSet<String>>
Dispatches to the SAM or BAM implementation and optionally writes the display-only Scan1 rows during the same grouped scan.
Sourcepub fn run_with_priority(
&mut self,
sam_file: &str,
bsj_path: &str,
fasta_map: &HashMap<String, String>,
annotation: &Annotation,
) -> Result<HashSet<String>>
pub fn run_with_priority( &mut self, sam_file: &str, bsj_path: &str, fasta_map: &HashMap<String, String>, annotation: &Annotation, ) -> Result<HashSet<String>>
Runs Scan1 and writes the expanded mate-level .bsj1 protocol.
The Java-compatible first-hit row is preserved as priority=1; extra
mate-level hits are written as priority=0 so downstream display and
internal-splice stages can see them without changing Summary semantics.
Sourcepub fn run_with_priority_and_segments(
&mut self,
sam_file: &str,
bsj_path: &str,
segments_path: Option<&str>,
fasta_map: &HashMap<String, String>,
annotation: &Annotation,
) -> Result<HashSet<String>>
pub fn run_with_priority_and_segments( &mut self, sam_file: &str, bsj_path: &str, segments_path: Option<&str>, fasta_map: &HashMap<String, String>, annotation: &Annotation, ) -> Result<HashSet<String>>
Runs Scan1 while writing both Summary-compatible BSJ rows and a segments sidecar.
The sidecar records full read-group alignments only for reads that produced
Scan1 BSJ evidence. Keeping it out of .bsj1 preserves CIRI3 parity while
giving the post-Summary segments stage enough mapper blocks to avoid a
second BAM/SAM scan for confirmed BSJ reads.
Sourcepub fn run_sam(
&mut self,
sam_file: &str,
bsj_path: &str,
fasta_map: &HashMap<String, String>,
annotation: &Annotation,
) -> Result<HashSet<String>>
pub fn run_sam( &mut self, sam_file: &str, bsj_path: &str, fasta_map: &HashMap<String, String>, annotation: &Annotation, ) -> Result<HashSet<String>>
Runs Scan1 on SAM input.
The current SAM implementation keeps parsing sequential and parallelizes at the read-group level. This was chosen deliberately because an earlier hand-written text fast path was faster but produced SAM/BAM mismatches.
Sourcepub fn run_bam(
&mut self,
bam_file: &str,
bsj_path: &str,
fasta_map: &HashMap<String, String>,
annotation: &Annotation,
) -> Result<HashSet<String>>
pub fn run_bam( &mut self, bam_file: &str, bsj_path: &str, fasta_map: &HashMap<String, String>, annotation: &Annotation, ) -> Result<HashSet<String>>
Runs Scan1 on BAM input using independent compressed-byte shards.
Unlike SAM, BAM can be safely split near BGZF boundaries, so the parallel strategy here is shard-based instead of producer/consumer batching.
Auto Trait Implementations§
impl Freeze for Scan1
impl RefUnwindSafe for Scan1
impl Send for Scan1
impl Sync for Scan1
impl Unpin for Scan1
impl UnsafeUnpin for Scan1
impl UnwindSafe for Scan1
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