Skip to main content

ScErrors

Enum ScErrors 

Source
pub enum ScErrors {
Show 135 variants AnnSearchRsError(AnnSearchErrors), EdgeRsError(EdgeErrors), Core(CoreErrors), Methods(MethodsErrors), ScData(ScDataErrors), PagaKnnIndicesOutOfRange { out_of_range: usize, total: usize, n_cells: usize, }, GeneAxisMismatch { gene_store: usize, cell_store: usize, }, NeedAtLeastTwoBatches { n_batches: usize, }, NeedAtLeastTwoLabels { n_labels: usize, }, MetricLabelLengthMismatch { n_cells: usize, n_labels: usize, }, BbknnBatchTooSmall { batch: usize, n_cells: usize, required: usize, }, TooFewCellsForAnchor { batch: usize, n_cells: usize, required: usize, }, HarmonySigmaLengthUnequalCluster, OffsetsNotProvidedForClrPCA, OffsetsLengthDoesNotMatchNCells { len_offset: usize, n_cells: usize, }, HvgCellIndexOutOfRange { index: usize, total_cells: usize, }, HvgDuplicateCellIndex { index: usize, }, HvgBatchLabelLengthMismatch { n_labels: usize, n_cells: usize, }, HvgEmptyBatch { batch: usize, n_batches: usize, }, HvgEmptySelection, HvgInvalidLoessSpan { span: f32, }, HvgInvalidBinCount, HvgTooFewTrendPoints { n_kept: usize, minimum_mean: f64, }, HotSpotWrongModel(String), SelectFeaturesBeforeSimilariy, Mc2TooFewGenes { selected: usize, required: usize, }, Mc2LengthMismatch { what: &'static str, expected: usize, got: usize, }, Mc2EmptyPile, Mc2InvalidParams { reason: String, }, Mc2UnreachableCells { n_unreachable: usize, }, SEACellsKernelMatrixMissing, SEACellsArchetypesMissing, SEACellsModelNotFitted, DiffusionKernelNotFinite { n_cells: usize, }, MELDLabelOutOfRange { label: usize, n_groups: usize, }, MELDChebyshevCoefTooLow, MELDLabelUnequalsSamples, MELDOnlyOneGroup, DgeTooFewGroups { n_groups: usize, }, DgeTooManyGroups { n_groups: usize, max: usize, }, DgeEmptyGroup { group: usize, }, DgeCellOutOfRange { cell: usize, n_cells: usize, }, DgeOverlappingGroups { cell: usize, first: usize, second: usize, }, DgeReferenceOutOfRange { reference: usize, n_groups: usize, }, NebulaNoGenesKept { n_genes: usize, }, PalantirEarlyCellOutOfRange { early_cell: usize, n_cells: usize, }, PalantirTerminalStateOutOfRange { state: usize, n_cells: usize, }, PalantirTerminalStateNotAWaypoint { state: usize, n_waypoints: usize, }, PalantirStartCellNotFirstWaypoint { start_cell: usize, first_waypoint: usize, }, PalantirMaxIterationsTooSmall { max_iterations: usize, minimum: usize, }, PalantirKnnTooSmall { knn: usize, minimum: usize, }, PalantirTooFewWaypoints { n_waypoints: usize, minimum: usize, }, PalantirWaypointDataMismatch { n_waypoints: usize, n_pseudotime: usize, }, PalantirStationaryRanksDegenerate { n_waypoints: usize, }, PalantirDisconnectedGraph { n_unreachable: usize, repairs: usize, }, PalantirDegeneratePseudotime { reason: &'static str, }, PalantirStationaryMassLost { iteration: usize, total: f64, }, PalantirNonFiniteEigenvalue { eigenvalue: f64, }, PalantirNEigsTooSmall { n_eigs: usize, minimum: usize, }, PalantirNoTerminalStates, PalantirNoBoundaryCells, PalantirUnreachableFromWaypoints { n_unreachable: usize, }, PalantirAbsorbingSolveFailed { residual: f64, n_transient: usize, }, PalantirAbsorbingRowSum { row_sum: f64, waypoint: usize, n_transient: usize, }, PalantirAbsorbingRowNotFinite { row_sum: f64, waypoint: usize, n_transient: usize, }, PalantirTooManyWaypointsForDenseSolve { n_transient: usize, limit: usize, }, MagicOutputTooLarge { n_cells: usize, n_genes: usize, max_elements: usize, }, MagicKnnSelectionMismatch { n_knn: usize, n_selected: usize, }, MagicCellOutOfRange { cell: usize, total_cells: usize, }, MagicDuplicateCell { cell: usize, }, MagicStoreSizeMismatch { operator_cells: usize, store_cells: usize, }, GeneTrendsShapeMismatch { n_cells: usize, n_pseudotime: usize, }, GeneTrendsBranchEmpty { branch: usize, }, GeneTrendsBranchTooFewCells { branch: usize, n_cells: usize, minimum: usize, }, GeneTrendsDegeneratePseudotime { branch: usize, }, GeneTrendsMissingFateProbabilities, GeneTrendsFateColumnMismatch { n_columns: usize, n_branches: usize, }, GeneTrendsFateShapeMismatch { n_rows: usize, n_cells: usize, }, GeneTrendsCellOutOfRange { branch: usize, cell: usize, n_cells: usize, }, GeneTrendsZeroWeightBranch { branch: usize, }, GeneTrendsResolutionTooLow { resolution: usize, minimum: usize, }, DialogueTooFewCellTypes { n_cell_types: usize, }, DialogueTooFewSharedSamples { found: usize, minimum: usize, }, DialogueTooFewFeatures { cell_type: usize, found: usize, total: usize, minimum: usize, }, DialogueTooFewAbundantSamples { cell_type: usize, found: usize, min_cells: usize, }, CpdbGeneIndexOutOfRange { index: usize, n_genes: usize, }, CpdbCellIndexOutOfRange { index: usize, n_cells: usize, }, CpdbEmptyPartner { interaction: usize, }, CpdbClusterOverlap { cell: usize, }, ScTypeClusterAssignmentNotEqualNCells { n_cells: usize, n_cluster_assignment: usize, }, ScTypeGraphNodesNotEqualNCells { n_cells: usize, n_nodes: usize, }, SctGeneIndexOutOfRange { index: usize, n_genes: usize, }, SctTooFewGenesToRegularise { kept: usize, total: usize, }, SctSmoothingLeftAGeneUnfitted { gene: usize, }, SctNoGenesPassFilter { min_cells: usize, n_genes: usize, }, SctGeneNotModelled { gene: usize, }, PcaResidualsWithClr, SctCovariateLengthMismatch { name: String, expected: usize, found: usize, }, SctCovariateCountMismatch { model: usize, supplied: usize, }, ResidualGroupLabelLengthMismatch { n_labels: usize, n_cells: usize, }, ResidualEmptyGroup { group: usize, n_groups: usize, }, ResidualEmptyGeneIntersection { n_groups: usize, }, AnalyticPearsonZeroTotal, AnalyticPearsonInvalidTheta { theta: f64, }, ResidualInvalidClipRange { lo: f64, hi: f64, }, ResidualDuplicateCells { n_unique: usize, n_cells: usize, }, ResidualGenesNotAscending { name: &'static str, }, ResidualGroupModelCountMismatch { implied: usize, models: usize, }, ResidualGroupLabelOutOfRange { label: usize, n_groups: usize, }, ResidualNonFiniteVariance { gene: usize, value: f64, }, ResidualRowLengthMismatch { n_counts: usize, n_indices: usize, }, ResidualCellIndexOutOfRange { index: usize, n_cells: usize, }, ResidualEmptySelectionRequest { what: &'static str, }, SctDispersionSearchFailed { reason: String, }, ResidualGroupFitFailed { group: usize, reason: String, }, SctCovariateNameMismatch { position: usize, model: String, supplied: String, }, SctCellIndexOutOfRange { index: usize, n_cells: usize, }, SctModelWithoutCoefficients, PcaResidualsWithVarianceNormalisation, CellSweepEmptyMaskMissing, CellSweepBadExpectedCells { expected: usize, barcodes: usize, }, CellSweepKneeNotFound { barcodes: usize, }, CellSweepTooFewEmptyDroplets { sample_id: String, found: usize, required: usize, }, CellSweepNoRealCells { sample_id: String, }, CellSweepCelltypeOutOfRange { sample_id: String, code: usize, n_celltypes: usize, }, CellSweepLabelLengthMismatch { sample_id: String, n_cells: usize, n_labels: usize, }, CellSweepFreezeEmptiesUnsupported, CellSweepDiverged { sample_id: String, iteration: usize, }, WNNModalitySampleMismatch, WNNKnnLargerThanKnnRange, WNNSigmaIdxOutOfRange, WNNSnnLargerThanKnnRange, WNNKnnRowCountMismatch { modality: usize, expected: usize, found: usize, }, WNNKnnDistRowCountMismatch { modality: usize, expected: usize, found: usize, }, WNNInsufficientNeighbours { modality: usize, expected: usize, found: usize, },
}
Expand description

