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: u32dense transcript id (index into the experiment’s transcript vector)
name: Stringreference name as it appears in the index / output
ref_length: u32length used for modeling (may be poly-A clipped)
complete_length: u32full reference length (reported in quant.sf Length column)
is_decoy: booltrue if this is a decoy sequence
Implementations§
Source§impl Transcript
impl Transcript
pub fn new(id: u32, name: impl Into<String>, complete_length: u32) -> Self
pub fn with_ref_length(self, ref_length: u32) -> Self
pub fn as_decoy(self) -> Self
pub fn unique_count(&self) -> u64
pub fn total_count(&self) -> u64
pub fn add_unique(&self, n: u64)
pub fn add_total(&self, n: u64)
pub fn set_mass(&self, log_mass: f64)
Sourcepub fn add_mass(&self, log_inc: f64)
pub fn add_mass(&self, log_inc: f64)
Atomically add log_inc (a log-space value) to the accumulated mass.
pub fn log_effective_length(&self) -> f64
pub fn set_log_effective_length(&self, v: f64)
pub fn effective_length(&self) -> f64
Sourcepub fn compute_log_effective_length(
&self,
log_pmf: &[f64],
min_val: usize,
) -> f64
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§
Auto Trait Implementations§
impl !Freeze for Transcript
impl RefUnwindSafe for Transcript
impl Send for Transcript
impl Sync for Transcript
impl Unpin for Transcript
impl UnsafeUnpin for Transcript
impl UnwindSafe for Transcript
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