Skip to content

Commit

Permalink
Fixes to PopV.
Browse files Browse the repository at this point in the history
  • Loading branch information
canergen committed Jun 19, 2023
1 parent af1a9d2 commit 6b95ddf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion popv/algorithms/_onclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ def make_cell_ontology_id(self, adata, celltype_dict, ontology_key):
Default will be <labels_key>_cell_ontology_id
"""
ontology_id = []
single_warning = [] # print a single warning per missing cell-type

for label in adata.obs[self.labels_key]:
if label != adata.uns["unknown_celltype_label"]:
if label not in celltype_dict:
logging.warning("Following label not in celltype_dict ", label)
if label not in single_warning:
logging.warning("Following label not in celltype_dict ", label)
single_warning.append(label)
ontology_id.append("unknown")
ontology_id.append(celltype_dict[label])
else:
ontology_id.append("unknown")
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ description = "Automatic annotation of single cell data using a labelled referen
packages = [
{include = "popv"},
]
version = "0.3.1"
version = "0.3.2"
readme = "README.md"

[tool.poetry.dependencies]
Expand All @@ -48,7 +48,7 @@ nbformat = {version = ">=4.4.0", optional = true}
nbsphinx = {version = "*", optional = true}
nbsphinx-link = {version = "*", optional = true}
onclass = "^1.2"
pandas = ">=1.4"
pandas = ">=1.4,<2.0"
pre-commit = {version = ">=2.7.1", optional = true}
pytest = {version = ">=4.4", optional = true}
rich = ">=9.1.0"
Expand Down

0 comments on commit 6b95ddf

Please sign in to comment.