BCODMO / bcodmont

Creative Commons Zero v1.0 Universal
0 stars 1 forks source link

Figure out BCO-SM subquant subdesc subent and submatrix rlns #8

Open kaiiam opened 3 years ago

kaiiam commented 3 years ago

As discussed with @jaclynsaunders I'll need to figure out how to add out quantifier/subquantifier, etc relations into BCO-SM so the UI can pull from these instead of maintaining a separate json list of pairing. Todo after https://github.com/BCODMO/bcodmont/issues/6.

kaiiam commented 3 years ago

I have thought of a possible solution for this. I've tested the output of what my solution would look like here The full workflow is yet to be fully implemented but I have worked it out on paper.

@jaclynsaunders If you get a chance to checkout that file and see if relationships like those encoded here will work in the new UI. Here is a little snipit:

<!-- http://purl.obolibrary.org/obo/PCO_0000000 -->

    <owl:Class rdf:about="http://purl.obolibrary.org/obo/PCO_0000000">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://bcodmo/sm#hasDescriptor"/>
                <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/BSM_0030003"/>
            </owl:Restriction>

In protege it looks like:

image

We could use any Object property for this (relation), it doesn't have to be the made up http://bcodmo/sm#hasDescriptor. We could do one with the standard namespace http://purl.obolibrary.org/obo/BSM then add a new ID range for those to make terms like has descriptor has qualifier etc.

kaiiam commented 3 years ago

@jaclynsaunders I've made some good progress on this. See the following images

Based on the addition of a pipe-delimited column to one of our robot templates we can add constraints. e.g. here I added statistic|size to age maybe a non-sense example but just for testing purposes.

image

Then a python script opens that does a bunch of processing, (including using RDF lib) to do recursive subclass queries on the provided constraints, aka get all subclasses of all of them. Then print those results into another robot template. Then we merge that robot template with the working modules (e.g. quantifiers.owl) and we get the following object properties added to the module files which can be used in the UI to do the constraints. We could also use owl Annotation properties instead of object properties if that's easier on your side.

The result is like the following with a bunch of individual relations to the desired constraints (and their subclasses). Here it's quantifiers with descriptor constrains which I know is wrong but it's just to test.

image

Let me know if something like this works for you @jaclynsaunders.

jaclynsaunders commented 3 years ago

@kaiiam looks good! Maybe you can walk me through the example file later. Can you also show me the rdflib code? Rdflib ended up being a time bottleneck, so just want to point out it may be one here as well. Totally something we can work around though.

kaiiam commented 3 years ago

Sure lets discuss in today's meeting.