Error variants raised by bixverse-sc.

Grouped by subsystem.

Variants§

§

AnnSearchRsError(AnnSearchErrors)

Propagates an error from ann-search-rs.

§

EdgeRsError(EdgeErrors)

Propagates an error from edge-rs.

§

Core(CoreErrors)

Propagates an error from bixverse-core.

§

Methods(MethodsErrors)

Propagates an error from bixverse-methods.

§

ScData(ScDataErrors)

Propagates an error from bixverse-sc-data.

§

PagaKnnIndicesOutOfRange

Most of the supplied kNN indices point outside the cell set

The usual cause is a kNN computed against a reference index rather than the query set, which drops every edge and returns an all-zero connectivity matrix looking like a genuine result.

Fields

§out_of_range: usize

Entries pointing past the last cell

§total: usize

Entries supplied in total

§n_cells: usize

Cells in the input

§

GeneAxisMismatch

Two stores that must share a gene axis disagree on how many genes they hold.

Raised where a method takes a gene-major and a cell-major reader over what is meant to be the same experiment. Nothing ties the two files together, so the check has to be explicit: indices derived from one store are used against buffers sized from the other.

Fields

§gene_store: usize

Total genes reported by the gene-major store

§cell_store: usize

Total genes reported by the cell-major store

§

