pub struct Intron {
pub number: u32,
pub upstream_exon: u32,
pub downstream_exon: u32,
pub genomic_start: Option<u64>,
pub genomic_end: Option<u64>,
pub tx_5prime_boundary: u64,
pub tx_3prime_boundary: u64,
}Expand description
An intron between two exons
Fields§
§number: u32Intron number (1-based, intron 1 is between exon 1 and exon 2)
upstream_exon: u325’ exon number (upstream exon)
downstream_exon: u323’ exon number (downstream exon)
genomic_start: Option<u64>Genomic start position (1-based, first intronic base)
genomic_end: Option<u64>Genomic end position (1-based, last intronic base)
tx_5prime_boundary: u64Transcript position of last exonic base before intron (5’ boundary)
tx_3prime_boundary: u64Transcript position of first exonic base after intron (3’ boundary)
Implementations§
Source§impl Intron
impl Intron
Sourcepub fn new(
number: u32,
upstream_exon: u32,
downstream_exon: u32,
tx_5prime_boundary: u64,
tx_3prime_boundary: u64,
) -> Self
pub fn new( number: u32, upstream_exon: u32, downstream_exon: u32, tx_5prime_boundary: u64, tx_3prime_boundary: u64, ) -> Self
Create a new intron
Sourcepub fn with_genomic(
number: u32,
upstream_exon: u32,
downstream_exon: u32,
tx_5prime_boundary: u64,
tx_3prime_boundary: u64,
genomic_start: u64,
genomic_end: u64,
) -> Self
pub fn with_genomic( number: u32, upstream_exon: u32, downstream_exon: u32, tx_5prime_boundary: u64, tx_3prime_boundary: u64, genomic_start: u64, genomic_end: u64, ) -> Self
Create a new intron with genomic coordinates
Sourcepub fn genomic_length(&self) -> Option<u64>
pub fn genomic_length(&self) -> Option<u64>
Get the genomic length of the intron
Uses saturating arithmetic to prevent overflow in edge cases.
Sourcepub fn contains_genomic(&self, pos: u64) -> bool
pub fn contains_genomic(&self, pos: u64) -> bool
Check if a genomic position is within this intron
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Intron
impl<'de> Deserialize<'de> for Intron
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Intron
impl StructuralPartialEq for Intron
Auto Trait Implementations§
impl Freeze for Intron
impl RefUnwindSafe for Intron
impl Send for Intron
impl Sync for Intron
impl Unpin for Intron
impl UnsafeUnpin for Intron
impl UnwindSafe for Intron
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.