Skip to main content

ref_solver/catalog/
mod.rs

1//! Reference genome catalog storage and indexing.
2//!
3//! The catalog contains definitions of known human reference genomes with their
4//! contigs, MD5 checksums, and metadata. An embedded catalog is compiled into
5//! the binary, but custom catalogs can also be loaded from JSON files.
6//!
7//! ## Embedded Catalog
8//!
9//! The default catalog includes common reference genomes:
10//!
11//! - **GRCh38/hg38**: UCSC, NCBI, Broad analysis set, DRAGEN, hs38, hs38DH
12//! - **GRCh37/hg19**: UCSC, NCBI, Broad b37, hs37d5
13//! - **T2T-CHM13**: Complete telomere-to-telomere assembly
14//!
15//! ## Example
16//!
17//! ```rust,no_run
18//! use ref_solver::ReferenceCatalog;
19//! use ref_solver::core::types::ReferenceId;
20//!
21//! // Load embedded catalog
22//! let catalog = ReferenceCatalog::load_embedded().unwrap();
23//!
24//! // List all references
25//! for reference in &catalog.references {
26//!     println!("{}", reference.id);
27//! }
28//!
29//! // Get a specific reference
30//! let hg38 = catalog.get(&ReferenceId::new("hg38_ucsc"));
31//! ```
32//!
33//! ## Custom Catalogs
34//!
35//! Custom catalogs can be created by exporting and modifying the embedded catalog:
36//!
37//! ```rust,no_run
38//! use ref_solver::ReferenceCatalog;
39//! use std::path::Path;
40//!
41//! // Export to JSON
42//! let catalog = ReferenceCatalog::load_embedded().unwrap();
43//! let json = catalog.to_json().unwrap();
44//!
45//! // Load from custom file
46//! let custom = ReferenceCatalog::load_from_file(Path::new("my_catalog.json")).unwrap();
47//! ```
48
49pub mod builder;
50pub mod hierarchical;
51pub mod index;
52pub mod store;