NeedAtLeastTwoBatches

Need at least two batches for this method

Fields

§n_batches: usize

Number of provided batches

§

NeedAtLeastTwoLabels

Need at least two distinct labels for this metric

Fields

§n_labels: usize

Number of distinct labels found

§

MetricLabelLengthMismatch

The label vector does not line up with the number of cells

Fields

§n_cells: usize

Number of cells in the embedding or kNN graph

§n_labels: usize

Length of the provided label vector

§

BbknnBatchTooSmall

A batch holds too few cells for the requested per-batch neighbour count

Fields

§batch: usize

Batch label

§n_cells: usize

Cells in the batch

§required: usize

Minimum required, i.e. neighbours_within_batch + 1

§

TooFewCellsForAnchor

A batch has too few cells for the requested anchor search

Fields

§batch: usize

Batch index

§n_cells: usize

Cells in the batch

§required: usize

Minimum required

§

HarmonySigmaLengthUnequalCluster

Sigma length is not equal to the number of clusters

§

OffsetsNotProvidedForClrPCA

Error if user wants CLR-normalised PCA, but did not provide the offsets

§

OffsetsLengthDoesNotMatchNCells

Error if user wants CLR-normalised PCA, but did not provide the offsets

Fields

§len_offset: usize

Length of the offsets

§n_cells: usize

Number of cells provided

§

HvgCellIndexOutOfRange

A requested cell index does not exist in the store.

Fields

§index: usize

The offending cell index

§total_cells: usize

Number of cells the store holds

§

HvgDuplicateCellIndex

The same cell was selected twice, which would inflate the denominator.

Fields

§index: usize

The duplicated cell index

§

HvgBatchLabelLengthMismatch

Batch labels and cell indices disagree in length.

Fields

§n_labels: usize

Number of batch labels provided

§n_cells: usize

Number of selected cells

§

HvgEmptyBatch

A batch in 0..n_batches ended up with no cells.

Fields

§batch: usize

The empty batch

§n_batches: usize

Number of batches implied by the labels

§

HvgEmptySelection

No cells were selected at all.

§

HvgInvalidLoessSpan

Loess span outside the range [crate::core::base::loess::LoessRegression] accepts.

Fields

§span: f32

The provided span

§

HvgInvalidBinCount

Bin count of zero, which would divide by zero during binning.

§

HvgTooFewTrendPoints

Too few genes pass the mean filter to fit the scran variance trend.

Fields

§n_kept: usize

Genes left after the mean filter

§minimum_mean: f64

The mean filter threshold

§

HotSpotWrongModel(String)

Invalid model chosen for Hotspot

§

SelectFeaturesBeforeSimilariy

User needs to have generated select_features prior to the compute_similarity part.

§

Mc2TooFewGenes

Feature selection kept too few genes to correlate cells on.

Fields

§selected: usize

Genes that passed the filters

§required: usize

Genes required

§

Mc2LengthMismatch

A per-gene or per-cell vector does not match the pile.

Fields

§what: &'static str

Which input is off

§expected: usize

Expected length

§got: usize

Supplied length

§

Mc2EmptyPile

The pile holds no cells.

§

Mc2InvalidParams

Parameters that cannot produce a valid run.

Fields

§reason: String

What is wrong

§

Mc2UnreachableCells

Seed completion found nodes that no seed can reach.

Fields

§n_unreachable: usize

Cells left without a seed

§

SEACellsKernelMatrixMissing

The SEACells kernel matrix has not been yet constructed.

§

SEACellsArchetypesMissing

The SEACells archetypes have not yet been identified.

§

SEACellsModelNotFitted

The SEACells archetypes have not yet been identified.

§

DiffusionKernelNotFinite

The adaptive diffusion kernel came out with non-finite weights.

Raised by [bixverse_sc::mc_generation::seacells::compute_diffusion_kernel]. The usual cause is a caller-supplied kNN graph carrying NaN distances, since zero bandwidths are handled by the smallest-positive fallback.

