Skip to main content

MatrixStatTests

Trait MatrixStatTests 

Source
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§

Source

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.

Source

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.

Source

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.

Source

fn differential_expression( &self, group_ids: &[usize], test_method: TestMethod, ) -> Result<MultipleTestResults<f64>>

Comprehensive differential expression analysis with multiple testing correction.

Implementations on Foreign Types§

Source§

impl<T> MatrixStatTests<T> for CsrMatrix<T>
where T: FloatOpsTS, f64: From<T>,

Source§

fn t_test( &self, group1_indices: &[usize], group2_indices: &[usize], test_type: TTestType, ) -> Result<Vec<TestResult<f64>>>

Source§

fn mann_whitney_test( &self, group1_indices: &[usize], group2_indices: &[usize], alternative: Alternative, ) -> Result<Vec<TestResult<f64>>>

Source§

fn fisher_exact_test( &self, group1_indices: &[usize], group2_indices: &[usize], alternative: Alternative, ) -> Result<Vec<TestResult<T>>>

Source§

fn differential_expression( &self, group_ids: &[usize], test_method: TestMethod, ) -> Result<MultipleTestResults<f64>>

Implementors§

Source§

impl<'a, T, N, I> MatrixStatTests<T> for SparseMatrixRef<'a, T, N, I>