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

Review JSON-LD and RDF serialisations #102

Open
matentzn opened this issue Nov 1, 2021 · 13 comments
Open

Review JSON-LD and RDF serialisations #102

matentzn opened this issue Nov 1, 2021 · 13 comments
Milestone

Comments

@matentzn
Copy link
Collaborator

matentzn commented Nov 1, 2021

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
Copy link

afk314 commented Dec 27, 2021

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
Copy link
Collaborator Author

matentzn commented Jan 1, 2022

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
Copy link
Collaborator Author

matentzn commented Jan 1, 2022

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

@afk314
Copy link

afk314 commented Feb 11, 2022

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
Copy link
Collaborator Author

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
Copy link

afk314 commented Feb 11, 2022

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
Copy link
Collaborator Author

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
Copy link

afk314 commented Feb 11, 2022

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
Copy link
Collaborator Author

matentzn commented Feb 11, 2022

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
Copy link
Contributor

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
Copy link

afk314 commented Feb 11, 2022 via email

@cmungall
Copy link
Contributor

See:

#140

@matentzn
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants