use hts::alignment::{AlignmentFile, AlignmentReader}; fn main() { let bam = AlignmentFile::open("/home/haohou/base2/data/hg002.chr1.bam").unwrap(); let aln = bam.read_next().unwrap().unwrap(); println!("{}", aln); let cigar = aln.cigar(); for c in cigar { println!("{:?}", c); } println!("{}", aln.query_name()); for n in aln.sequence().zip(aln.per_base_qual().iter()) { println!("{:?}", n); } for aux in aln.aux_iter() { println!("{:?}", aux); } println!("{:?}", aln.chrom_name()); }