Struct noodles_csi::binning_index::index::reference_sequence::Metadata
source · pub struct Metadata { /* private fields */ }
Expand description
Index reference sequence metadata.
Implementations§
source§impl Metadata
impl Metadata
sourcepub fn new(
start_position: VirtualPosition,
end_position: VirtualPosition,
mapped_record_count: u64,
unmapped_record_count: u64
) -> Self
pub fn new( start_position: VirtualPosition, end_position: VirtualPosition, mapped_record_count: u64, unmapped_record_count: u64 ) -> Self
Creates reference sequence metadata.
§Examples
use noodles_bgzf as bgzf;
use noodles_csi::binning_index::index::reference_sequence::Metadata;
let metadata = Metadata::new(
bgzf::VirtualPosition::from(610),
bgzf::VirtualPosition::from(1597),
55,
0,
);
sourcepub fn start_position(&self) -> VirtualPosition
pub fn start_position(&self) -> VirtualPosition
Returns the start virtual position.
§Examples
use noodles_bgzf as bgzf;
use noodles_csi::binning_index::index::reference_sequence::Metadata;
let metadata = Metadata::new(
bgzf::VirtualPosition::from(610),
bgzf::VirtualPosition::from(1597),
55,
0,
);
assert_eq!(metadata.start_position(), bgzf::VirtualPosition::from(610));
sourcepub fn end_position(&self) -> VirtualPosition
pub fn end_position(&self) -> VirtualPosition
Returns the end virtual position.
§Examples
use noodles_bgzf as bgzf;
use noodles_csi::binning_index::index::reference_sequence::Metadata;
let metadata = Metadata::new(
bgzf::VirtualPosition::from(610),
bgzf::VirtualPosition::from(1597),
55,
0,
);
assert_eq!(metadata.end_position(), bgzf::VirtualPosition::from(1597));
sourcepub fn mapped_record_count(&self) -> u64
pub fn mapped_record_count(&self) -> u64
Returns the number of mapped records.
§Examples
use noodles_bgzf as bgzf;
use noodles_csi::binning_index::index::reference_sequence::Metadata;
let metadata = Metadata::new(
bgzf::VirtualPosition::from(610),
bgzf::VirtualPosition::from(1597),
55,
0,
);
assert_eq!(metadata.mapped_record_count(), 55);
sourcepub fn unmapped_record_count(&self) -> u64
pub fn unmapped_record_count(&self) -> u64
Returns the number of unmapped records.
§Examples
use noodles_bgzf as bgzf;
use noodles_csi::binning_index::index::reference_sequence::Metadata;
let metadata = Metadata::new(
bgzf::VirtualPosition::from(610),
bgzf::VirtualPosition::from(1597),
55,
0,
);
assert_eq!(metadata.unmapped_record_count(), 0);
Trait Implementations§
source§impl PartialEq for Metadata
impl PartialEq for Metadata
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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.