biolink-model icon indicating copy to clipboard operation
biolink-model copied to clipboard

Question about RDF predicates

Open hsolbrig opened this issue 5 years ago • 3 comments

Given the following yaml definition:

subject:
    is_a: association slot
          ...
    mappings:
      - rdf:subject
      - owl:annotatedSource
      - oban:association_has_subject

context.jsonld is currently generated with:

 "subject": {
         "@type": "@id",
         "@id": "rdf:subject"
      },

meaning that the Json fragment:

    "foo" {
         "is_a" : "GenotypeToGenotypePartAssociation",
         "subject": "http://identifiers.org/drugbank/DB11827",
              ...
      },

Produces:

:foo rdf:type biolink:GenotypeToGenotypePartAssociation;
       rdf:subject <http://identifiers.org/drugbank/DB11827>.

and the ShEx validator asserts that every instance of a biolinkGenotypeToGenotypePartAssociation must have exactly one rdf:subject predicate.

Question 1:

How should non-RDF input (e.g. JSON, ...) be represented in RDF

  1. Use the first mapping in the list if one exists: ("subject" --> rdf:subject) if one or more mappings exist otherwise use the native mapping ("affects_abundance_of --> biolink:affects_abundance_of).

  2. Ignore the mappings: ("subject" --> biolink:subject) and ("affects_abundance_of --> biolink:affects_abundance_of)

  3. Emit ALL mappings: ("subject" --> biolink:subject, rdf:subject, owl:annotatedSource, ...)

Question 2:

What should the RDF validator expect:

  1. rdf:subject andbiolink:affects_abundance_of
  2. biolink:subject and biolink:affects_abundance_of
  3. any of biolink:subject, rdf:subject, owl:annotatedSource`, ...

The implementation as it exists today uses answer 1 for both questions.

  1. Something else?

hsolbrig avatar Dec 17 '18 16:12 hsolbrig

Also see issue #182

hsolbrig avatar Dec 17 '18 17:12 hsolbrig

@hsolbrig are you still awaiting an answer to this?

nlharris avatar Jan 28 '21 19:01 nlharris

Yes -- I don't believe that it has been answered.

hsolbrig avatar Jan 28 '21 19:01 hsolbrig