rust-bio / rust-htslib

This library provides HTSlib bindings and a high level Rust API for reading and writing BAM files.
MIT License
302 stars 77 forks source link

How to access read group info from `Record`? #422

Open Crispy13 opened 7 months ago

Crispy13 commented 7 months ago

In java, I can access that info like rec.getReadGroup().getFlowOrder().

How could I do that in rust-htslib?

ghuls commented 7 months ago
if let Ok(Aux::String(rg)) = record.aux(b"RG") {
    println!("{}", &rg);
}
Crispy13 commented 7 months ago

But FlowOrder, FO is in the header. Can I access it from Record?