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: StringThe name or identifier of the contig.
length: usizeThe length of the contig in base pairs.
mean_read_lengths: MeanReadLengthsThe mean read length of the mapped reads associated with this contig.
mean_read_quality: f64The mean read quality of the mapped reads associated with this contig.
total_bases: usizeYield of mapped reads
n50: usizeThe 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: usizeThe count of reads that are mapped on the target region (on-target reads).
off_target_read_count: usizeThe count of reads that are mapped off the target region (off-target reads).
yield_on_target: usizeThe total yield (base pairs) of on-target reads for this contig.
yield_off_target: usizeThe total yield (base pairs) of off-target reads for this contig.
Implementations§
Source§impl ContigSummary
impl ContigSummary
Sourcepub fn new(name: String, length: usize) -> Self
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.
Sourcepub fn total_reads(&self) -> usize
pub fn total_reads(&self) -> usize
Get the total number of reads on the contig.
Sourcepub fn mean_read_length(&self) -> usize
pub fn mean_read_length(&self) -> usize
Mean read length of all reads on the contig.
Sourcepub fn on_target_mean_read_length(&self) -> usize
pub fn on_target_mean_read_length(&self) -> usize
On target mean read length of all reads on the contig.
Sourcepub fn off_target_mean_read_length(&self) -> usize
pub fn off_target_mean_read_length(&self) -> usize
Off target mean read length of all reads on the contig.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContigSummary
impl RefUnwindSafe for ContigSummary
impl Send for ContigSummary
impl Sync for ContigSummary
impl Unpin for ContigSummary
impl UnwindSafe for ContigSummary
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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