W3C home > Mailing lists > Public > public-bioschemas@w3.org > December 2017

Re: ShEX vs JSON schema

From: Andra Waagmeester <andra@micelio.be>
Date: Thu, 14 Dec 2017 01:14:38 +0100
Message-ID: <CAMNM0fXJr6r8uJKH=K_pXdA0_h-b=uu1mKfnN=WDFzZx_w4ioQ@mail.gmail.com>
To: "Gray, Alasdair J G" <A.J.G.Gray@hw.ac.uk>
Cc: Leyla Garcia <ljgarcia@ebi.ac.uk>, "public-bioschemas@w3.org" <public-bioschemas@w3.org>, BATISTA Dominique <dominique.batista@france-bioinformatique.fr>
I think it is a great idea to test the usage of confirmation tests using
ShEx.

To see the application of ShEx in the protein ShEx file by Leyla you can
play with Eric Prud'hommeaux's implementation: [1], Note that Jose Labra
Gayo's implementation [2] has the same results.

You can load the schema:
https://raw.githubusercontent.com/BioSchemas/specifications/master/Protein/ProteinEntity-with-context.shex
and the data:
https://raw.githubusercontent.com/BioSchemas/specifications/master/Protein/examples/ProteinEntity-with-context.n3
by URL in both of these implementations

I find ShEx useful because it allows testing for conformance of an
expressed shape but also allows defining a semantic model to facilitate
communicating on this. The ShExC format is concise, which helps with the
readibility. Which in turn accelerates the natural evolution of models. So
with an expressed model, you can test for conformance, and possibly adapt
the initial model and evolve.

Maybe I should also point to HL7 extensive use of ShEx e.g. [3]

It also might be worth mentioning the recent publicaiton of book
"Validating RDF Data" [4]

Cheers,

Andra

[1]  http://rawgit.com/shexSpec/shex.js/master/doc/shex-
simple.html?schemaURL=https%3A%2F%2Fraw.githubusercontent.com%2FBioSchemas%
2Fspecifications%2Fmaster%2FProtein%2FProteinEntity-
with-context.shex&dataURL=https%3A%2F%2Fraw.githubusercontent.com%
2FBioSchemas%2Fspecifications%2Fmaster%2FProtein%2Fexamples%
2FProteinEntity-with-context.n3&shape-map=uniprot%3AP00519%
40%3CProteinMinimum%3E&interface=human&regexpEngine=threaded-val-nerr

[2] http://shaclex.herokuapp.com/validate?schemaURL=https%3A%
2F%2Fraw.githubusercontent.com%2FBioSchemas%2Fspecifications%2Fmaster%
2FProtein%2FProteinEntity-with-context.shex&schemaFormat=ShExC&
schemaEngine=ShEx&triggerMode=ShapeMap&dataURL=https%3A%2F%
2Fraw.githubusercontent.com%2FBioSchemas%2Fspecifications%
2Fmaster%2FProtein%2Fexamples%2FPro
<http://shaclex.herokuapp.com/validate?schemaURL=https%3A%2F%2Fraw.githubusercontent.com%2FBioSchemas%2Fspecifications%2Fmaster%2FProtein%2FProteinEntity-with-context.shex&schemaFormat=ShExC&schemaEngine=ShEx&triggerMode=ShapeMap&dataURL=https%3A%2F%2Fraw.githubusercontent.com%2FBioSchemas%2Fspecifications%2Fmaster%2FProtein%2Fexamples%2FProteinEntity-with-context.n3&dataFormat=TURTLE&shapeMap=uniprot%3AP00519%40%3CProteinMinimum%3E>

[3] http://build.fhir.org/observation.shex.html

[4] https://www.amazon.com/dp/1681731649/ref=cm_sw_r_cp_ep_dp_Uk97zbFB571X7


On Wed, Dec 13, 2017 at 11:00 AM, Gray, Alasdair J G <A.J.G.Gray@hw.ac.uk>
wrote:

> Dear All,
>
> Leyla, thanks for kicking of this conversation on the list. It is
> something that I have discussed with several people in face-to-face
> conversations.
>
> On 12 Dec 2017, at 17:41, Leyla Garcia <ljgarcia@ebi.ac.uk> wrote:
>
> Any thoughts on using ShEX [1] or SHACL [2] rather than JSON schema [3]
> for validation purposes?
>
>
> ShEx and SHACL are both more expressive than JSON schema, and better
> capture the validation needs of the Bioschemas profiles. In particular,
> they allow for the capture of relationships between entities and also
> restrictions on the vocabulary terms used.
>
> Between ShEx and SHACL it is a closer run thing and we are doing some
> experimentation with both. ShEx has a more concise notation than SHACL and
> I understand that it has more expressive power. However, the SHACL
> libraries and documentation are more professionally put together and of
> course it has the endorsement of the W3C working group.
>
> There will be an ELIXIR implementation study in 2018 that has a focus on
> validation so hopefully some of these issues can be investigated in that.
>
> Best regards
>
> Alasdair
>
> Alasdair J G Gray
> Fellow of the Higher Education Academy
> Assistant Professor in Computer Science,
> School of Mathematical and Computer Sciences
> (Athena SWAN Bronze Award)
> Heriot-Watt University, Edinburgh UK.
>
> Email: A.J.G.Gray@hw.ac.uk
> Web: http://www.macs.hw.ac.uk/~ajg33
> ORCID: http://orcid.org/0000-0002-5711-4872
> Office: Earl Mountbatten Building 1.39
> Twitter: @gray_alasdair
>
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> *Heriot-Watt University is The Times & The Sunday Times International
> University of the Year 2018*
>
> Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With
> campuses and students across the entire globe we span the world, delivering
> innovation and educational excellence in business, engineering, design and
> the physical, social and life sciences.
>
> This email is generated from the Heriot-Watt University Group, which
> includes:
>
>    1. Heriot-Watt University, a Scottish charity registered under number
>    SC000278
>    2. Edinburgh Business School a Charity Registered in Scotland,
>    SC026900. Edinburgh Business School is a company limited by guarantee,
>    registered in Scotland with registered number SC173556 and registered
>    office at Heriot-Watt University Finance Office, Riccarton, Currie,
>    Midlothian, EH14 4AS
>    3. Heriot- Watt Services Limited (Oriam), Scotland's national
>    performance centre for sport. Heriot-Watt Services Limited is a private
>    limited company registered is Scotland with registered number SC271030 and
>    registered office at Research & Enterprise Services Heriot-Watt University,
>    Riccarton, Edinburgh, EH14 4AS.
>
> The contents (including any attachments) are confidential. If you are not
> the intended recipient of this e-mail, any disclosure, copying,
> distribution or use of its contents is strictly prohibited, and you should
> please notify the sender immediately and then delete it (including any
> attachments) from your system.
>
Received on Thursday, 14 December 2017 00:15:53 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 14 December 2017 00:15:54 UTC