use hts::vcf::{VcfFile, VcfReader};
fn main() {
let vcf = VcfFile::open("/tmp/in.vcf.gz").unwrap();
let rec = vcf.read_next().unwrap().unwrap();
println!("{}", rec);
println!("{:?}", rec.ref_seq_str());
println!("{:?}", rec.alt_seq_str());
for filter in rec.filters().unwrap() {
println!("{:?}", filter);
}
for filter in rec.allele().unwrap() {
println!("{:?}", filter);
}
for info in rec.info_iter().unwrap() {
println!("{:?}", info.key());
println!("{:?}", info.value());
}
for info in rec.format_iter().unwrap() {
println!("{:?}", info.key());
println!("{:?}", info.value());
}
println!("{:?}", rec.id());
while let Some(rec) = vcf.read_next().unwrap() {
println!(
"{:?}",
rec.get_info(b"varType\0").as_ref().map(|x| x.value())
);
}
}