Skip to main content

umi_core/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ExtractError {
5    #[error("invalid barcode pattern: {0}")]
6    InvalidPattern(String),
7
8    #[error("read too short ({read_len} bp) for pattern ({pattern_len} bp)")]
9    ReadTooShort { read_len: usize, pattern_len: usize },
10
11    #[error("regex did not match read sequence")]
12    RegexNoMatch,
13
14    #[error("I/O error: {0}")]
15    Io(#[from] std::io::Error),
16
17    #[error("FASTQ parse error: {0}")]
18    FastqParse(String),
19}