Fields

§n_cells: usize

Cells in the kNN graph

§

MELDLabelOutOfRange

If the user provides a label which is out-of-range of the expected number of groups

Fields

§label: usize

The label which is out of range

§n_groups: usize

The number of expected groups

§

MELDChebyshevCoefTooLow

If the user asks for less than two Chebyshev coefficients

§

MELDLabelUnequalsSamples

Error if labels and number of cells are not equal

§

MELDOnlyOneGroup

Error of n_groups < 2

§

DgeTooFewGroups

Fewer than two cell groups, so there is nothing to compare.

Fields

§n_groups: usize

Number of groups supplied

§

DgeTooManyGroups

More cell groups than the u16 group labels can hold.

Fields

§n_groups: usize

Number of groups supplied

§max: usize

Largest supported number of groups

§

DgeEmptyGroup

One of the cell groups holds no cells.

Fields

§group: usize

Index of the offending group

§

DgeCellOutOfRange

A cell index beyond the end of the store.

Fields

§cell: usize

The offending cell index

§n_cells: usize

Total cells in the store

§

DgeOverlappingGroups

A cell appears in two groups, or twice in one.

Silently biases every AUROC toward 0.5 rather than failing, so it is worth rejecting outright.

Fields

§cell: usize

The cell listed more than once

§first: usize

Group the cell was first seen in

§second: usize

Group the cell was seen in again

§

DgeReferenceOutOfRange

A reference arm index beyond the number of groups.

Fields

§reference: usize

The offending reference index

§n_groups: usize

Number of groups supplied

§

NebulaNoGenesKept

Every gene failed NEBULA’s own expression filter.

Raised only once the whole sweep is done. A single batch losing all of its genes is normal and is skipped silently.

Fields

§n_genes: usize

How many genes were offered

§

PalantirEarlyCellOutOfRange

The user-supplied early cell index sits outside the cell range.

Fields

§early_cell: usize

The offending early cell index

§n_cells: usize

Number of cells in the input

§

PalantirTerminalStateOutOfRange

A user-supplied terminal state index sits outside the cell range.

Fields

§state: usize

The offending terminal state index

§n_cells: usize

Number of cells in the input

§

PalantirTerminalStateNotAWaypoint

A terminal state cell was never sampled as a waypoint, so it has no position in the waypoint Markov chain.

Fields

§state: usize

The offending terminal state cell index

§n_waypoints: usize

Number of sampled waypoints

§

PalantirStartCellNotFirstWaypoint

The first waypoint is not the start cell, which every consumer of the geodesic matrix assumes.

Fields

§start_cell: usize

The start cell the caller asked for

§first_waypoint: usize

The cell actually sitting in waypoint position zero

§

PalantirMaxIterationsTooSmall

The pseudotime refinement cap leaves no room for a single pass.

Fields

§max_iterations: usize

The requested cap

§minimum: usize

Smallest cap that runs at least one pass

§

PalantirKnnTooSmall

The neighbour count is too small to derive the back-edge bandwidth of the waypoint Markov chain, which indexes neighbour rank min(knn / 3 - 1, 30).

Carries the neighbour count the caller asked for, not the one clamped to the waypoint set. Too few waypoints raises [BixverseErrors::PalantirTooFewWaypoints] instead, so the message always names the parameter that can actually be changed.

Fields

§knn: usize

The requested neighbour count

§minimum: usize

Smallest neighbour count yielding a valid bandwidth rank

§

PalantirTooFewWaypoints

Too few waypoints were sampled to support the back-edge bandwidth rank, however large the requested knn is.

Fields

§n_waypoints: usize

Waypoints actually sampled

§minimum: usize

Smallest waypoint count yielding a valid bandwidth rank

§

PalantirWaypointDataMismatch

The waypoint data and the waypoint pseudotime disagree on the waypoint count.

Fields

§n_waypoints: usize

Rows of multiscale data restricted to the waypoints

§n_pseudotime: usize

Pseudotime values supplied alongside

§

PalantirStationaryRanksDegenerate

The stationary ranks have no spread, so the outlier cutoff separates nothing.

More than half the waypoints share a stationary mass, which puts the median absolute deviation at exactly zero and the cutoff exactly on the median. Roughly half of everything then clears it, the components merge, and the branching structure collapses to a single terminal state.

Fields

§n_waypoints: usize

Waypoints in the chain

§

PalantirDisconnectedGraph

Cells remained unreachable from the start cell after graph repair.

Fields

§n_unreachable: usize

Cells still at infinite geodesic distance

§repairs: usize

Repair edges added before giving up

§

PalantirDegeneratePseudotime

The pseudotime collapsed to a constant, or the Silverman bandwidth was zero or non-finite, so the refinement cannot be normalised.

Fields

§reason: &'static str

Which quantity degenerated

§

