pub struct Scanner { /* private fields */ }Expand description
A BigWig scanner.
Schema parameters (fields) are declared at construction time. Scan methods accept only column projection, batch size, and limit.
§Examples
use oxbow::bbi::scanner::bigwig::Scanner;
let mut fmt_reader = bigtools::BigWigRead::open_file("sample.bigWig").unwrap();
let info = fmt_reader.info();
let scanner = Scanner::new(info.clone(), None).unwrap();
let batches = scanner.scan(fmt_reader, None, None, Some(1000));Implementations§
Source§impl Scanner
impl Scanner
Sourcepub fn new(info: BBIFileInfo, fields: Option<Vec<String>>) -> Result<Self>
pub fn new(info: BBIFileInfo, fields: Option<Vec<String>>) -> Result<Self>
Creates a BigWig scanner from BBI file info and optional field names.
The schema is validated and cached at construction time.
Sourcepub fn field_names(&self) -> Vec<String>
pub fn field_names(&self) -> Vec<String>
Returns the field names.
Sourcepub fn schema(&self) -> &ArrowSchema
pub fn schema(&self) -> &ArrowSchema
Returns the Arrow schema.
Source§impl Scanner
impl Scanner
Sourcepub fn info(&self) -> &BBIFileInfo
pub fn info(&self) -> &BBIFileInfo
Returns the BBI file info.
Sourcepub fn chrom_names(&self) -> Vec<String>
pub fn chrom_names(&self) -> Vec<String>
Returns the reference sequence names.
Sourcepub fn chrom_sizes(&self) -> Vec<(String, u32)>
pub fn chrom_sizes(&self) -> Vec<(String, u32)>
Returns the reference sequence names and lengths.
Sourcepub fn zoom_levels(&self) -> Vec<u32>
pub fn zoom_levels(&self) -> Vec<u32>
Returns the zoom/reduction level resolutions in the BigWig file.
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnsafeUnpin for Scanner
impl UnwindSafe for Scanner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more