mapping-commons / sssom

Simple Standard for Sharing Ontology Mappings
https://mapping-commons.github.io/sssom/
BSD 3-Clause "New" or "Revised" License
141 stars 24 forks source link

Review JSON-LD and RDF serialisations #102

Open matentzn opened 2 years ago

matentzn commented 2 years ago

Once the latest big push on sssom-py is completed, we should review the RDF and JSONLD serialisations with @graybeal and other people in the FAIR/Semantics space, and get their feedback. Who else other than John wants to be part of this? We will probably organise a call to do that.

afk314 commented 2 years ago

I came here looking for an RDF serialization so would be happy to review as a user. I have need of such a vocabulary right now and would consider using it but want to start with the RDF. The JSONLD context is helpful but not sufficient for me to commit to using it.

matentzn commented 2 years ago

Ok, thanks! Feedback would be greatly appreciated. We currently use a simple flat serialistion:

So this table: https://github.com/mapping-commons/sssom-py/blob/master/tests/validate_data/basic.tsv

Translates to this RDF: https://github.com/mapping-commons/sssom-py/blob/master/tests/validate_data/basic.tsv.rdf

And this JSON-LD: https://github.com/mapping-commons/sssom-py/blob/master/tests/validate_data/basic.tsv.json

There is also an OWL serialisation, which is based on the RDF one but injects some declarations and other syntactic requirements where necessary: https://github.com/mapping-commons/sssom-py/blob/master/tests/validate_data/basic.tsv.owl

The biggest difference between RDF and OWL would be (which is not implemented in sssom-py right now) how to handle object property relations between classes, and complex class expressions #36 .

matentzn commented 2 years ago

I will be off all January but if you need help how to generate these yourself, you can probably reach out to @hrshdhgd.

afk314 commented 2 years ago

Just circling back on this. What I am trying to understand first is where do I find the ontology for SSOM? In the basic.tsv.rdf file I see a sssom: prefix defined but no import. I feel like I am missing something very obvious here but where is the TTL file for the T-Box? I can't seem to find it anywhere.

matentzn commented 2 years ago

Hm.. Not sure I understand what you are asking - maybe we have a conceptual confusion? What do you mean, "the ontology for sssom", do you mean the JSON-LD context? https://github.com/mapping-commons/sssom/blob/master/sssom/jsonld/sssom.context.jsonld

There is no "ontology" in the sense of, lets say, RO if that is what you are asking. In particular, there is no TBox at all, and even if there was, it would by tiny. There are no specific "semantics" for any of the sssom:predicates other than the syntactic constrains that are captured by the JSON LD context, or even better, the JSON schema: https://github.com/mapping-commons/sssom/blob/master/sssom/jsonschema/sssom.schema.json

Let me know if this answers your questions, and thank your for looking at the serialisation! Its very high on my list of priorities to stablise the JSON-ld and RDF representations in particular!

afk314 commented 2 years ago

Yes, definitely some confusion here. Maybe I can cut through it with a different question.

I need to write some shapes that validate my SSSOM mappings are valid. To do that, I want to import a TTL file that defines the various classes and properties which are part of the SSSOM vocabulary. If this is only a set of classes and annotation properties with labels, thats perfectly fine. But I do need to import something to use it. A JSON-LD context simply organizes instance data present in the JSON-LD object itself.

matentzn commented 2 years ago

Its too late this week, but we can auto-generate SHEX shapes for SSSOM, if that helps as a starting point (we so far did not have the need, but LinkML allows us to do this). Would this be of help?

afk314 commented 2 years ago

No hurry. I just want a TTL file that describes the classes and properties. Ideally one that I can dereference from a PURL server. It's just standard linked data stuff. Maybe SSSOM isn't intended to be used primarily in an RDF context but the absence of this is truly head scratching.

matentzn commented 2 years ago

Yeah, purl wise, we are in the early processes. You should think of us as "going towards" linked data rather than "coming from" - many of the current SSSOM core team are primarily about biomedical ontologies, OBO and biological databases, and we are embracing linked data, but we sure need people like you helping us becoming better at it.

PURL wise, we started using w3id.org, like for example, this is the PURL to our sssom JSONLD context: https://w3id.org/sssom/sssom.context.jsonld

Still not sure exactly what you mean by "ontology" (in this here context), but I think @cmungall does and he will tell me how to answer your question next Monday! Thanks!

cmungall commented 2 years ago

SSSOM is indeed intended to be used in an RDF context!

I think what you are looking for is either the SHACL or the ShEx, the two major shape standards for linked data. We can provide these easily, and I think we should.

the OWL has been mentioned previously but of course, OWL is most useful for open world reasoning and there are not a lot of useful open world axioms that can be added to a mapping standard, but if all you are interested in is a file with the properties and associated metadata that may be fine, but for closed-world validation then ShEx/SHACL is what you are after.

afk314 commented 2 years ago

Hey Chris,

Thanks for replying. I appreciate it. I really think SSSOM fills an incredibly large gap as mappings handled by only a property are so impoverished! So, I want to use SSSOM in my own work.

I am looking for a file in a concrete RDF syntax that contains the type definitions for all properties and classes as well as basic annotations like label, etc. Any other common OBO annotations would be welcome too (notes, isDefinedBy, definition) would be welcome. It should have a single owl:Ontology individual than an OWL API could use for imports.

If I can help at all, let me know. I’ll handle SHACL on my end as it might be narrowed or otherwise tweaked to handle my own needs.

Adam

On Feb 11, 2022, at 11:50 AM, Chris Mungall @.***> wrote:

SSSOM is indeed intended to be used in an RDF context!

I think what you are looking for is either the SHACL or the ShEx, the two major shape standards for linked data. We can provide these easily, and I think we should.

the OWL has been mentioned previously but of course, OWL is most useful for open world reasoning and there are not a lot of useful open world axioms that can be added to a mapping standard, but if all you are interested in is a file with the properties and associated metadata that may be fine, but for closed-world validation then ShEx/SHACL is what you are after.

— Reply to this email directly, view it on GitHub https://github.com/mapping-commons/sssom/issues/102#issuecomment-1036514484, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7CJZTUB2OWTRJQQ7ZD3MTU2VK6RANCNFSM5HDRXSLA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

cmungall commented 2 years ago

See:

https://github.com/mapping-commons/sssom/pull/140

matentzn commented 2 years ago

This was not supposed to close it :) Sorry @afk314

https://github.com/mapping-commons/sssom/tree/master/sssom/owl

You close it when you are satisfied.