PalantirStationaryMassLost

The stationary power iteration lost all of its mass, which can only happen when the supplied chain is not row-stochastic or carries non-finite entries.

Fields

§iteration: usize

The pass on which the mass went non-positive or non-finite

§total: f64

The offending total mass

§

PalantirNonFiniteEigenvalue

An eigenvalue of the diffusion operator came back non-finite.

Clamping it would fabricate a plausible-looking scale factor out of a NaN, since f64::min returns the other operand for a NaN input.

Fields

§eigenvalue: f64

The offending eigenvalue

§

PalantirNEigsTooSmall

An explicit n_eigs below the smallest usable count was requested.

The trivial leading eigenvector is always dropped, so fewer than two eigenvectors leaves no multiscale coordinate at all. The request is refused rather than raised to the heuristic’s floor: silently changing a pinned count changes every distance downstream.

Fields

§n_eigs: usize

The requested eigenvector count

§minimum: usize

Smallest count leaving a usable coordinate

§

PalantirNoTerminalStates

No terminal states survived the rank cutoff and the caller supplied none.

§

PalantirNoBoundaryCells

The multiscale space has no boundary cells, so there is nothing to snap the start cell or a terminal-state candidate onto.

Boundaries are the per-component argmin and argmax, so an empty set means the multiscale space has no columns at all.

§

PalantirUnreachableFromWaypoints

Cells remained unreachable from the waypoint set when the geodesic matrix was built.

Distinct from [BixverseErrors::PalantirDisconnectedGraph], which reports the repair attempts. This fires after repair, inside the pseudotime solve, where the repair count is not in scope and claiming zero of them would be a lie.

Fields

§n_unreachable: usize

Cells at infinite geodesic distance from at least one waypoint

§

PalantirAbsorbingSolveFailed

The densified (I - Q) B = R solve did not converge.

Carries the achieved ‖(I - Q) B - R‖_inf, which is what actually distinguishes a near-singular system from ordinary rounding.

Fields

§residual: f64

Achieved ‖(I - Q) B - R‖_inf

§n_transient: usize

Total transient waypoints

§

PalantirAbsorbingRowSum

The absorption probabilities of one waypoint sum to more than one.

Split out from [BixverseErrors::PalantirAbsorbingSolveFailed] because the solve residual says nothing here: the factorisation can be exact to machine precision and still land on this, which is what makes the offending sum the only number worth reporting.

Fields

§row_sum: f64

The offending row sum

§waypoint: usize

Waypoint index the row belongs to

§n_transient: usize

Total transient waypoints

§

PalantirAbsorbingRowNotFinite

The absorption probabilities of one waypoint are not finite.

Split from [BixverseErrors::PalantirAbsorbingRowSum] because the two point at different bugs: a non-finite sum means a NaN reached the solve, while a sum above one means the chain was not sub-stochastic.

Fields

§row_sum: f64

The offending row sum

§waypoint: usize

Waypoint index the row belongs to

§n_transient: usize

Total transient waypoints

§

PalantirTooManyWaypointsForDenseSolve

The densified (I - Q) would exceed the supported size.

Fields

§n_transient: usize

Transient waypoint count requested

§limit: usize

The supported ceiling

§

MagicOutputTooLarge

The requested imputation would not fit in a sane amount of memory.

MAGIC output is unavoidably dense, so the only bound available is the caller’s gene selection. This is an error rather than a warning because the crate is driven from R, where a printed warning is easily missed and the alternative failure mode is the session being OOM-killed.

Fields

§n_cells: usize

Cells in the selection

§n_genes: usize

Genes in the selection

§max_elements: usize

The element ceiling that was exceeded

§

MagicKnnSelectionMismatch

The kNN inputs disagree with the requested cell selection.

Fields

§n_knn: usize

Rows in the supplied kNN graph

§n_selected: usize

Cells in the selection

§

MagicCellOutOfRange

A cell index in the selection sits outside the store.

Fields

§cell: usize

The offending cell index

§total_cells: usize

Cells in the store

§

MagicDuplicateCell

A cell index appears twice in the selection.

Fields

§cell: usize

The duplicated cell index

§

MagicStoreSizeMismatch

The operator was built against a different store than the one being read.

The operator’s cell lookup is indexed by global cell id, so reading a store with more cells than it was sized for would index past its end.

Fields

§operator_cells: usize

Cells the operator was built for

§store_cells: usize

Cells the reader actually holds

§

GeneTrendsShapeMismatch

The expression matrix does not have one row per cell.

Fields

§n_cells: usize

Rows in the expression matrix

§n_pseudotime: usize

Length of the pseudotime vector

§

GeneTrendsBranchEmpty

A branch selected no cells at all.

Fields

§branch: usize

Index of the offending branch

§

GeneTrendsBranchTooFewCells

