Struct noodles_bcf::record::samples::Samples
source · pub struct Samples<'r> { /* private fields */ }
Expand description
BCF record genotypes.
Implementations§
source§impl<'r> Samples<'r>
impl<'r> Samples<'r>
sourcepub fn format_count(&self) -> usize
pub fn format_count(&self) -> usize
Returns the number of fields per sample.
§Examples
use noodles_bcf::record::Samples;
let samples = Samples::default();
assert_eq!(samples.format_count(), 0);
sourcepub fn get(&'r self, header: &Header, sample_name: &str) -> Option<Sample<'r>>
pub fn get(&'r self, header: &Header, sample_name: &str) -> Option<Sample<'r>>
Returns the sample with the given sample name.
sourcepub fn get_index(&'r self, i: usize) -> Option<Sample<'r>>
pub fn get_index(&'r self, i: usize) -> Option<Sample<'r>>
Returns a sample at the given index.
sourcepub fn select<'h: 'r>(
&'r self,
header: &'h Header,
column_name: &str,
) -> Option<Result<Series<'r>>>
pub fn select<'h: 'r>( &'r self, header: &'h Header, column_name: &str, ) -> Option<Result<Series<'r>>>
Returns the series with the given column name.
Trait Implementations§
source§impl<'r> PartialEq for Samples<'r>
impl<'r> PartialEq for Samples<'r>
source§impl<'r> Samples for Samples<'r>
impl<'r> Samples for Samples<'r>
source§fn column_names<'a, 'h: 'a>(
&'a self,
header: &'h Header,
) -> Box<dyn Iterator<Item = Result<&'a str>> + 'a>
fn column_names<'a, 'h: 'a>( &'a self, header: &'h Header, ) -> Box<dyn Iterator<Item = Result<&'a str>> + 'a>
Returns the column names.
source§fn select<'a, 'h: 'a>(
&'a self,
header: &'h Header,
column_name: &str,
) -> Option<Result<Box<dyn Series + 'a>>>
fn select<'a, 'h: 'a>( &'a self, header: &'h Header, column_name: &str, ) -> Option<Result<Box<dyn Series + 'a>>>
Returns the series with the given column name.
impl<'r> Eq for Samples<'r>
impl<'r> StructuralPartialEq for Samples<'r>
Auto Trait Implementations§
impl<'r> Freeze for Samples<'r>
impl<'r> RefUnwindSafe for Samples<'r>
impl<'r> Send for Samples<'r>
impl<'r> Sync for Samples<'r>
impl<'r> Unpin for Samples<'r>
impl<'r> UnwindSafe for Samples<'r>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.