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
//! Safe Rust wrapper for the YARA read mapper.
//!
//! This crate provides a high-level API for building and loading YARA FM
//! indices, mapping paired-end reads in batches, and retrieving alignment
//! results as owned Rust types — without SAM serialization/deserialization
//! overhead.
//!
//! ## Example
//!
//! ```no_run
//! use yara_mapper::{IndexerOptions, MapperOptions, ReadBatch, ReadEnd, YaraIndexer, YaraMapper};
//!
//! // Build an index from a FASTA file.
//! let indexer = YaraIndexer::build("ref.fasta", "ref", &IndexerOptions::default()).unwrap();
//! println!("Indexed {} contigs", indexer.contig_count());
//!
//! // Open the index and map reads.
//! let mapper = YaraMapper::open("ref", &MapperOptions::default()).unwrap();
//! let mut batch = ReadBatch::new();
//! batch.push(
//! "read1",
//! ReadEnd { seq: b"ACGTACGT", qual: b"IIIIIIII" },
//! ReadEnd { seq: b"TGCATGCA", qual: b"IIIIIIII" },
//! ).unwrap();
//! let records = mapper.map_paired(&batch).unwrap();
//! for rec in &records {
//! println!("contig={} pos={} mapq={}", rec.contig_id, rec.pos, rec.mapq);
//! }
//! ```
pub use YaraError;
pub use ;
pub use ;
pub use ;
pub use ;