czbenchmarks.datasets.utils_single_cell
Attributes
Functions
Run differential gene expression analysis for a list of conditions between perturbed |
Module Contents
- czbenchmarks.datasets.utils_single_cell.logger
- czbenchmarks.datasets.utils_single_cell.run_multicondition_dge_analysis(adata: anndata.AnnData, condition_key: str, de_gene_col: str, control_cells_ids: Dict[str, List[str]], filter_min_cells: int = 10, filter_min_genes: int = 1000, min_pert_cells: int = 50, remove_avg_zeros: bool = False, store_dge_metadata: bool = False, return_merged_adata: bool = False) Tuple[pandas.DataFrame, anndata.AnnData] [source]
- Run differential gene expression analysis for a list of conditions between perturbed
and matched control cells.
- Parameters:
(AnnData) (adata)
(str) (de_gene_col)
(str)
(Dict[str (control_cells_ids)
List[str]]) (Mapping from condition -> list of matched control cell ids.)
(int (min_pert_cells)
optional) (Whether to return the merged AnnData object. Defaults to False.)
(int
optional)
(int
optional)
(bool (return_merged_adata)
optional)
(bool
optional)
(bool
optional)
- Returns:
(results_df, adata_merged): - results_df: Differential expression results for selected_condition. - adata_merged: AnnData containing concatenated condition and control cells.
- Return type:
Tuple[pd.DataFrame, anndata.AnnData]