pub struct YaraRecord {Show 19 fields
pub read_pair_index: u32,
pub is_read1: bool,
pub contig_id: u32,
pub pos: u32,
pub is_reverse: bool,
pub is_secondary: bool,
pub is_unmapped: bool,
pub mapq: u8,
pub nm: u8,
pub x0: u16,
pub x1: u16,
pub mate_contig_id: u32,
pub mate_pos: u32,
pub tlen: i32,
pub flag: u16,
pub cigar: Vec<CigarOp>,
pub seq: Option<Vec<u8>>,
pub qual: Option<Vec<u8>>,
pub xa: Option<String>,
}Expand description
A single alignment record returned by the YARA mapper.
This is a fully-owned Rust type — all heap data (CIGAR, sequence, quality, XA tag) has been copied from the C++ side and the C++ memory freed.
Fields§
§read_pair_index: u32Index of the read pair in the input batch (0-based).
is_read1: boolWhether this record is for the first read in the pair.
contig_id: u32Reference contig index.
pos: u320-based leftmost position on the reference.
is_reverse: boolWhether the read is mapped to the reverse strand.
is_secondary: boolWhether this is a secondary alignment.
is_unmapped: boolWhether the read is unmapped.
mapq: u8Mapping quality.
nm: u8Edit distance (NM tag).
x0: u16Number of co-optimal alignments (X0 tag).
x1: u16Number of sub-optimal alignments (X1 tag).
mate_contig_id: u32Mate’s reference contig index.
mate_pos: u32Mate’s 0-based position.
tlen: i32Template length (TLEN).
flag: u16Full SAM flag field.
cigar: Vec<CigarOp>CIGAR operations (empty for secondaries without align_secondary).
seq: Option<Vec<u8>>Read sequence (None for secondary records).
qual: Option<Vec<u8>>Base qualities (None for secondary records).
xa: Option<String>XA tag string (only when secondary_mode=Tag, otherwise None).
Implementations§
Source§impl YaraRecord
impl YaraRecord
Sourcepub fn cigar_string(&self) -> String
pub fn cigar_string(&self) -> String
CIGAR string in SAM format (e.g., “50M2I48M”).
Trait Implementations§
Source§impl Clone for YaraRecord
impl Clone for YaraRecord
Source§fn clone(&self) -> YaraRecord
fn clone(&self) -> YaraRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more