use thiserror::Error;
#[derive(Error, Debug)]
pub enum DnaError {
#[error("Invalid DNA sequence: {0}")]
InvalidSequence(String),
#[error("K-mer index error: {0}")]
IndexError(String),
#[error("Alignment error: {0}")]
AlignmentError(String),
#[error("Variant calling error: {0}")]
VariantCallError(String),
#[error("Pipeline error: {0}")]
PipelineError(String),
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("Vector database error: {0}")]
VectorDbError(#[from] ruvector_core::RuvectorError),
#[error("Dimension mismatch: expected {expected}, got {actual}")]
DimensionMismatch { expected: usize, actual: usize },
#[error("Empty sequence provided")]
EmptySequence,
#[error("Invalid quality score: {0}")]
InvalidQuality(u8),
#[error("Invalid k-mer size: {0}")]
InvalidKmerSize(usize),
#[error("Parse error: {0}")]
ParseError(String),
}
pub type Result<T> = std::result::Result<T, DnaError>;