pub trait MatrixStatTests<T>where
T: FloatOpsTS,{
// Required methods
fn t_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
test_type: TTestType,
) -> Result<Vec<TestResult<f64>>>;
fn mann_whitney_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
alternative: Alternative,
) -> Result<Vec<TestResult<f64>>>;
fn fisher_exact_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
alternative: Alternative,
) -> Result<Vec<TestResult<T>>>;
fn differential_expression(
&self,
group_ids: &[usize],
test_method: TestMethod,
) -> Result<MultipleTestResults<f64>>;
}Expand description
Statistical testing methods for sparse matrices, particularly suited for single-cell data.
This trait extends sparse matrix types (like CsrMatrix or SparseMatrixRef) with
statistical testing capabilities.
Required Methods§
Sourcefn t_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
test_type: TTestType,
) -> Result<Vec<TestResult<f64>>>
fn t_test( &self, group1_indices: &[usize], group2_indices: &[usize], test_type: TTestType, ) -> Result<Vec<TestResult<f64>>>
Perform t-tests comparing two groups of cells for all genes.
Sourcefn mann_whitney_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
alternative: Alternative,
) -> Result<Vec<TestResult<f64>>>
fn mann_whitney_test( &self, group1_indices: &[usize], group2_indices: &[usize], alternative: Alternative, ) -> Result<Vec<TestResult<f64>>>
Perform Mann-Whitney U tests comparing two groups of cells for all genes.
Sourcefn fisher_exact_test(
&self,
group1_indices: &[usize],
group2_indices: &[usize],
alternative: Alternative,
) -> Result<Vec<TestResult<T>>>
fn fisher_exact_test( &self, group1_indices: &[usize], group2_indices: &[usize], alternative: Alternative, ) -> Result<Vec<TestResult<T>>>
Perform Fisher’s Exact tests comparing expression frequency between two groups.
Sourcefn differential_expression(
&self,
group_ids: &[usize],
test_method: TestMethod,
) -> Result<MultipleTestResults<f64>>
fn differential_expression( &self, group_ids: &[usize], test_method: TestMethod, ) -> Result<MultipleTestResults<f64>>
Comprehensive differential expression analysis with multiple testing correction.