pub struct Exons {
pub exons: Vec<Interval>,
}Expand description
Represents a collection of exons, which are contiguous regions within genomic sequences.
Exons are the parts of a gene’s DNA that code for proteins, and they’re separated by non-coding regions called introns. This structure stores a collection of exons as intervals.
§Fields
exons- A vector of intervals representing the positions of exons within a genomic sequence.
Fields§
§exons: Vec<Interval>Implementations§
Source§impl Exons
impl Exons
Sourcepub fn builder() -> ExonsBuilder
pub fn builder() -> ExonsBuilder
Create an instance of Exons using the builder syntax
Source§impl Exons
Methods for working with exon structures.
impl Exons
Methods for working with exon structures.
§Methods
introns()- Calculates the intron intervals between exonsis_empty()- Checks if there are no exonslen()- Returns the number of exonsspan()- Calculates the total number of bases covered by all exonsfirst_exon()- Gets a reference to the first exonlast_exon()- Gets a reference to the last exon
§Panics
first_exon()will panic if there are no exonslast_exon()will panic if there are no exons
Sourcepub fn introns(&self) -> Vec<Interval>
pub fn introns(&self) -> Vec<Interval>
Returns a vector of intervals representing introns.
Introns are the regions between consecutive exons. For each pair of adjacent exons, an intron is created starting at the position immediately after the end of the first exon and ending at the position immediately before the start of the second exon.
§Returns
A Vec<Interval> containing all introns between exons in this structure.
Sourcepub fn span(&self) -> usize
pub fn span(&self) -> usize
Calculates the total span (combined length) of all exons.
The span is computed by summing the lengths of all intervals,
where each interval length is calculated as end - start + 1.
§Returns
The total span as a usize.
Sourcepub fn first_exon(&self) -> &Interval
pub fn first_exon(&self) -> &Interval
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Exons
impl RefUnwindSafe for Exons
impl Send for Exons
impl Sync for Exons
impl Unpin for Exons
impl UnwindSafe for Exons
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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