Struct noodles_sam::record::cigar::Cigar [−][src]
pub struct Cigar(_);
Expand description
A SAM record CIGAR.
Implementations
Calculates the alignment span over the reference sequence.
This sums the lengths of the CIGAR operations that consume the reference sequence, i.e.,
alignment matches (M
), deletions from the reference (D
), skipped reference regions
(S
), sequence matches (=
), and sequence mismatches (X
).
Examples
use noodles_sam::record::{cigar::{op::Kind, Op}, Cigar};
let cigar = Cigar::from(vec![
Op::new(Kind::Match, 36),
Op::new(Kind::Deletion, 4),
Op::new(Kind::SoftClip, 8),
]);
assert_eq!(cigar.reference_len(), 40);
Calculates the read length.
This sums the lengths of the CIGAR operations that consume the read, i.e., alignment
matches (M
), insertions to the reference (I
), soft clips (S
), sequence matches (=
),
and sequence mismatches (X
).
Examples
use noodles_sam::record::{cigar::{op::Kind, Op}, Cigar};
let cigar = Cigar::from(vec![
Op::new(Kind::Match, 36),
Op::new(Kind::Deletion, 4),
Op::new(Kind::SoftClip, 8),
]);
assert_eq!(cigar.read_len(), 44);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cigar
impl UnwindSafe for Cigar
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.