Skip to content

Extract & persist IAO:0000700 as hasOntologyRootTerm #315

Description

@matthewhorridge

Extract & persist IAO:0000700 as hasOntologyRootTerm

Part of ncbo/bioportal-project#218 (full design and decisions there).

Read an ontology's declared root terms (IAO:0000700, "has ontology root term") at submission-processing time and store them as a submission attribute, so the UI can start the class hierarchy at the declared roots instead of owl:Thing. This issue only exposes the metadata — it does not change /roots.

Changes

1. Declare the attribute — config/schemes/ontology_submission.yml:

hasOntologyRootTerm:
  display: "relations"
  label: "Ontology root term(s)"
  helpText: "Class(es) the ontology declares as display roots (IAO:0000700)."
  example: 'http://purl.obolibrary.org/obo/CL_0000000'
  extractedMetadata: true
  metadataMappings: [ "obo_purl:IAO_0000700" ]

2. Declare it on the model — models/ontology_submission.rb:

attribute :hasOntologyRootTerm, type: [:list, :uri]

(Mirrors obsoleteParent, but a list.)

Notes / verification

  • obo_purl (http://purl.obolibrary.org/obo/) is already registered in Goo.namespaces, so obo_purl:IAO_0000700 resolves with no new namespace.
  • The existing submission_extract_metadata operation queries with the ontology IRI as subject (SELECT … FROM <submission-graph> WHERE { <ontology_uri> obo_purl:IAO_0000700 ?o }) and handles :list URI attributes, so no new extraction code is expected.
  • The attribute must be kept out of the content_metadata_attributes reject list so it appears in the API catalog and the submission edit form (which is generated from that catalog). The user_provided_value guard preserves a manually set value across re-processing.

Acceptance

  • Re-process an ontology that declares IAO:0000700 (CL / Cell Ontology is the reference case); latest_submission?display=hasOntologyRootTerm returns the declared root(s).
  • An ontology without the annotation returns an empty value, not an error.
  • A submission where the value was set manually is not overwritten by re-processing.

Out of scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions