Skip to main content

EdgeErrors

Enum EdgeErrors 

Source
pub enum EdgeErrors {
Show 23 variants InvalidArgument(String), MustBePositive(String), UnknownMethod { kind: &'static str, name: String, expected: &'static str, }, ShapeMismatch { expected: (usize, usize), got: (usize, usize), }, LengthMismatch { name: &'static str, expected: usize, got: usize, }, EmptyCounts { n_genes: usize, n_samples: usize, }, DesignNotFullRank { n_cols: usize, rank: usize, }, NotEstimableContrast { contrast: usize, coef: usize, }, CoefOutOfRange { index: usize, n_coef: usize, }, CholeskyFailed(String), SolveFailed(String), EigenFailed(String), NoConvergence { routine: &'static str, iterations: usize, last_delta: f64, }, RootNotBracketed { lower: f64, upper: f64, f_lower: f64, f_upper: f64, }, InvalidBounds { index: usize, lower: f64, upper: f64, }, MalformedSparse(String), NoGenesAfterFiltering { n_genes: usize, }, InvalidReferenceColumn(String), InvalidDispersion(f64), AplWorkspaceNotStarted, SubjectsNotContiguous { subject: usize, }, MissingIntercept, TooFewSubjects { required: usize, got: usize, },
}
Expand description

Every failure mode in the crate.

Variants§

§

InvalidArgument(String)

A parameter fell outside its documented domain.

§

MustBePositive(String)

A count, size or index that must be non-zero was zero.

§

UnknownMethod

A named method string did not match any known variant.

Fields

§kind: &'static str

What kind of method was being selected, e.g. “normalisation”

§name: String

The string the caller supplied

§expected: &'static str

Comma-separated list of accepted values

§

ShapeMismatch

Two operands disagreed on shape.

Fields

§expected: (usize, usize)

Shape that was required

§got: (usize, usize)

Shape that was supplied

§

LengthMismatch

A vector was not the length its consumer required.

Fields

§name: &'static str

Name of the offending argument

§expected: usize

Length that was required

§got: usize

Length that was supplied

§

EmptyCounts

The counts matrix had no genes or no samples.

Fields

§n_genes: usize

Number of genes (rows)

§n_samples: usize

Number of samples (columns)

§

DesignNotFullRank

The design matrix is rank deficient, so coefficients are not identifiable.

Fields

§n_cols: usize

Number of columns in the design

§rank: usize

Numerical rank actually found

§

NotEstimableContrast

A contrast put weight on a coefficient the design cannot estimate.

Fields

§contrast: usize

Index of the offending contrast

§coef: usize

Index of the non-estimable coefficient it touches

§

CoefOutOfRange

A contrast or coefficient index pointed outside the design.

Fields

§index: usize

Index that was requested

§n_coef: usize

Number of coefficients available

§

CholeskyFailed(String)

A Cholesky factorisation failed, meaning the matrix was not positive definite.

§

SolveFailed(String)

A linear solve produced a non-finite result.

§

EigenFailed(String)

A symmetric eigendecomposition did not converge.

§

NoConvergence

A scalar optimiser or root finder did not converge inside its iteration budget.

Fields

§routine: &'static str

Name of the routine that gave up

§iterations: usize

Iterations actually performed

§last_delta: f64

Magnitude of the final update

§

RootNotBracketed

A bracketing root finder was handed an interval that does not bracket a root.

Fields

§lower: f64

Lower end of the interval

§upper: f64

Upper end of the interval

§f_lower: f64

Function value at lower

§f_upper: f64

Function value at upper

§

InvalidBounds

A bounded optimisation was given a box with a lower bound above its upper bound.

Fields

§index: usize

Index of the offending parameter

§lower: f64

Lower bound supplied

§upper: f64

Upper bound supplied

§

MalformedSparse(String)

A compressed sparse structure violated its own invariants.

§

NoGenesAfterFiltering

Every gene was filtered out before a normalisation factor could be computed.

Fields

§n_genes: usize

Number of genes present before filtering

§

InvalidReferenceColumn(String)

The reference column for TMM could not be chosen or was out of range.

§

InvalidDispersion(f64)

A dispersion outside [0, inf) was supplied to a negative binomial routine.

§

AplWorkspaceNotStarted

An adjusted profile likelihood was asked for before a gene was loaded.

§

SubjectsNotContiguous

Cells were not grouped contiguously by subject, which every inner loop assumes.

Fields

§subject: usize

Identifier of the subject found in multiple blocks

§

MissingIntercept

The design matrix handed to NEBULA has no intercept column.

§

TooFewSubjects

Fewer subjects than the mixed model can identify a random effect from.

Fields

§required: usize

Minimum number of subjects needed

§got: usize

Number of subjects supplied

Trait Implementations§

Source§

impl Debug for EdgeErrors

Source§

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

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

impl Display for EdgeErrors

Source§

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

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

impl Error for EdgeErrors

1.30.0 · 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

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