pub struct NormParams {
pub logratio_trim: f64,
pub sum_trim: f64,
pub do_weighting: bool,
pub a_cutoff: f64,
pub quantile: f64,
}Expand description
Tuning knobs for calc_norm_factors.
Names mirror edgeR’s: logratio_trim is logratioTrim, sum_trim is
sumTrim, do_weighting is doWeighting, a_cutoff is Acutoff and
quantile is p.
Fields§
§logratio_trim: f64Fraction trimmed from each tail of the log-ratios. TMM and TMMwsp only.
sum_trim: f64Fraction trimmed from each tail of the abundances. TMM and TMMwsp only.
do_weighting: boolWeight each retained log-ratio by the inverse of its approximate asymptotic variance. TMM and TMMwsp only.
a_cutoff: f64Abundance floor; genes with a mean log-abundance at or below this are dropped before trimming. TMM only; edgeR’s TMMwsp ignores it.
quantile: f64Probability of the column quantile. NormMethod::UpperQuartile only.
Implementations§
Source§impl NormParams
impl NormParams
Sourcepub fn new(
logratio_trim: f64,
sum_trim: f64,
do_weighting: bool,
a_cutoff: f64,
quantile: f64,
) -> Self
pub fn new( logratio_trim: f64, sum_trim: f64, do_weighting: bool, a_cutoff: f64, quantile: f64, ) -> Self
Builds a parameter set.
No validation here; calc_norm_factors checks the domains.
§Params
logratio_trim- Tail fraction trimmed from the log-ratios, in[0, 1)sum_trim- Tail fraction trimmed from the abundances, in[0, 1)do_weighting- Whether to use inverse-variance weightsa_cutoff- Abundance floor for TMMquantile- Column quantile probability, in[0, 1]
§Returns
The parameter set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NormParams
impl RefUnwindSafe for NormParams
impl Send for NormParams
impl Sync for NormParams
impl Unpin for NormParams
impl UnsafeUnpin for NormParams
impl UnwindSafe for NormParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.