pub struct MultipleTestResults<T> {
pub statistics: Vec<T>,
pub p_values: Vec<T>,
pub adjusted_p_values: Option<Vec<T>>,
pub effect_sizes: Option<Vec<T>>,
pub confidence_intervals: Option<Vec<(T, T)>>,
pub feature_metadata: Option<Vec<HashMap<String, T>>>,
pub global_metadata: HashMap<String, String>,
}Fields§
§statistics: Vec<T>Test statistics for each feature/gene
p_values: Vec<T>Raw (unadjusted) p-values
adjusted_p_values: Option<Vec<T>>Adjusted p-values (after multiple testing correction)
effect_sizes: Option<Vec<T>>Effect sizes (if calculated)
confidence_intervals: Option<Vec<(T, T)>>Confidence intervals (if calculated)
feature_metadata: Option<Vec<HashMap<String, T>>>Feature-specific metadata
global_metadata: HashMap<String, String>Global metadata about the test
Implementations§
Source§impl<T> MultipleTestResults<T>where
T: FloatOps,
impl<T> MultipleTestResults<T>where
T: FloatOps,
Sourcepub fn new(statistics: Vec<T>, p_values: Vec<T>) -> Self
pub fn new(statistics: Vec<T>, p_values: Vec<T>) -> Self
Create a new results object from p-values
Sourcepub fn with_adjusted_p_values(self, adjusted_p_values: Vec<T>) -> Self
pub fn with_adjusted_p_values(self, adjusted_p_values: Vec<T>) -> Self
Add adjusted p-values to the results
Sourcepub fn with_effect_sizes(self, effect_sizes: Vec<T>) -> Self
pub fn with_effect_sizes(self, effect_sizes: Vec<T>) -> Self
Add effect sizes to the results
Sourcepub fn with_confidence_intervals(
self,
confidence_intervals: Vec<(T, T)>,
) -> Self
pub fn with_confidence_intervals( self, confidence_intervals: Vec<(T, T)>, ) -> Self
Add confidence intervals to the results
Sourcepub fn with_global_metadata(self, key: &str, value: &str) -> Self
pub fn with_global_metadata(self, key: &str, value: &str) -> Self
Add global metadata about the test
Sourcepub fn significant_indices(&self, alpha: T) -> Vec<usize>
pub fn significant_indices(&self, alpha: T) -> Vec<usize>
Get indices of significant features at the given threshold
Sourcepub fn num_significant(&self, alpha: T) -> usize
pub fn num_significant(&self, alpha: T) -> usize
Get the number of significant features at the given threshold
Sourcepub fn top_features(&self, n: usize) -> Vec<usize>
pub fn top_features(&self, n: usize) -> Vec<usize>
Get top n features by p-value
Trait Implementations§
Source§impl<T: Clone> Clone for MultipleTestResults<T>
impl<T: Clone> Clone for MultipleTestResults<T>
Source§fn clone(&self) -> MultipleTestResults<T>
fn clone(&self) -> MultipleTestResults<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for MultipleTestResults<T>
impl<T> RefUnwindSafe for MultipleTestResults<T>where
T: RefUnwindSafe,
impl<T> Send for MultipleTestResults<T>where
T: Send,
impl<T> Sync for MultipleTestResults<T>where
T: Sync,
impl<T> Unpin for MultipleTestResults<T>where
T: Unpin,
impl<T> UnwindSafe for MultipleTestResults<T>where
T: UnwindSafe,
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<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
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.