Skip to main content

Scan1

Struct Scan1 

Source
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: u64

Total read groups observed during Scan1 input traversal.

§bsj1_reads: usize

Unique read IDs emitted into the merged Scan1 BSJ file.

Implementations§

Source§

impl Scan1

Source

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.

Source

pub fn set_mem_limit(&mut self, limit: u64)

Overrides the per-thread page-cache eviction threshold.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.