Open cmungall opened 5 years ago
OK, I figured out that I can do what I want with EXTENDS - but this is not yet supported in pyshex
here is an example:
Here is the same non-extends equivalent
Harold Solbrig
From: Chris Mungall notifications@github.com Reply-To: cmungall/obo-shapes reply@reply.github.com Date: Thursday, July 11, 2019 at 3:17 PM To: cmungall/obo-shapes obo-shapes@noreply.github.com Cc: Harold Solbrig solbrig@jhu.edu, Mention mention@noreply.github.com Subject: Re: [cmungall/obo-shapes] Attempting to combine CLOSED with inheritance fails (#1)
OK, I figured out that I can do what I want with EXTENDS - but this is not yet supported in pyshex
here is an example:
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cmungall/obo-shapes/issues/1?email_source=notifications&email_token=AADFRNT5ZFTPO7FEONMW3ZTP66IL7A5CNFSM4IAUYDWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZX3PRY#issuecomment-510638023, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AADFRNVTLA7LS6TICJFZFTDP66IL7ANCNFSM4IAUYDWA.
Here is the current idiom I’m using in biolinkml. Note that the presence of type arcs complicates the picture slightly, so it isn’t obvious that Extends will actually work in this situation. The general idea is that
I want to make a schema to see if my ontology follows a certain defined pattern, e.g. only a subset of annotation properties used.
My desired semantics are like a UML model, i.e. everything should be closed
I have a base class, declared closed:
https://github.com/cmungall/obo-shapes/blob/31b1741fdde50382afec998accb6493a471cb74a/obo-basic.shex#L12-L16
Then if I make a subshape:
https://github.com/cmungall/obo-shapes/blob/31b1741fdde50382afec998accb6493a471cb74a/obo-basic.shex#L18-L21
However, I want to prohibit random triples in my ontology like this:
https://github.com/cmungall/obo-shapes/blob/31b1741fdde50382afec998accb6493a471cb74a/tests/t01.ttl#L17
However, when I put the CLOSED keyword in
OboClass
and I pass in a valid ttl I get:any tips @hsolbrig?