pub struct QcConfig {Show 14 fields
pub n_mads: f32,
pub min_cell_nnz: usize,
pub min_counts_per_cell: f32,
pub mito_pattern: Option<String>,
pub mito_max_frac: Option<f32>,
pub ribo_pattern: Option<String>,
pub ribo_max_frac: Option<f32>,
pub mad_on_n_genes: bool,
pub mad_on_counts: bool,
pub mad_on_mito: bool,
pub feature_min_cells: usize,
pub drop_outliers: bool,
pub auto_cell_cutoff: bool,
pub qc_histogram: bool,
}Expand description
Configuration for cell QC. Plain struct (no clap) so non-clap crates
can construct it directly; the clap surface is QcArgs.
Fields§
§n_mads: f32MAD multiplier for the robust band (larger = more permissive).
min_cell_nnz: usizeNear-empty floor: cells with fewer than this many detected features (nnz across all rows) are masked at output, not dropped from training. 0 disables the floor.
min_counts_per_cell: f32Hard floor on total counts per cell, in addition to MAD. 0 disables.
mito_pattern: Option<String>Regex over row (feature) names selecting mitochondrial genes; enables
the per-cell mito-fraction metric. None disables it.
mito_max_frac: Option<f32>Optional hard max mitochondrial fraction (0..1).
ribo_pattern: Option<String>Regex selecting ribosomal genes (enables ribo-fraction metric).
ribo_max_frac: Option<f32>Optional hard max ribosomal fraction (0..1).
mad_on_n_genes: boolPer-cell metrics that drive MAD outlier flagging.
mad_on_counts: bool§mad_on_mito: bool§feature_min_cells: usizeFeature-axis QC (off by default): drop genes expressed in fewer than this many cells. 0 disables.
drop_outliers: boolMaster switch for the MAD train-drop tier. When false, only the
near-empty floor (output mask) is computed — used by inference
(predict/impute) so query cells are never silently dropped.
auto_cell_cutoff: boolAutomatic cell calling: pick the per-cell nnz cutoff at the trough
between the ambient and the cell peak (crate::qc::suggest_nnz_cutoff)
and train-drop every cell below it. So called-out ambient is removed
up front (via the caller’s mask_columns), not just output-masked — it
never shapes the model. The cutoff is authoritative; min_cell_nnz does
NOT floor it (it only drives the separate near-empty output mask). No-op
when there is no trough (unimodal) or when drop_outliers is false
(inference). Unlike the loader’s per-file empty-barcode gate, this runs
on the pooled cell axis.
qc_histogram: boolPrint the per-cell nnz histogram + the suggested/applied cutoff (the
same ASCII summary as data-beans squeeze --show-histogram).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QcConfig
impl RefUnwindSafe for QcConfig
impl Send for QcConfig
impl Sync for QcConfig
impl Unpin for QcConfig
impl UnsafeUnpin for QcConfig
impl UnwindSafe for QcConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.