Struct ContigSummary

Source
pub struct ContigSummary {
    pub name: String,
    pub length: usize,
    pub mean_read_lengths: MeanReadLengths,
    pub mean_read_quality: f64,
    pub total_bases: usize,
    pub n50: usize,
    pub on_target_read_count: usize,
    pub off_target_read_count: usize,
    pub yield_on_target: usize,
    pub yield_off_target: usize,
}
Expand description

Represents a summary of a contig or sequence from a sequencing experiment. It includes various metrics related to the contig’s characteristics and read mapping.

Fields§

§name: String

The name or identifier of the contig.

§length: usize

The length of the contig in base pairs.

§mean_read_lengths: MeanReadLengths

The mean read length of the mapped reads associated with this contig.

§mean_read_quality: f64

The mean read quality of the mapped reads associated with this contig.

§total_bases: usize

Yield of mapped reads

§n50: usize

The N50 metric for the contig, representing the length at which the cumulative sum of contig lengths reaches half of the total assembly length.

§on_target_read_count: usize

The count of reads that are mapped on the target region (on-target reads).

§off_target_read_count: usize

The count of reads that are mapped off the target region (off-target reads).

§yield_on_target: usize

The total yield (base pairs) of on-target reads for this contig.

§yield_off_target: usize

The total yield (base pairs) of off-target reads for this contig.

Implementations§

Source§

impl ContigSummary

Source

pub fn new(name: String, length: usize) -> Self

Create a new ContigSummary instance with default values for all fields except name and length.

§Arguments
  • name - The name of the contig.
  • length - The length of the contig.
Source

pub fn total_reads(&self) -> usize

Get the total number of reads on the contig.

Source

pub fn mean_read_length(&self) -> usize

Mean read length of all reads on the contig.

Source

pub fn on_target_mean_read_length(&self) -> usize

On target mean read length of all reads on the contig.

Source

pub fn off_target_mean_read_length(&self) -> usize

Off target mean read length of all reads on the contig.

Trait Implementations§

Source§

impl Debug for ContigSummary

Source§

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

Formats the value using the given formatter. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
Source§

impl<T> Ungil for T
where T: Send,