A branch has too few cells to fit anything meaningful.

The reference has no such guard and will happily fit a 500-point grid to a single cell. The resulting curve is the prior, not the data.

Fields

§branch: usize

Index of the offending branch

§n_cells: usize

Cells the branch selected

§minimum: usize

Minimum the fit requires

§

GeneTrendsDegeneratePseudotime

Every cell in a branch shares the same pseudotime, so there is no grid to fit over.

Fields

§branch: usize

Index of the offending branch

§

GeneTrendsMissingFateProbabilities

Fate-probability weighting was asked for without the probabilities.

§

GeneTrendsFateColumnMismatch

The fate-probability matrix does not have one column per branch.

Branch i takes column i positionally, so a mismatch would silently weight every cell by the wrong fate rather than failing.

Fields

§n_columns: usize

Columns in the fate probability matrix

§n_branches: usize

Branches supplied

§

GeneTrendsFateShapeMismatch

The fate-probability matrix does not have one row per cell.

Fields

§n_rows: usize

Rows in the fate probability matrix

§n_cells: usize

Cells supplied

§

GeneTrendsCellOutOfRange

A branch cell index sits outside the cell range.

Fields

§branch: usize

Index of the offending branch

§cell: usize

The offending cell index

§n_cells: usize

Cells in the input

§

GeneTrendsZeroWeightBranch

Every cell in a branch carries zero fate-probability weight.

The Gaussian process treats a zero-weight observation as absent, so this would otherwise return the zero-mean prior and be indistinguishable from a genuinely flat gene.

Fields

§branch: usize

Index of the offending branch

§

GeneTrendsResolutionTooLow

The requested grid is too coarse to fit anything over.

Fields

§resolution: usize

Requested grid points

§minimum: usize

Minimum the fit requires

§

DialogueTooFewCellTypes

Fewer than two cell types were supplied.

There is nothing to correlate across with one.

Fields

§n_cell_types: usize

Cell types supplied

§

DialogueTooFewSharedSamples

Too few samples are represented in every cell type.

The decomposition runs on the samples the cell types share, and that intersection is what has come up short.

Fields

§found: usize

Samples in the intersection

§minimum: usize

Minimum the decomposition requires

§

DialogueTooFewFeatures

Too few features in one cell type survived the ANOVA filter.

A feature is kept when it varies across samples. If almost none do, the cell type carries no sample-level signal to decompose, and the usual fixes are to drop it from the run or to set the spatial flag.

Fields

§cell_type: usize

Index of the offending cell type

§found: usize

Features that passed

§total: usize

Features tested

§minimum: usize

Minimum the decomposition requires

§

DialogueTooFewAbundantSamples

Too few samples carry enough cells for the ANOVA filter to run.

Fields

§cell_type: usize

Index of the offending cell type

§found: usize

Samples meeting the threshold

§min_cells: usize

Cells a sample must contribute

§

CpdbGeneIndexOutOfRange

A partner subunit points outside the genes in the store.

Fields

§index: usize

The offending index

§n_genes: usize

Number of genes in the store

§

CpdbCellIndexOutOfRange

A cluster lists a cell outside the store.

Fields

§index: usize

The offending index

§n_cells: usize

Number of cells in the store

§

CpdbEmptyPartner

An interaction has a partner without any subunit genes.

Fields

§interaction: usize

Index of the offending interaction

§

CpdbClusterOverlap

A cell was assigned to more than one cluster.

The permutation shuffles one label per cell, so clusters must be disjoint.

Fields

§cell: usize

The offending cell index

§

ScTypeClusterAssignmentNotEqualNCells

Error when number of cluster assignment != the number of cells

Fields

§n_cells: usize

Number of cells

§n_cluster_assignment: usize

Number of cluster assignments

§

ScTypeGraphNodesNotEqualNCells

Error when the smoothing graph node count != the number of cells

Fields

§n_cells: usize

Number of cells

§n_nodes: usize

Number of nodes in the smoothing graph

§

SctGeneIndexOutOfRange

A step-1 gene index pointed outside the modelled gene set.

Fields

§index: usize

The offending index

§n_genes: usize

Number of modelled genes

§

SctTooFewGenesToRegularise

Too few step-1 genes survived outlier and Poisson exclusion to smooth.

Two is the bare minimum a bandwidth can be estimated from. In practice this means the subsample was dominated by Poisson genes, which is what a very shallow dataset looks like.

Fields

§kept: usize

Genes left after exclusion

§total: usize

Genes the step-1 fit started from

§

SctSmoothingLeftAGeneUnfitted

The kernel smoothing produced no value for a gene.

Means no retained step-1 gene fell inside the kernel support at that gene’s abundance, which a bandwidth this wide should make impossible.

Fields

§gene: usize

Position of the gene in the modelled set

§

SctNoGenesPassFilter

