clingen-data-model / clingen-interpretation

Allele (variant) interpretation model and API for ClinGen
3 stars 1 forks source link

Property definition in context #99

Closed tnavatar closed 6 years ago

tnavatar commented 7 years ago

A (relatively) simple view of the context could look like this:

{
  "@context": {
   "cg": "http://datamodel.clinicalgenome.org/terms/",
    "fhir": "https://www.hl7.org/fhir/",
    "consequence": {"@id": "cg:A001",
                                "@type": "fhir:CodeableConcept"}
    // repeated for all attributes
   }
}

I'm finding that there are relatively few property definitions defined in external vocabularies, and that we will likely have to define almost all of them ourselves (schema.org and Dublin Core seem to be the only big sources, and there are none I can find relevant to our domain) This is opposed to types for other classes, which I think we should be able to borrow quite liberally from outside vocabularies. I had started to find some of these and was seeding the 'external IRI' field on the spreadsheet. Apropos to this, I'm wondering if I can't slightly modify the Type field on the spreadsheet to require either full IRIs, or short IRIs, per the fhir:CodeableConcept example above.

Thoughts? What will I break if I do this?

cbizon commented 7 years ago

This looks fine to me.

bpow commented 7 years ago

I'm not sure what you are asking here, @tnavatar , but I think the question is that we've had shortened IRIs in the externalIRI column to date, but you would like to add full IRIs in some cases. From my standpoint, I see the two as different representations of the same thing, so I have no problem with that.

If your question is whether we should use the IRI as the '@type', then I think that makes the most sense as well.

tnavatar commented 7 years ago

For now we won't use the @type property in the context; will revisit later.

larrybabb commented 6 years ago

@tnavatar hey can you review whether this is still relevant based on the latest changes and if so, restate the concern. if not, please close.

tnavatar commented 6 years ago

I think we're well past this issue; everything I've learned since then is that using @type in the context is something to be done carefully, and certainly not automatically. Closing ticket.

bpow commented 6 years ago

@tnavatar : can you clarify about avoiding use of @type (e.g., anything in particular I can read about this?). The current context we generate maps the type of objects in our json-ld to @type-- so we are using types and should make sure that we aren't causing problems in doing so.

tnavatar commented 6 years ago

I think it was less about using the @type property in objects themselves, which we can and should do, and more about assigning a @type to properties in the context file, therefore assigning that type to any object referenced by that property, whether appropriate or not.

Will have to see if there’s any specific reading on this, but it’s something I’ve seen done only sparingly in other context files (the Allele Registry has one, for instance). I think this might also have been something we discussed with Matt, though it’s been a while.

Nevertheless, I see no problem mapping type to @type.

On Dec 13, 2017, at 2:51 PM, Bradford Powell notifications@github.com wrote:

@tnavatar https://github.com/tnavatar : can you clarify about avoiding use of @type (e.g., anything in particular I can read about this?). The current context we generate maps the type of objects in our json-ld to @type-- so we are using types and should make sure that we aren't causing problems in doing so.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/clingen-data-model/clingen-interpretation/issues/99#issuecomment-351502648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXWMDHqmfdixj03mkGJdlWwKGm9_NsRks5tACq1gaJpZM4NeEPQ.