Skip to main content

ReadSharedRowsArgs

Struct ReadSharedRowsArgs 

Source
pub struct ReadSharedRowsArgs {
Show 13 fields pub data_files: Vec<Box<str>>, pub batch_files: Option<Vec<Box<str>>>, pub preload: bool, pub feature_kind: Option<FeatureNameKind>, pub row_alignment: RowAlignment, pub column_alignment: ColumnAlignment, pub qc: Option<QcConfig>, pub keep_empty_barcodes: bool, pub qc_exempt_files: Option<Vec<bool>>, pub qc_block_size: Option<usize>, pub qc_report_out: Option<Box<str>>, pub per_file_feature_suffix: Option<Vec<Box<str>>>, pub per_file_barcode_suffix: Option<Vec<Option<Box<str>>>>,
}
Expand description

Arguments for loading multiple sparse data files with shared row names.

Fields§

§data_files: Vec<Box<str>>§batch_files: Option<Vec<Box<str>>>§preload: bool§feature_kind: Option<FeatureNameKind>

Cross-file row-name canonicalization rule. None = auto-detect via FeatureNameKind::auto_detect once row names are in hand. Some(kind) skips detection and uses the caller’s choice. Default = None (auto).

§row_alignment: RowAlignment

How to align row names across input files. Default RowAlignment::Union keeps every row from any backend — the strictly more permissive option that reduces to single-modality semantics when all files share their row set, and supports multi-modal load (e.g. paired RNA + ATAC) when they don’t. Switch to RowAlignment::Intersect for strict “common rows only” behavior.

§column_alignment: ColumnAlignment

How to align column (cell / barcode) names across input files. Default ColumnAlignment::Disjoint concatenates cells with @<basename> disambiguation, preserving single-modality semantics. Switch to ColumnAlignment::Union for patchy multi-modal (multiome) load: cells are glued by raw barcode across backends, a cell observed in only one modality contributes triplets only on that modality’s row block, and no @<basename> suffix is added.

§qc: Option<QcConfig>

Optional shared cell QC. When Some, non-near-empty MAD outlier cells are dropped from the working set (via mask_columns), the returned batch Vec is filtered in lockstep, junk features are dropped (when feature_min_cells > 0), and the near-empty output keep-mask is returned in output_keep_idx. None (the default) = no QC, i.e. today’s behavior.

§keep_empty_barcodes: bool

Opt out of the empty-barcode gate. By default each file’s columns are cell-called on their own nnz distribution (crate::qc::suggest_nnz_cutoff: the trough between the ambient and the cell peak) and a column is dropped when it falls below the cut in every file that observes it — so an unfiltered barcode axis (e.g. ATAC from a fragments file) loses its empty droplets before any projection or collapse, while a cell in two modalities survives on either. A no-op on already-called data (no trough). Set true where every input column must come back, e.g. query cells at inference. Files flagged in qc_exempt_files are never gated.

§qc_exempt_files: Option<Vec<bool>>

Per-data_files entry: true exempts that file’s columns from QC — out of the band statistics AND out of every verdict (see qc_from_metrics). For inputs whose columns are not cells (a carried pb_reference, bulk samples): a pseudobulk standing for hundreds of cells is a legitimate depth outlier, and letting it into the MAD band either gets it dropped or — worse, as the mixture grows — recenters the band and guillotines the real cells. None = no exemption. Must match data_files length when Some.

§qc_block_size: Option<usize>

Block size for the QC streaming stat passes (None = default).

§qc_report_out: Option<Box<str>>

Optional path for a per-cell QC report TSV (None = don’t write).

§per_file_feature_suffix: Option<Vec<Box<str>>>

Optional per-file feature-name (row) modality suffix, one entry per data_files entry in order. When Some, backend b’s rows are renamed {canon(row)}/{suffix[b]} so files sharing raw feature names (e.g. spliced/unspliced) stay on separate rows, while the same name + suffix (same modality across samples) still merges. None = today’s behavior (no suffixing). Must match data_files length.

§per_file_barcode_suffix: Option<Vec<Option<Box<str>>>>

Optional per-file barcode (column) suffix, one entry per data_files entry in order. Under ColumnAlignment::Union, backend b’s barcodes are tagged {barcode}@{suffix[b]} before the canonical merge, so callers can encode per-cell sample identity: the same barcode in two files merges into one cell only when both carry the same suffix (same sample across modalities), while different samples stay distinct. None (or a per-entry None) = no tag. Must match data_files length. No effect under Disjoint (which disambiguates via @<basename>).

Trait Implementations§

Source§

impl Default for ReadSharedRowsArgs

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more