#[non_exhaustive]pub enum Error {
Show 43 variants
UnknownAlignState(String),
InvalidSeqLength(String),
InvalidAlignLength(String),
InvalidContigAndStart(String),
InvalidAlignCoords(String),
InvalidModCoords(String),
InvalidModProbs(String),
InvalidSeq(String),
InvalidBase(String),
InvalidReadID(String),
InvalidModType(String),
EmptyModType(String),
RustHtslibError(Error),
IntConversionError(TryFromIntError),
StringConversionError(Utf8Error),
Utf8ConversionError(FromUtf8Error),
JsonParseError(Error),
OrdPairConversion(String),
IntParseError(ParseIntError),
FloatParseError(ParseFloatError),
InputOutputError(Error),
FormattingError(Error),
CsvError(Error),
InvalidDuplicates(String),
InvalidState(String),
WriteOutput(String),
NotImplemented(String),
WrongOrder(String),
UnavailableData(String),
Unmapped(String),
Zero(String),
ZeroSeqLen(String),
InvalidRegion {
region: String,
pos: u64,
contig_length: u64,
},
InvalidSorting(String),
WindowDensBelowThres {
density: F32Bw0and1,
threshold: F32Bw0and1,
},
EmptyWindow(String),
InsufficientDataSize(String),
Arithmetic(String),
BuilderError(UninitializedFieldError),
BuilderValidation(String),
FromCharError(TryFromCharError),
PolarsError(PolarsError),
SimulateDNASeqCIGAREndProblem(String),
}Expand description
Enum that covers errors in our module.
Any error arising from our crate does not have the suffix ‘Error’. If we are deriving an error from an error from another crate, and that has a suffix ‘Error’, we have let it be in our naming of the error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownAlignState(String)
Alignment of sequence is not known
InvalidSeqLength(String)
Failure upon extracting sequence length
InvalidAlignLength(String)
Failure upon extracting or calculating alignment length of molecule
InvalidContigAndStart(String)
Contig and start of alignment of molecule are invalid
InvalidAlignCoords(String)
Alignment coordinates (contig/start/end) are invalid.
InvalidModCoords(String)
Modification coordinates are invalid
InvalidModProbs(String)
Modification probabilities are invalid
InvalidSeq(String)
Sequence is invalid
InvalidBase(String)
Base is invalid (not A, G, C, T, or N)
InvalidReadID(String)
Read id of molecule is invalid
InvalidModType(String)
Modification type is invalid. Mod types are indicated in mod BAM files like so: …C+m… where C is the base and m is the modification type, in this case methylation.
EmptyModType(String)
Modification type is empty
RustHtslibError(Error)
Some error from the rust htslib library we use to read BAM files
IntConversionError(TryFromIntError)
Error upon conversion from integer
StringConversionError(Utf8Error)
Error involving string conversion
Utf8ConversionError(FromUtf8Error)
Error converting from UTF-8 bytes to string
JsonParseError(Error)
Error parsing JSON
OrdPairConversion(String)
OrdPair is an ordered pair, which can be obtained from
a string of the correct format. This error says string
conversion failed.
IntParseError(ParseIntError)
Problem parsing integers
FloatParseError(ParseFloatError)
Problem parsing floats
InputOutputError(Error)
Generic Input-Output error
FormattingError(Error)
Generic formatting error
CsvError(Error)
Problem reading or parsing CSV files
InvalidDuplicates(String)
Error when unexpected duplicates are seen
InvalidState(String)
Generic error used when program hits an invalid state
WriteOutput(String)
Error while writing output
NotImplemented(String)
Generic not implemented error
WrongOrder(String)
General error when ordering of items in some context is wrong.
Data not available
Unmapped(String)
Read is unmapped, use this whenever some function meant for a mapped read is called on an unmapped read
Zero(String)
Zero values used where they should not be
ZeroSeqLen(String)
Zero sequence length
InvalidRegion
Genomic region coordinates exceed contig boundaries
Fields
InvalidSorting(String)
Sorting validation failure
WindowDensBelowThres
Window density is below threshold
Fields
density: F32Bw0and1The density value that was below threshold
threshold: F32Bw0and1The threshold value
EmptyWindow(String)
Window does not contain any data
InsufficientDataSize(String)
Data is not of sufficient size (e.g. in a window)
Arithmetic(String)
Arithmetic error
BuilderError(UninitializedFieldError)
Problem parsing items while building structs with Builder methods
BuilderValidation(String)
Problem validating items with a Builder method
FromCharError(TryFromCharError)
Problem parsing items while converting between DNA base representations
PolarsError(PolarsError)
Error from Polars during DataFrame construction or manipulation
SimulateDNASeqCIGAREndProblem(String)
Error simulating DNA sequences
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<ParseFloatError> for Error
impl From<ParseFloatError> for Error
Source§fn from(source: ParseFloatError) -> Self
fn from(source: ParseFloatError) -> Self
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<PolarsError> for Error
impl From<PolarsError> for Error
Source§fn from(source: PolarsError) -> Self
fn from(source: PolarsError) -> Self
Source§impl From<TryFromCharError> for Error
impl From<TryFromCharError> for Error
Source§fn from(source: TryFromCharError) -> Self
fn from(source: TryFromCharError) -> Self
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Source§impl From<UninitializedFieldError> for Error
impl From<UninitializedFieldError> for Error
Source§fn from(source: UninitializedFieldError) -> Self
fn from(source: UninitializedFieldError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
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
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
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt 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.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.Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.