1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// lib.rs - cgdist library root
//! # cgdist - High-performance SNP/indel-level distance calculator for core genome MLST analysis
//!
//! This library provides a high-performance implementation for calculating genetic distances
//! between bacterial samples using core genome MLST (cgMLST) data. It supports multiple
//! hashing algorithms and is compatible with chewBACCA allele calling.
//!
//! ## Features
//!
//! - **High performance**: Optimized parallel processing and caching
//! - **Plugin system**: Support for CRC32, SHA256, MD5, and custom hashers
//! - **Multiple formats**: TSV, CSV, PHYLIP, NEXUS output formats
//! - **Flexible filtering**: Sample and loci filtering with regex and file lists
//! - **Quality control**: Configurable thresholds for data completeness
//! - **chewBACCA compatible**: Full backward compatibility with existing workflows
//!
//! ## Basic Usage
//!
//! ```rust,no_run
//! use cgdist::prelude::*;
//!
//! // Load allelic profiles with CRC32 hasher (chewBACCA compatible)
//! let matrix = AllelicMatrix::from_file_with_hasher(
//! std::path::Path::new("profiles.tsv"),
//! "-", // missing character
//! "crc32", // hasher type
//! 0.0, // sample threshold
//! 0.0, // locus threshold
//! None, None, None, None, // filters
//! None, None, None, None,
//! )?;
//!
//! // Calculate distances
//! let engine = DistanceEngine::new(AlignmentConfig::default(), "crc32".to_string());
//! let distances = calculate_distance_matrix(
//! &matrix.samples,
//! &matrix.loci_names,
//! &engine,
//! DistanceMode::SnpsOnly,
//! 0, // min loci
//! false, // hamming fallback
//! );
//! # Ok::<(), String>(())
//! ```
// Re-export all main modules
// Convenience prelude for common imports
// Re-export main types at the root level for convenience
pub use ;
pub use ;
pub use ;
pub use ;
/// Library version
pub const VERSION: &str = env!;
/// Get library information