Struct noodles_csi::binning_index::index::header::Header
source · pub struct Header { /* private fields */ }
Expand description
A tabix index header.
Implementations§
source§impl Header
impl Header
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a tabix index header builder.
§Examples
use noodles_csi::binning_index::index::Header;
let builder = Header::builder();
sourcepub fn format(&self) -> Format
pub fn format(&self) -> Format
Returns the format.
§Examples
use noodles_csi::binning_index::index::{header::Format, Header};
let header = Header::builder().set_format(Format::Vcf).build();
assert_eq!(header.format(), Format::Vcf);
sourcepub fn reference_sequence_name_index(&self) -> usize
pub fn reference_sequence_name_index(&self) -> usize
Returns the reference sequence name field index.
This index is 0-based.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_reference_sequence_name_index(0).build();
assert_eq!(header.reference_sequence_name_index(), 0);
sourcepub fn start_position_index(&self) -> usize
pub fn start_position_index(&self) -> usize
Returns the start position field index.
This index is 0-based.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_start_position_index(3).build();
assert_eq!(header.start_position_index(), 3);
sourcepub fn end_position_index(&self) -> Option<usize>
pub fn end_position_index(&self) -> Option<usize>
Returns the end position field index.
This index is 0-based. It is not set if the format does not have a column for the end position.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_end_position_index(Some(5)).build();
assert_eq!(header.end_position_index(), Some(5));
sourcepub fn line_comment_prefix(&self) -> u8
pub fn line_comment_prefix(&self) -> u8
Returns the line comment prefix.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_line_comment_prefix(b'#').build();
assert_eq!(header.line_comment_prefix(), b'#');
sourcepub fn line_skip_count(&self) -> u32
pub fn line_skip_count(&self) -> u32
Returns the number of lines to skip.
§Examples
use noodles_csi::binning_index::index::Header;
let header = Header::builder().set_line_skip_count(0).build();
assert_eq!(header.line_skip_count(), 0);
sourcepub fn reference_sequence_names(&self) -> &ReferenceSequenceNames
pub fn reference_sequence_names(&self) -> &ReferenceSequenceNames
Returns the reference sequence names.
§Examples
use noodles_csi::binning_index::index::{header::ReferenceSequenceNames, Header};
let reference_sequence_names = ReferenceSequenceNames::new();
let header = Header::builder()
.set_reference_sequence_names(reference_sequence_names.clone())
.build();
assert_eq!(header.reference_sequence_names(), &reference_sequence_names);
sourcepub fn reference_sequence_names_mut(&mut self) -> &mut ReferenceSequenceNames
pub fn reference_sequence_names_mut(&mut self) -> &mut ReferenceSequenceNames
Returns a mutable reference to the reference sequence names.
§Examples
use noodles_csi::binning_index::index::{header::ReferenceSequenceNames, Header};
let reference_sequence_names = ReferenceSequenceNames::new();
let mut header = Header::default();
*header.reference_sequence_names_mut() = reference_sequence_names.clone();
assert_eq!(header.reference_sequence_names(), &reference_sequence_names);
Trait Implementations§
source§impl PartialEq for Header
impl PartialEq for Header
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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.