redicat_lib/engine/position/
mod.rs

1//! Genomic position primitives used across REDICAT pipelines.
2//!
3//! This module provides data structures for storing information about genomic positions.
4//! The main trait is [`Position`], which defines the interface for position data structures.
5//!
6//! # Implementations
7//!
8//! - [`pileup_position::PileupPosition`]: Detailed per-base information from pileup analysis
9//! - [`range_positions::RangePosition`]: Position information for genomic ranges
10
11pub mod pileup_position;
12pub mod range_positions;
13
14use serde::Serialize;
15use smartstring::alias::String;
16
17/// A serializable object meant to hold all information about a position.
18///
19/// This trait defines the interface for position data structures. All implementations
20/// must be serializable and provide a way to create a new position with a reference
21/// sequence and position.
22pub trait Position: Default + Serialize {
23    /// Create a new position with the given reference sequence name and position.
24    fn new(ref_seq: String, pos: u32) -> Self;
25}