Skip to main content

Transcript

Struct Transcript 

Source
pub struct Transcript {
    pub id: u32,
    pub name: String,
    pub ref_length: u32,
    pub complete_length: u32,
    pub is_decoy: bool,
    /* private fields */
}
Expand description

A reference transcript and its mutable quantification state.

Fields§

§id: u32

dense transcript id (index into the experiment’s transcript vector)

§name: String

reference name as it appears in the index / output

§ref_length: u32

length used for modeling (may be poly-A clipped)

§complete_length: u32

full reference length (reported in quant.sf Length column)

§is_decoy: bool

true if this is a decoy sequence

Implementations§

Source§

impl Transcript

Source

pub fn new(id: u32, name: impl Into<String>, complete_length: u32) -> Self

Source

pub fn with_ref_length(self, ref_length: u32) -> Self

Source

pub fn as_decoy(self) -> Self

Source

pub fn unique_count(&self) -> u64

Source

pub fn total_count(&self) -> u64

Source

pub fn add_unique(&self, n: u64)

Source

pub fn add_total(&self, n: u64)

Source

pub fn mass(&self) -> f64

Current accumulated mass (log space).

Source

pub fn set_mass(&self, log_mass: f64)

Source

pub fn add_mass(&self, log_inc: f64)

Atomically add log_inc (a log-space value) to the accumulated mass.

Source

pub fn log_effective_length(&self) -> f64

Source

pub fn set_log_effective_length(&self, v: f64)

Source

pub fn effective_length(&self) -> f64

Source

pub fn compute_log_effective_length( &self, log_pmf: &[f64], min_val: usize, ) -> f64

Compute the log effective length given a log-space fragment-length PMF covering lengths [min_val, min_val + log_pmf.len()).

Mirrors salmon’s Transcript::computeLogEffectiveLength: effLen = sum_{l=min}^{min(refLen,max)} pmf(l) * (refLen - l + 1) in log space. If the transcript is shorter than the minimum fragment length, it falls back to log(refLen).

Trait Implementations§

Source§

impl Debug for Transcript

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, 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.