Compute highly variable genes using the specified method and parameters. This is the main entry point for HVG detection. It analyzes the mean-variance relationship in the expression data to identify genes with biological variability above technical noise. ## Algorithm Overview 1. **Calculate Statistics**: Compute mean and variance for each gene 2. **Model Relationship**: Fit mean-variance relat
(
adata: &IMAnnData,
params: Option<HVGParams>,
)
| 154 | /// compute_highly_variable_genes(&adata, Some(params))?; |
| 155 | /// ``` |
| 156 | pub fn compute_highly_variable_genes( |
| 157 | adata: &IMAnnData, |
| 158 | params: Option<HVGParams>, |
| 159 | ) -> anyhow::Result<()> { |
| 160 | let params = params.unwrap_or_default(); |
| 161 | let x = adata.x(); |
| 162 | |
| 163 | match params.flavor { |
| 164 | FlavorType::Seurat => compute_seurat_hvg(adata, &x, params), |
| 165 | FlavorType::CellRanger => compute_cell_ranger_hvg(adata, &x, params), |
| 166 | FlavorType::SVR => compute_svr_hvg(adata, &x, params), |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /// Post-process dispersion statistics for Seurat method to handle edge cases. |
| 171 | /// |
nothing calls this directly
no test coverage detected