From 693220a4bbaec5dae87f881063f8a5bb7cc6b33c Mon Sep 17 00:00:00 2001 From: Can Ergen Date: Thu, 25 Jul 2024 09:21:25 -0700 Subject: [PATCH 1/2] Update _onclass.py to work in fast mode. --- popv/algorithms/_onclass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popv/algorithms/_onclass.py b/popv/algorithms/_onclass.py index bc56e89..259cc43 100644 --- a/popv/algorithms/_onclass.py +++ b/popv/algorithms/_onclass.py @@ -179,7 +179,7 @@ def predict(self, adata): pred_label = [train_model.i2co[ind] for ind in onclass_seen] pred_label_str = [clid_2_name[ind] for ind in pred_label] adata.obs[self.result_key] = pred_label_str - adata.obs["onclass_seen"] = pred_label_str + adata.obs[self.seen_result_key] = pred_label_str else: onclass_pred = train_model.Predict(corr_test_feature, use_normalize=False, refine=True, unseen_ratio=-1.0) pred_label = [train_model.i2co[ind] for ind in onclass_pred[2]] From 6a9a87cb9676b21f7dbb635d11bebfa2ad5b7e4a Mon Sep 17 00:00:00 2001 From: Can Ergen Date: Thu, 25 Jul 2024 09:23:11 -0700 Subject: [PATCH 2/2] Update test_models.py Fixed tests. --- tests/core/test_models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/core/test_models.py b/tests/core/test_models.py index 581e757..dad6c1d 100644 --- a/tests/core/test_models.py +++ b/tests/core/test_models.py @@ -200,8 +200,7 @@ def test_annotation(): adata = _get_test_anndata(mode='fast').adata popv.annotation.annotate_data( - adata, methods=["svm", "rf"], - save_path="tests/tmp_testing/popv_test_results/") + adata, save_path="tests/tmp_testing/popv_test_results/") def test_annotation_no_ontology():