pub fn query_unmapped(&mut self, index: &bai::Index) -> io::Result<UnmappedRecords<'_, R>> {
        if let Some(pos) = index.first_record_in_last_linear_bin_start_position() {
            self.seek(pos)?;
        } else {
            self.seek_to_first_record()?;
        }

        Ok(UnmappedRecords::new(self))
    }
/// Returns an iterator of unmapped records after querying for the unmapped region.
///
/// # Examples
///
/// ```no_run
/// # use std::{fs::File, io};
/// use noodles_bam::{self as bam, bai};
///
/// let mut reader = File::open("sample.bam").map(bam::Reader::new)?;
/// let index = bai::read("sample.bam.bai")?;
/// let query = reader.query_unmapped(&index)?;
///
/// for result in query {
///     let record = result?;
///     println!("{:?}", record);
/// }
/// # Ok::<(), io::Error>(())
/// ```
Returns an iterator of unmapped records after querying for the unmapped region.
Returns an iterator of unmapped records after querying for the unmapped region .
pub fn query_unmapped(&mut self, index: &bai::Index) -> io::Result<UnmappedRecords<'_, R>> {
        if let Some(pos) = index.first_record_in_last_linear_bin_start_position() {
            self.seek(pos)?;
        } else {
            self.seek_to_first_record()?;
        }
        Ok(UnmappedRecords::new(self))
    }
pub fn query_unmapped ( & mut self , index : & bai :: Index ) -> io :: Result < UnmappedRecords < ' _ , R > > { if let Some ( pos ) = index . first_record_in_last_linear_bin_start_position ( ) { self . seek ( pos ) ? ; } else { self . seek_to_first_record ( ) ? ; } Ok ( UnmappedRecords :: new ( self ) ) }
Returns an iterator of unmapped records after querying for the unmapped region.
Returns an iterator of unmapped records after querying for the unmapped region .
&mut self
index
&bai::Index
&mut self
index
&bai::Index
examples
None
use std::{fs::file, io};
use noodles_bam::{self as bam, bai}.

let mut reader = File::open("sample.bam").map(bam::Reader::new)?;
let index = bai::read("sample.bam.bai")?;
let query = reader.query_unmapped(&index)?.

for result in query {
let record = result?;
println!("{:?}", record);
}
use noodles_bam :: { self as bam bai } . let mut reader = File :: open ( " sample . bam " ) . map ( bam :: Reader :: new ) ? ; let index = bai :: read ( " sample . bam . bai " ) ? ; let query = reader . query_unmapped ( &index ) ? . for result in query { let record = result? ; println! ( " { : ? } " record ) ; }
ok::<(), io::error>(())
None