koth-ms 0.10.0

High-performance LC-MS feature finder for timsTOF and mzML data
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum KothError {
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Unsupported input format: {0}")]
    UnsupportedFormat(String),

    #[error("mzML parse error: {0}")]
    MzmlError(String),

    #[cfg(feature = "tdf")]
    #[error("Bruker TDF error: {0}")]
    TdfError(String),

    // Ungated: the `thermo` feature does not enable `tdf`, so the Thermo reader
    // needs an error variant that exists in a thermo-only build.
    #[error("Thermo .raw error: {0}")]
    ThermoError(String),

    #[error("CSV write error: {0}")]
    CsvError(#[from] csv::Error),

    #[error("JSON error: {0}")]
    JsonError(#[from] serde_json::Error),

    #[error("Config error: {0}")]
    ConfigError(String),

    #[error("No spectra found in input file")]
    NoSpectra,

    #[error("Parquet error: {0}")]
    ParquetError(String),
}