Struct noodles_tabix::index::Index
source · [−]pub struct Index { /* private fields */ }
Expand description
A tabix index.
Implementations
sourceimpl Index
impl Index
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Returns a builder to create an index from each of its fields.
Examples
use noodles_tabix as tabix;
let builder = tabix::Index::builder();
sourcepub fn header(&self) -> &Header
pub fn header(&self) -> &Header
Returns the header.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::default();
let index = tabix::Index::builder().set_header(header.clone()).build();
assert_eq!(index.header(), &header);
sourcepub fn reference_sequence_names(&self) -> &ReferenceSequenceNames
pub fn reference_sequence_names(&self) -> &ReferenceSequenceNames
Returns the reference sequence names.
Examples
use noodles_tabix::{self as tabix, index::ReferenceSequenceNames};
let reference_sequence_names: ReferenceSequenceNames = [String::from("sq0")]
.into_iter()
.collect();
let index = tabix::Index::builder()
.set_reference_sequence_names(reference_sequence_names.clone())
.build();
assert_eq!(index.reference_sequence_names(), &reference_sequence_names);
sourcepub fn unmapped_read_count(&self) -> Option<u64>
👎 Deprecated since 0.2.0: Use unplaced_unmapped_record_count
instead.
pub fn unmapped_read_count(&self) -> Option<u64>
👎 Deprecated since 0.2.0:
Use unplaced_unmapped_record_count
instead.
Returns the number of unmapped records in the associated file.
Examples
use noodles_tabix as tabix;
let index = tabix::Index::builder()
.set_unmapped_read_count(21)
.build();
assert_eq!(index.unmapped_read_count(), Some(21));
Trait Implementations
sourceimpl BinningIndex<ReferenceSequence> for Index
impl BinningIndex<ReferenceSequence> for Index
sourcefn reference_sequences(&self) -> &[ReferenceSequence]
fn reference_sequences(&self) -> &[ReferenceSequence]
Returns a list of indexed reference sequences.
Examples
use noodles_csi::BinningIndex;
use noodles_tabix as tabix;
let index = tabix::Index::default();
assert!(index.reference_sequences().is_empty());
sourcefn unplaced_unmapped_record_count(&self) -> Option<u64>
fn unplaced_unmapped_record_count(&self) -> Option<u64>
Returns the number of unplaced, unmapped records in the associated file.
Examples
use noodles_csi::BinningIndex;
use noodles_tabix as tabix;
let index = tabix::Index::default();
assert!(index.unplaced_unmapped_record_count().is_none());
sourcefn query<B>(
&self,
reference_sequence_id: usize,
interval: B
) -> Result<Vec<Chunk>> where
B: RangeBounds<i32> + Clone,
fn query<B>(
&self,
reference_sequence_id: usize,
interval: B
) -> Result<Vec<Chunk>> where
B: RangeBounds<i32> + Clone,
Returns the chunks that overlap with the given region.
sourcefn first_record_in_last_linear_bin_start_position(
&self
) -> Option<VirtualPosition>
fn first_record_in_last_linear_bin_start_position(
&self
) -> Option<VirtualPosition>
Returns the start position of the first record in the last linear bin. Read more
Auto Trait Implementations
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more