noodles_cram::record

Struct Builder

Source
pub struct Builder { /* private fields */ }
Expand description

A CRAM record builder.

Implementations§

Source§

impl Builder

Source

pub fn set_id(self, id: u64) -> Self

Sets the CRAM record ID.

Source

pub fn set_bam_flags(self, bam_flags: Flags) -> Self

Sets the BAM flags.

Source

pub fn set_flags(self, flags: Flags) -> Self

Sets the CRAM flags.

Source

pub fn set_reference_sequence_id(self, reference_sequence_id: usize) -> Self

Sets the reference sequence ID.

Source

pub fn set_read_length(self, read_length: usize) -> Self

Sets the read length.

Source

pub fn set_alignment_start(self, alignment_start: Position) -> Self

Sets the alignment start position.

Source

pub fn set_read_group_id(self, read_group_id: usize) -> Self

Sets the read group ID.

Source

pub fn set_name<N>(self, name: N) -> Self
where N: Into<BString>,

Sets the name.

Source

pub fn set_next_mate_flags(self, next_mate_flags: MateFlags) -> Self

Sets the next mate flags.

Source

pub fn set_next_fragment_reference_sequence_id( self, next_fragment_reference_sequence_id: usize, ) -> Self

Sets the reference sequence ID of the next fragment.

Source

pub fn set_next_mate_alignment_start( self, next_mate_alignment_start: Position, ) -> Self

Sets the alignment start position of the next mate.

Source

pub fn set_template_size(self, template_size: i32) -> Self

Sets the template size.

Source

pub fn set_distance_to_next_fragment( self, distance_to_next_fragment: usize, ) -> Self

Sets the distance to the next fragment.

Source

pub fn set_tags(self, tags: Data) -> Self

Sets the tag dictionary.

Source

pub fn set_bases(self, bases: Sequence) -> Self

Sets the read bases.

Source

pub fn set_features(self, features: Features) -> Self

Sets the read features.

Source

pub fn set_mapping_quality(self, mapping_quality: MappingQuality) -> Self

Sets the mapping quality.

Source

pub fn set_quality_scores(self, quality_scores: QualityScores) -> Self

Sets the per-base quality scores.

Source

pub fn build(self) -> Record

Builds a CRAM record.

Trait Implementations§

Source§

impl Default for Builder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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.