Skip to main content

FastqBatch

Struct FastqBatch 

Source
pub struct FastqBatch<'a> { /* private fields */ }
Expand description

A batch of borrowed FASTQ records from one reader slab.

The batch is invalidated by the next mutable call on the reader that produced it. Process records before requesting another batch.

Implementations§

Source§

impl<'a> FastqBatch<'a>

Source

pub fn len(&self) -> usize

Number of records in the batch.

Source

pub fn is_empty(&self) -> bool

Whether the batch has no records.

Source

pub fn bytes(&self) -> &'a [u8]

Raw slab bytes backing this batch.

Source

pub fn record_refs(&self) -> &'a [RecordRef]

Record ranges within bytes.

Source

pub fn base_offset(&self) -> u64

Absolute byte offset of bytes()[0] in the original stream.

Source

pub fn first_record_index(&self) -> u64

Zero-based index of the first record in this batch.

Source

pub fn pair_validation(&self) -> PairValidation

Pair validation mode inherited from the producing reader.

Source

pub fn records(&self) -> impl Iterator<Item = FastqRecord<'a>> + 'a

Iterate borrowed record views.

Source

pub fn interleaved_pairs(&'a self) -> Result<InterleavedPairs<'a>>

Validate and iterate adjacent interleaved read pairs.

Returns an error if the batch has an odd record count or mate identifiers fail the configured PairValidation mode.

Source

pub fn paired_with( &'a self, mate: &'a FastqBatch<'a>, ) -> Result<PairedRecords<'a>>

Validate and zip this batch with a mate batch from a separate reader.

Identifier checks use this batch’s configured PairValidation mode.

Trait Implementations§

Source§

impl<'a> Debug for FastqBatch<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for FastqBatch<'a>

§

impl<'a> RefUnwindSafe for FastqBatch<'a>

§

impl<'a> Send for FastqBatch<'a>

§

impl<'a> Sync for FastqBatch<'a>

§

impl<'a> Unpin for FastqBatch<'a>

§

impl<'a> UnsafeUnpin for FastqBatch<'a>

§

impl<'a> UnwindSafe for FastqBatch<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.