Struct noodles_fastq::fai::Record
source · pub struct Record { /* private fields */ }
Expand description
A FASTQ index record.
Implementations§
source§impl Record
impl Record
sourcepub fn new<N>(
name: N,
length: u64,
sequence_offset: u64,
line_bases: u64,
line_width: u64,
quality_scores_offset: u64
) -> Self
pub fn new<N>( name: N, length: u64, sequence_offset: u64, line_bases: u64, line_width: u64, quality_scores_offset: u64 ) -> Self
Creates a FASTQ index record.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the name.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.name(), "sq0");
sourcepub fn len(&self) -> u64
👎Deprecated since 0.9.0: Use Record::length
instead.
pub fn len(&self) -> u64
Record::length
instead.Returns the length of the sequence.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.len(), 8);
sourcepub fn length(&self) -> u64
pub fn length(&self) -> u64
Returns the length of the sequence.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.length(), 8);
sourcepub fn sequence_offset(&self) -> u64
pub fn sequence_offset(&self) -> u64
Returns the offset to the sequence from the start.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.sequence_offset(), 4);
sourcepub fn line_bases(&self) -> u64
pub fn line_bases(&self) -> u64
Returns the number of bases in the sequence.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.line_bases(), 8);
sourcepub fn line_width(&self) -> u64
pub fn line_width(&self) -> u64
Returns the number of characters in the sequence.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.line_width(), 9);
sourcepub fn quality_scores_offset(&self) -> u64
pub fn quality_scores_offset(&self) -> u64
Returns the offset to the quality scores from the start.
§Examples
use noodles_fastq::fai;
let record = fai::Record::new("sq0", 8, 4, 8, 9, 15);
assert_eq!(record.quality_scores_offset(), 15);
Trait Implementations§
source§impl PartialEq for Record
impl PartialEq for Record
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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