pub struct MultipleTestResults {
pub statistics: Vec<f64>,
pub p_values: Vec<f64>,
pub adjusted_p_values: Option<Vec<f64>>,
pub effect_sizes: Option<Vec<f64>>,
pub confidence_intervals: Option<Vec<(f64, f64)>>,
pub feature_metadata: Option<Vec<HashMap<String, f64>>>,
pub global_metadata: HashMap<String, String>,
}Fields§
§statistics: Vec<f64>Test statistics for each feature/gene
p_values: Vec<f64>Raw (unadjusted) p-values
adjusted_p_values: Option<Vec<f64>>Adjusted p-values (after multiple testing correction)
effect_sizes: Option<Vec<f64>>Effect sizes (if calculated)
confidence_intervals: Option<Vec<(f64, f64)>>Confidence intervals (if calculated)
feature_metadata: Option<Vec<HashMap<String, f64>>>Feature-specific metadata
global_metadata: HashMap<String, String>Global metadata about the test
Implementations§
Source§impl MultipleTestResults
impl MultipleTestResults
Sourcepub fn new(statistics: Vec<f64>, p_values: Vec<f64>) -> Self
pub fn new(statistics: Vec<f64>, p_values: Vec<f64>) -> Self
Create a new results object from p-values
Sourcepub fn with_adjusted_p_values(self, adjusted_p_values: Vec<f64>) -> Self
pub fn with_adjusted_p_values(self, adjusted_p_values: Vec<f64>) -> Self
Add adjusted p-values to the results
Sourcepub fn with_effect_sizes(self, effect_sizes: Vec<f64>) -> Self
pub fn with_effect_sizes(self, effect_sizes: Vec<f64>) -> Self
Add effect sizes to the results
Sourcepub fn with_confidence_intervals(
self,
confidence_intervals: Vec<(f64, f64)>,
) -> Self
pub fn with_confidence_intervals( self, confidence_intervals: Vec<(f64, f64)>, ) -> 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: f64) -> Vec<usize>
pub fn significant_indices(&self, alpha: f64) -> Vec<usize>
Get indices of significant features at the given threshold
Sourcepub fn num_significant(&self, alpha: f64) -> usize
pub fn num_significant(&self, alpha: f64) -> 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 Clone for MultipleTestResults
impl Clone for MultipleTestResults
Source§fn clone(&self) -> MultipleTestResults
fn clone(&self) -> MultipleTestResults
Returns a copy 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 Freeze for MultipleTestResults
impl RefUnwindSafe for MultipleTestResults
impl Send for MultipleTestResults
impl Sync for MultipleTestResults
impl Unpin for MultipleTestResults
impl UnwindSafe for MultipleTestResults
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.