No gene passed the min_cells detection filter.

Fields

§min_cells: usize

The filter that rejected everything

§n_genes: usize

Genes the filter was applied to

§

SctGeneNotModelled

A gene handed to the residual PCA is not covered by the model.

Fields

§gene: usize

Store index of the gene

§

PcaResidualsWithClr

Pearson residuals and the shifted CLR transformation were both asked for.

CLR rewrites the stored log-normalised layer, which the residual path never reads, so combining them would quietly do nothing.

§

SctCovariateLengthMismatch

Covariate columns handed in disagree in length.

Fields

§name: String

Name of the offending covariate

§expected: usize

Length the other columns had

§found: usize

Length this one had

§

SctCovariateCountMismatch

The covariates supplied do not match what the model was fitted with.

Fields

§model: usize

Covariates the model carries

§supplied: usize

Covariates the caller supplied

§

ResidualGroupLabelLengthMismatch

Group labels disagree in length with the selected cells.

Fields

§n_labels: usize

Labels supplied

§n_cells: usize

Cells selected

§

ResidualEmptyGroup

A group id has no cells in it.

Labels must densely cover 0..n_groups. A gap means the caller coded a factor without dropping its unused levels, and a model would be fitted against nothing.

Fields

§group: usize

The empty group id

§n_groups: usize

Groups the labels imply

§

ResidualEmptyGeneIntersection

No gene is modelled in every group.

The shared feature axis is the intersection of the per-group modelled sets, so an empty intersection means the groups have no gene in common that passes min_cells everywhere. Usually one very shallow sample.

Fields

§n_groups: usize

Groups that were intersected

§

AnalyticPearsonZeroTotal

The count block handed to the analytic Pearson model sums to zero.

mu_cg = n_c * p_g divides by the grand total, so a block of pure zeros has no model at all rather than a degenerate one.

§

AnalyticPearsonInvalidTheta

A non-positive overdispersion was supplied.

Fields

§theta: f64

The offending value

§

ResidualInvalidClipRange

An unusable residual clipping range was supplied.

f64::clamp panics when the bounds are inverted or either is NaN, so this has to be caught before a rayon worker reaches it.

Fields

§lo: f64

Lower bound supplied

§hi: f64

Upper bound supplied

§

ResidualDuplicateCells

The selected cells contain a repeated index.

The readers key their selection by an IndexSet, which deduplicates, while the residual row is sized by the raw selection. A duplicate would therefore shift every later cell into the wrong slot rather than erroring.

Fields

§n_unique: usize

Distinct cells in the selection

§n_cells: usize

Cells supplied

§

ResidualGenesNotAscending

A gene set that has to be ascending is not.

Gene lookups are binary searches, so an unsorted axis silently returns the wrong position rather than failing.

Fields

§name: &'static str

What was out of order

§

ResidualGroupModelCountMismatch

The group labels imply a different number of groups than there are models.

Fields

§implied: usize

Groups the labels imply

§models: usize

Models supplied

§

ResidualGroupLabelOutOfRange

A group label is outside the range the models cover.

Fields

§label: usize

The offending label

§n_groups: usize

Groups available

§

ResidualNonFiniteVariance

A residual variance came out non-finite.

Always an upstream problem, typically a model deserialised with a zero or missing scalar. Reported rather than floored, because a floored NaN silently ranks the gene last in feature selection.

Fields

§gene: usize

Store index of the gene

§value: f64

The offending value

§

ResidualRowLengthMismatch

The residual row’s counts and indices disagree in length.

Fields

§n_counts: usize

Counts supplied

§n_indices: usize

Indices supplied

§

ResidualCellIndexOutOfRange

A residual row’s cell index points outside the selected cells.

Fields

§index: usize

The offending index

§n_cells: usize

Cells selected

§

ResidualEmptySelectionRequest

Feature selection was asked for no genes, or handed no groups.

Fields

§what: &'static str

What was empty

§

SctDispersionSearchFailed

The overdispersion search failed at every point it evaluated.

Means the adjusted profile likelihood could not be computed anywhere in the bracket, typically a design that is rank-deficient for this gene’s weights. The search would otherwise have minimised a constant and returned a fit built on a meaningless dispersion.

Fields

§reason: String

The first underlying error, rendered

§

ResidualGroupFitFailed

One group’s fit failed.

Wraps the underlying error so that a failure in group 7 of 8 is not indistinguishable from one in group 0. The usual cause is a single shallow sample where no gene clears min_cells.

Fields

§group: usize

The group that failed

§reason: String

The underlying error, rendered

§

SctCovariateNameMismatch

The covariates supplied are not the ones the model was fitted with.

Only the count is cheap to check, and the count matching is exactly the case where a reordered data frame goes unnoticed, so the names are compared too.

Fields

§position: usize

Position in the design, excluding the intercept

§model: String

