INCATools / INCATools/ontology-access-kit

When using semsimiam implementation, opaque errors are omitted if no predicates are passed`

Open
#641 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
198
Forks
35
Avg merge
3d 4h
Merged PRs (30d)
1

Description

`runoak --stacktrace -i semsimian:sqlite:obo:phenio -v termset-similarity MP:0010771 MP:0002169 MP:0005391 MP:0005389 MP:0005367 @ HP:0004325 HP:0000093 MP:0006144 HP:0001254 HP:0001217 HP:0001222 HP:0001248 HP:0001263 HP:0001279`

gives

```
File "/Users/cjm/repos/ontology-access-kit/src/oaklib/implementations/semsimian/semsimian_implementation.py", line 237, in termset_pairwise_similarity
semsimian = self._get_semsimian_object(
File "/Users/cjm/repos/ontology-access-kit/src/oaklib/implementations/semsimian/semsimian_implementation.py", line 88, in _get_semsimian_object
predicates = tuple(sorted(predicates))
TypeError: 'NoneType' object is not iterable
```

Minimally it should check for this condition and throw a NotImplemented error with a message explaining that predicates must be selected

or better: semsimian should simply accept empty predicates, meaning use all predicates

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the supplied runoak command, then inspect src/oaklib/implementations/semsimian/semsimian_implementation.py, especially _get_semsimian_object and termset_pairwise_similarity. Determine whether empty predicates should be accepted or rejected, and verify that the command no longer produces the shown TypeError and instead has the agreed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.