diff --git a/dynamo/preprocessing/Preprocessor.py b/dynamo/preprocessing/Preprocessor.py index b805fd0c3..58ff1c130 100644 --- a/dynamo/preprocessing/Preprocessor.py +++ b/dynamo/preprocessing/Preprocessor.py @@ -250,14 +250,16 @@ def standardize_adata(self, adata: AnnData, tkey: str, experiment_type: str) -> main_info_insert_adata("experiment_type=%s" % adata.uns["pp"]["experiment_type"], "uns['pp']", indent_level=2) self.convert_layers2csr(adata) - self.collapse_species_adata(adata) + if self.collapse_species_adata: + main_info("applying collapse species adata...") + self.collapse_species_adata(adata) main_debug("applying convert_gene_name function...") self.convert_gene_name(adata) main_debug("making adata observation index unique after gene name conversion...") self.unique_var_obs_adata(adata) - + def _filter_cells_by_outliers(self, adata: AnnData) -> None: """Select valid cells based on the method specified as the preprocessor's `filter_cells_by_outliers`. diff --git a/dynamo/preprocessing/preprocessor_utils.py b/dynamo/preprocessing/preprocessor_utils.py index 99111be7e..50e446901 100644 --- a/dynamo/preprocessing/preprocessor_utils.py +++ b/dynamo/preprocessing/preprocessor_utils.py @@ -755,11 +755,9 @@ def filter_cells_by_outliers( if max_pmito_s is not None: detected_bool = detected_bool & (adata.obs["pMito"] < max_pmito_s) - main_info( + main_debug( "filtered out %d cells by %f%% of mitochondrial genes for a cell." - % (adata.n_obs - (adata.obs["pMito"] < max_pmito_s).sum(), max_pmito_s), - indent_level=2, - ) + % ((adata.obs["pMito"] < max_pmito_s).sum(), max_pmito_s), indent_level=2) filter_bool = detected_bool if filter_bool is None else np.array(filter_bool) & detected_bool