Name the model carries

§supplied: String

Name the caller supplied

§

SctCellIndexOutOfRange

A cell index handed to scTransform is outside the selection.

Fields

§index: usize

The offending index

§n_cells: usize

Cells selected

§

SctModelWithoutCoefficients

A fitted model carries no design columns at all.

§

PcaResidualsWithVarianceNormalisation

Variance normalisation was asked for on the residual PCA path.

Residuals carry the biological signal as variance, which is the point of the transformation. Dividing it back out per gene flattens exactly the ranking the transformation produces, so this is refused rather than silently honoured.

§

CellSweepEmptyMaskMissing

The caller asked for a supplied empty droplet mask but did not give one.

§

CellSweepBadExpectedCells

The expected cell count cannot be turned into a library size cutoff.

Fields

§expected: usize

Number of expected cells requested

§barcodes: usize

Number of barcodes available

§

CellSweepKneeNotFound

The knee detector could not find a cutoff.

Fields

§barcodes: usize

Number of barcodes that survived the minimum count filter

§

CellSweepTooFewEmptyDroplets

A sample has too few empty droplets to estimate an ambient profile.

Fields

§sample_id: String

Identifier of the offending sample

§found: usize

Empty droplets found

§required: usize

Empty droplets required

§

CellSweepNoRealCells

A sample carries no annotated barcodes.

Fields

§sample_id: String

Identifier of the offending sample

§

CellSweepCelltypeOutOfRange

A cell-type code points outside the profile matrix.

Fields

§sample_id: String

Identifier of the offending sample

§code: usize

The offending cell-type code

§n_celltypes: usize

Number of cell types declared

§

CellSweepLabelLengthMismatch

The label vector does not line up with the barcode vector.

Fields

§sample_id: String

Identifier of the offending sample

§n_cells: usize

Number of real barcodes

§n_labels: usize

Number of labels given

§

CellSweepFreezeEmptiesUnsupported

freeze_empties = false is not supported.

§

CellSweepDiverged

The EM produced a non-finite log-likelihood.

Fields

§sample_id: String

Identifier of the offending sample

§iteration: usize

Iteration at which the log-likelihood went non-finite

§

WNNModalitySampleMismatch

Error if the modalities do not have the same number of cells

§

WNNKnnLargerThanKnnRange

Error if k_nn > knn_range

§

WNNSigmaIdxOutOfRange

Error if sigma_idx >= knn_range

§

WNNSnnLargerThanKnnRange

Error if s_nn > knn_range

§

WNNKnnRowCountMismatch

Error if a modality’s kNN row count does not match n_cells

Fields

§modality: usize

0 or 1

§expected: usize

Expected count

§found: usize

Found count

§

WNNKnnDistRowCountMismatch

Error if a modality’s kNN distance row count does not match n_cells

Fields

§modality: usize

0 or 1

§expected: usize

Expected count

§found: usize

Found count

§

WNNInsufficientNeighbours

Error if a modality has fewer than knn_range neighbours per cell

Fields

§modality: usize

0 or 1

§expected: usize

knn_range

§found: usize

Actual neighbour count in row 0

Trait Implementations§

Source§

impl Debug for ScErrors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for ScErrors

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for ScErrors

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AnnSearchErrors> for ScErrors

Source§

fn from(source: AnnSearchErrors) -> ScErrors

Converts to this type from the input type.
Source§

impl From<CoreErrors> for ScErrors

Source§

fn from(source: CoreErrors) -> ScErrors

Converts to this type from the input type.
Source§

impl From<EdgeErrors> for ScErrors

Source§

fn from(source: EdgeErrors) -> ScErrors

Converts to this type from the input type.
Source§

impl From<MethodsErrors> for ScErrors

Source§

fn from(source: MethodsErrors) -> ScErrors

Converts to this type from the input type.
Source§

impl From<ScDataErrors> for ScErrors

Source§

fn from(source: ScDataErrors) -> ScErrors

Converts to this type from the input type.
Source§

impl From<SparseErrors> for ScErrors

Sparse structure errors surface through the core variant, as before the sparse structures moved to bixverse-sparse.

Source§

fn from(err: SparseErrors) -> ScErrors

Converts to this type from the input type.

Auto Trait Implementations§

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> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

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> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

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<T> Separable for T
where T: Display,

Source§

fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String

Adds separators according to the given SeparatorPolicy. Read more
Source§

fn separate_with_commas(&self) -> String

Inserts a comma every three digits from the right. Read more
Source§

fn separate_with_spaces(&self) -> String

Inserts a space every three digits from the right. Read more
Source§

fn separate_with_dots(&self) -> String

Inserts a period every three digits from the right. Read more
Source§

fn separate_with_underscores(&self) -> String

Inserts an underscore every three digits from the right. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

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

Source§

fn vzip(self) -> V