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
//! Bioinformatics utilities for SciRS2.
//!
//! This module provides a comprehensive set of tools for analysing biological
//! sequences (DNA, RNA, protein), performing sequence alignment, and computing
//! phylogenetic distances.
//!
//! ## Submodules
//!
//! | Submodule | Description |
//! |-----------|-------------|
//! | `sequence` | Sequence types, GC content, complement, translation, k-mer counting |
//! | `alignment` | Needleman-Wunsch, Smith-Waterman, Levenshtein edit distance |
//! | `stats` | Nucleotide / di-nucleotide frequencies, codon usage bias |
//! | `phylo` | Hamming distance, Jukes-Cantor model, pairwise distance matrix |
//!
//! ## Quick Start
//!
//! ```rust
//! use scirs2_core::bioinformatics::sequence::{
//! NucleotideSequence, SequenceType, gc_content, reverse_complement, translate,
//! };
//! use scirs2_core::bioinformatics::alignment::{needleman_wunsch, edit_distance};
//! use scirs2_core::bioinformatics::stats::nucleotide_frequencies;
//! use scirs2_core::bioinformatics::phylo::distance_matrix;
//!
//! // Validate and wrap a sequence
//! let dna = NucleotideSequence::new(b"ATGCATGC", SequenceType::Dna).expect("should succeed");
//! assert_eq!(dna.gc_content(), 0.5);
//!
//! // Reverse complement
//! let rc = reverse_complement(b"ATGCTT");
//! assert_eq!(rc, b"AAGCAT");
//!
//! // Global alignment
//! let (score, a1, a2) = needleman_wunsch(b"AGCT", b"AGT", 1, -1, -2).expect("should succeed");
//! assert_eq!(a1.len(), a2.len());
//!
//! // Edit distance
//! assert_eq!(edit_distance(b"ATGC", b"ATCC"), 1);
//!
//! // Nucleotide frequencies [A, C, G, T]
//! let freqs = nucleotide_frequencies(b"AACGT");
//! assert!((freqs[0] - 0.4).abs() < 1e-10);
//!
//! // Pairwise distance matrix
//! let seqs: &[&[u8]] = &[b"ATGC", b"ATGC", b"TTGT"];
//! let mat = distance_matrix(seqs).expect("should succeed");
//! assert_eq!(mat[[0, 0]], 0.0);
//! ```
// Convenience re-exports for the most commonly used items.
pub use ;
pub use ;
pub use ;
pub use ;