Skip to content

Commit

Permalink
Merge pull request #49 from YosefLab/canergen-patch-2
Browse files Browse the repository at this point in the history
Update test_models.py
  • Loading branch information
canergen authored Jul 25, 2024
2 parents e52a229 + a06262e commit a07f121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion popv/algorithms/_onclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
3 changes: 1 addition & 2 deletions tests/core/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit a07f121

Please sign in to comment.