edamontology / edamxpathvalidator

Verification script for the EDAM ontology
GNU General Public License v3.0
0 stars 0 forks source link

Check for maximum depth #6

Open joncison opened 6 years ago

joncison commented 6 years ago

In the soon-to-be-released Editors Guide:

Each subontology must not descend beyond a certain depth (see below).  Specifically, this means that each concept **MUST** have at least one path to root (*i.e.* `Topic <>`_, `Operation <>`_, `Data <>`_ or `Format <>`_ no deeper than indicated.   It's OK for a concept to have other paths to root that are deeper than this.
   2.1 **Topics** 3 levels deep max. *i.e.* *Topic* (root) -> Topic -> Subtopic -> Subsubtopic (leaves)
   2.2 **Operations** 6 levels deep max. 
   2.3 **Data** 4 levels deep max. 
   2.4 **Format** - 3 levels deep max. 

Not sure (I doubt) xpath can do this, but we need a check (raising an ERROR) in such cases.

hmenager commented 6 years ago

This probably needs more discussions: is the depth the maximum depth amongst all paths from root? or the minimum? do we take all paths into account, including those that go through "organisational" concepts?

joncison commented 6 years ago

Indeed.

Although I made major inroads into it, see: http://edamontologydocs.readthedocs.io/en/latest/technical_details.html#concrete-concepts

see "Hierarchy depth" under there.

It needs "placeholder" and "concrete" concepts to be systematically labelled as such (to do)

joncison commented 4 years ago

This will be addressed by the maxDepthExceeded test in edamverify(https://github.com/edamontology/edamverify)

cc @hmenager