From 54b7f30d58905fa4e7ad83c4229281072e72b661 Mon Sep 17 00:00:00 2001 From: zethson Date: Thu, 26 Jan 2023 16:18:35 +0100 Subject: [PATCH] Fix nox Signed-off-by: zethson --- pertpy/tools/_base_coda.py | 4 ++-- pertpy/tools/_mixscape.py | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pertpy/tools/_base_coda.py b/pertpy/tools/_base_coda.py index 3d3928b8..29bfda79 100644 --- a/pertpy/tools/_base_coda.py +++ b/pertpy/tools/_base_coda.py @@ -1383,11 +1383,11 @@ def from_scanpy( if covariate_obs: covariate_obs += sample_identifier else: - covariate_obs = sample_identifier + covariate_obs = sample_identifier # type: ignore # join sample identifiers if type(sample_identifier) == list: - adata.obs["scCODA_sample_id"] = adata.obs[sample_identifier].agg('-'.join, axis=1) + adata.obs["scCODA_sample_id"] = adata.obs[sample_identifier].agg("-".join, axis=1) sample_identifier = "scCODA_sample_id" # get cell type counts diff --git a/pertpy/tools/_mixscape.py b/pertpy/tools/_mixscape.py index 91259bfa..356b8496 100644 --- a/pertpy/tools/_mixscape.py +++ b/pertpy/tools/_mixscape.py @@ -383,8 +383,17 @@ def lda( return adata def _get_perturbation_markers( - self, adata, split_masks, categories, labels, control, layer, pval_cutoff, min_de_genes, logfc_threshold - ): + self, + adata: AnnData, + split_masks: list[np.ndarray], + categories: list[str], + labels: str, + control: str, + layer: str, + pval_cutoff: float, + min_de_genes: float, + logfc_threshold: float, + ) -> dict[tuple, np.ndarray]: """determine gene sets across all splits/groups through differential gene expression Args: