Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: NCBITaxon wrong ontology assertion: ...not child of... #58

Closed
M-casado opened this issue Dec 6, 2022 · 4 comments
Closed

[BUG]: NCBITaxon wrong ontology assertion: ...not child of... #58

M-casado opened this issue Dec 6, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@M-casado
Copy link
Contributor

M-casado commented Dec 6, 2022

Bug summary

When using the custom keyword graphRestriction for the NCBITaxon ontology, it seems to fail regardless of the set parent level.

Technical details

  • Used GitHub branch: main
  • Operating System: WSL2
  • Node version: v16.13.0
  • npm version: 8.6.0

To reproduce

  1. Clone, install and deploy a local server
git clone https://github.com/elixir-europe/biovalidator.git
cd biovalidator
npm install
node src/biovalidator
  1. Regardless of endpoint (UI or CLI), set the schema to use graphRestriction with NCBITaxon ontology; and the data to correctly contain the CURIE of a term that is hierarchically below the one in the custom keyword.
# In this case the schema constraint is any NCBITaxon CURIE below its root level (NCBITaxon:1).
{
  "type": "object",
  "required" : ["taxonIdCurie"],
  "properties": {
    "taxonIdCurie": {
      "type": "string",
      "graphRestriction":  {
        "ontologies" : ["obo:NCBITAXON"],
        "classes": ["NCBITaxon:1"],
        "relations": ["rdfs:subClassOf"],
        "direct": false,
        "include_self": false
      }
    }
  }
}

# And the data contains the NCBITaxon CURIE for humans
{
  "taxonIdCurie": "NCBITaxon:9606"
}
  1. Observe the erroneous message:
- taxonIdCurie
  Provided term is not child of [http://purl.obolibrary.org/obo/NCBITaxon_1]

Observed behaviour

The validation does not pass even though the conditions are met for it to pass (i.e. the term is correct for the hierarchy)

Expected behaviour

The validation result should be that it was passed.

Additional context

I'm unsure if this error has to do with the tool itself, OLS API, or NCBITaxon per se. But it is worth investigating.

I also checked with other levels of the hierarchy:

  • NCBITaxon:9606 being right below NCBITaxon:9605
  • NCBITaxon:9605 being below the root level NCBITaxon:1
  • graphRestriction in a similar fashion but using other ontologies, where the validation behaves as expected.
@M-casado
Copy link
Contributor Author

Similar to the other issue (see #56 (comment)), we ended up adapting our schemas to avoid this one, but this time it is indeed a wacky way to fix it and in the future we would very much prefer for the validation to take place for this term.

@theisuru
Copy link
Collaborator

theisuru commented Feb 6, 2023

@M-casado NCBITaxon_9606 in the OLS the ontology tree is not shown correctly. I am not sure if this is a recent problem or this is intentional. I will ask OLS team and get back to you.

@theisuru
Copy link
Collaborator

theisuru commented Feb 6, 2023

Did some more digging before contacting OLS team. It looks like ontologies in the graphRestriction are case sensitive. Same query works if we used obo:ncbitaxon instead of obo:NCBITAXON.

If all the ontologies are in simple case in OLS, I can make the transformation in the code aswell or leave it as it is for the user to figure out the correct case. What do you think?

@M-casado
Copy link
Contributor Author

M-casado commented Feb 6, 2023

Ah I see, nice catch, @theisuru.
Regarding your question, it would depend on whether NCBITaxon is another ontology that can be used. If OLS always uses lowercase and the uppercase is thrown under the bin, then perhaps the lower case is justified.

Nevertheless, a simple mention in the documentation would also suffice for me. I'll address this myself as well in a short PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants