Struct noodles::csi::index::ReferenceSequence [−][src]
pub struct ReferenceSequence { /* fields omitted */ }
Expand description
A CSI reference sequence.
Implementations
Creates a CSI reference sequence.
Examples
use noodles_csi::index::ReferenceSequence;
let reference_sequence = ReferenceSequence::new(Vec::new(), None);
Returns the list of bins in the reference sequence.
This list does not include the metadata pseudo-bin. Use Self::metadata
instead.
Examples
use noodles_csi::index::ReferenceSequence;
let reference_sequence = ReferenceSequence::new(Vec::new(), None);
assert!(reference_sequence.bins().is_empty());
Returns a list of bins in this reference sequence that intersects the given range.
The interval values are 1-based.
Examples
use noodles_csi::index::ReferenceSequence;
let reference_sequence = ReferenceSequence::new(Vec::new(), None);
let query_bins = reference_sequence.query(14, 5, 8..=13)?;
assert!(query_bins.is_empty());
Trait Implementations
Returns a list of indexed reference sequences.
Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::default();
assert!(index.reference_sequences().is_empty());
Returns the number of unplaced, unmapped records in the associated file.
Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::default();
assert!(index.unplaced_unmapped_record_count().is_none());
Returns the chunks that overlap with the given region.
Returns the start position of the first record in the last linear bin. Read more
Returns the optional metadata for the reference sequence.
Examples
use noodles_bgzf as bgzf;
use noodles_csi::{
index::{reference_sequence::Metadata, ReferenceSequence},
BinningIndexReferenceSequence,
};
let reference_sequence = ReferenceSequence::new(Vec::new(), Some(Metadata::new(
bgzf::VirtualPosition::from(610),
bgzf::VirtualPosition::from(1597),
55,
0,
)));
assert!(reference_sequence.metadata().is_some());
Returns the start position of the first record in the last linear bin.
Examples
use noodles_bgzf as bgzf;
use noodles_csi::{
index::{reference_sequence::Bin, ReferenceSequence},
BinningIndexReferenceSequence,
};
let reference_sequence = ReferenceSequence::new(Vec::new(), None);
assert!(reference_sequence.first_record_in_last_linear_bin_start_position().is_none());
let bins = vec![
Bin::new(0, bgzf::VirtualPosition::from(8), Vec::new()),
Bin::new(1, bgzf::VirtualPosition::from(13), Vec::new()),
];
let reference_sequence = ReferenceSequence::new(bins, None);
assert_eq!(
reference_sequence.first_record_in_last_linear_bin_start_position(),
Some(bgzf::VirtualPosition::from(13))
);
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ReferenceSequence
impl Send for ReferenceSequence
impl Sync for ReferenceSequence
impl Unpin for ReferenceSequence
impl UnwindSafe for ReferenceSequence
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.