Struct noodles_tabix::index::Indexer
source · pub struct Indexer { /* private fields */ }
Expand description
A tabix indexer.
Implementations§
source§impl Indexer
impl Indexer
sourcepub fn set_header(&mut self, header: Header)
pub fn set_header(&mut self, header: Header)
Sets an index header.
§Examples
use noodles_csi::binning_index::index::Header;
use noodles_tabix::index::Indexer;
let builder = Indexer::default().set_header(Header::default());
sourcepub fn add_record(
&mut self,
reference_sequence_name: &str,
start: Position,
end: Position,
chunk: Chunk
) -> Result<()>
pub fn add_record( &mut self, reference_sequence_name: &str, start: Position, end: Position, chunk: Chunk ) -> Result<()>
Adds a record.
§Examples
use noodles_bgzf as bgzf;
use noodles_core::Position;
use noodles_csi::binning_index::index::reference_sequence::bin::Chunk;
use noodles_tabix::index::Indexer;
let mut indexer = Indexer::default();
let start = Position::try_from(8)?;
let end = Position::try_from(13)?;
indexer.add_record("sq0", start, end, Chunk::new(
bgzf::VirtualPosition::from(144),
bgzf::VirtualPosition::from(233),
))?;
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Indexer
impl RefUnwindSafe for Indexer
impl Send for Indexer
impl Sync for Indexer
impl Unpin for Indexer
impl UnwindSafe for Indexer
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