INCATools / INCATools/ontology-access-kit

HPOA parser does not account for negation qualifier

Open
#862 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

Obviously, this can lead to misattribution of associations since negated associations are specifically noted to *NOT* be present.

Example relevant lines from current `phenotype.hpoa`:

database_id | disease_name | qualifier | hpo_id | reference | evidence | onset | frequency | sex | modifier | aspect | biocuration
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
ORPHA:1401 | CHAND syndrome | | HP:0200160 | ORPHA:1401 | TAS | | HP:0040282 | | | P | ORPHA:orphadata[2026-02-16]
ORPHA:1401 | CHAND syndrome | | HP:0004704 | ORPHA:1401 | TAS | | HP:0040283 | | | P | ORPHA:orphadata[2026-02-16]
ORPHA:1401 | CHAND syndrome | NOT | HP:0001270 | ORPHA:1401 | TAS | | | | | P | ORPHA:orphadata[2026-02-16]
ORPHA:1401 | CHAND syndrome | NOT | HP:0200041 | ORPHA:1401 | TAS | | | | | P | ORPHA:orphadata[2026-02-16]

So `HP:0001270` should not be asserted as an association. From `runoak -i sqlite:obo:hp -G hpoa -g phenotype.hpoa associations -Q subject ORPHA:1401 -O yaml` we get (among other lines):

```
subject: ORPHA:1401
object: HP:0001270
subject_label: CHAND syndrome
object_label: Motor delay
```

The csv output also does not show this as negated.

Contributor guide

Open the contributing guide

Research direction

Start with the HPOA parser and the `phenotype.hpoa` input shown in the issue, then reproduce the `runoak ... associations` query for `ORPHA:1401`. Check how the `qualifier` column is represented and verify that rows marked `NOT` are excluded from asserted associations and CSV output.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.