zaeleus / noodles

Bioinformatics I/O libraries in Rust
MIT License
515 stars 53 forks source link

bgzf::AsyncReader reference to inner reader #194

Closed mmalenic closed 1 year ago

mmalenic commented 1 year ago

Currently there is no way to get a reference to the inner reader for bgzf::AsyncReader. Would it be possible to have a get_ref function similar to the non-async bgzf::Reader? https://github.com/zaeleus/noodles/blob/c7655493f9975e666dc8ca0df05ae13021317eef/noodles-bgzf/src/reader.rs#L52-L64

This would be useful for obtaining a reference to the inner-most reader after using something like bam::AsyncReader::new.

zaeleus commented 1 year ago

Yes, and thanks for reporting! 512be677a60fc6fc475d930b8518326d497e2ca9 adds bgzf::AsyncReader::{get_ref,get_mut,get_pin_mut,into_inner}.

zaeleus commented 1 year ago

These are now available in noodles 0.48.0 / noodles-bgzf 0.23.0.