Skip to main content

AsConfig

Struct AsConfig 

Source
pub struct AsConfig<'a> {
    pub input_path: &'a str,
    pub circ_path: &'a str,
    pub bsj_path: Option<&'a str>,
    pub segment_evidence_paths: Vec<&'a str>,
    pub non_bsj_segment_evidence_paths: Vec<&'a str>,
    pub out_prefix: &'a str,
    pub keep_temp_files: bool,
    pub reference: &'a HashMap<String, String>,
    pub annotation: Option<&'a Annotation>,
    pub min_mapq: i32,
    pub progress_log: Option<&'a mut dyn FnMut(&str, &str) -> Result<()>>,
}
Expand description

Runtime options for the post-Summary circRNA segments phase.

The fields intentionally reuse the existing CIRI-AS-style second-sweep inputs so read recognition can keep its current parity-sensitive logic while the user-facing output is simplified to <prefix>.segments.

Fields§

§input_path: &'a str

Original queryname-sorted SAM/BAM used by the main CIRI run.

§circ_path: &'a str

Final CIRI3-style circRNA result table used as CIRI-AS -C input.

§bsj_path: Option<&'a str>

Final mate-level BSJ table written after Summary.

This file contains both priority=1 CIRI3-compatible evidence and priority=0 mate-level evidence. The segments phase uses it only as post-Summary read/mate annotation; it never feeds these rows back into Summary counts or circRNA discovery.

§segment_evidence_paths: Vec<&'a str>

Scan1/Scan2 segment-evidence sidecars produced before Summary.

When present, the segments phase reads these compact alignment dumps and filters them by the final .out junction-read assignments. This avoids a second BAM/SAM scan for confirmed BSJ reads while keeping the sidecar out of Summary’s parity-sensitive inputs.

§non_bsj_segment_evidence_paths: Vec<&'a str>

Scan2 non-BSJ topology sidecars produced before Summary.

These rows are read-level candidates, not circRNA-level assignments. They can represent backward/outward evidence with no known BSJ, so the final segments phase skips only reads already assigned as BSJ and then rebuilds the supplemental rows from the read chain itself.

§out_prefix: &'a str

Output prefix; the current phase writes <prefix>.segments.

§keep_temp_files: bool

Keep shard-local intermediate files after successful segments finalize.

The CLI uses this for --debug. Most retained non-BSJ alignments live in temporary shard streams, so deleting them inside this module would make the user-facing debug flag incomplete.

§reference: &'a HashMap<String, String>

In-memory reference sequence map loaded by the main CLI.

§annotation: Option<&'a Annotation>

Optional exon-boundary annotation used to resolve ambiguous motif offsets.

CIRI-AS v1.2 does not consult annotation during index_compare, so Perl falls back to hash iteration order when multiple motif offsets are valid. The Rust sidecar deliberately uses annotation as a deterministic biological tie-break before falling back to the lowest offset.

§min_mapq: i32

Minimum mapping quality shared with the main BSJ scan.

Outward reads are weaker circRNA evidence than BSJ/backward reads, so the post-Summary detector uses the same user-facing MAPQ threshold instead of the permissive CIRI-AS sidecar constant used for local coverage.

§progress_log: Option<&'a mut dyn FnMut(&str, &str) -> Result<()>>

Optional user-facing progress logger supplied by the CLI.

The segments phase owns an internal BAM progress bar, but several correctness-preserving steps run immediately after that bar completes. Routing status through the caller keeps stdout and <prefix>.log consistent with Scan1/Scan2 without giving this module direct log-file ownership.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for AsConfig<'a>

§

impl<'a> !Send for AsConfig<'a>

§

impl<'a> !Sync for AsConfig<'a>

§

impl<'a> !UnwindSafe for AsConfig<'a>

§

impl<'a> Freeze for AsConfig<'a>

§

impl<'a> Unpin for AsConfig<'a>

§

impl<'a> UnsafeUnpin for AsConfig<'a>

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.