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

Configure paths for anatomy queries #17

Closed
cmungall opened this issue Jul 15, 2016 · 18 comments · Fixed by #34
Closed

Configure paths for anatomy queries #17

cmungall opened this issue Jul 15, 2016 · 18 comments · Fixed by #34
Assignees

Comments

@cmungall
Copy link
Contributor

Typically when we populate the closure field, we traverse the closure over SubClassOf only

If the category is Anatomy, then the closure should be over SubClassOf|BFO:0000050.

This can be tested when this is implemented:
monarch-initiative/dipper#147 (bgee gene expression loads)

Side note: really this should not need the addition of procedural code. We should have a generic configuration for this. This will be a separate ticket, for now see geneontology/amigo#210 (comment)

@cmungall
Copy link
Contributor Author

This is the query: https://github.com/monarch-initiative/monarch-cypher-queries/blob/master/src/main/cypher/golr-loader/gene-anatomy.yaml

I suggest adding an additional tag to the yaml to indicate what paths should be used for subject and object closure, what do you think @kshefchek?

@cmungall
Copy link
Contributor Author

E.g.

query: |
        MATCH path=(subject:gene)-[relation:RO:0002206]->(object:`anatomical entity`)
        RETURN DISTINCT path,
        subject, object, relation,
        'gene' AS subject_category,
        'anatomy' AS object_category,
        'direct' AS qualifier
object_closure: "SubClassOf|BFO:0000050"

(with equivalence being implicit)

@cmungall
Copy link
Contributor Author

I have a test case for this, should I go ahead and put it in src/test/resources?

@benwbooth
Copy link
Contributor

If I'm understanding this right, there should be optional keys for subject_closure, object_closure, relation_closure, and evidence_closure. Each value should be a pipe-delimited list of curies which will be converted into IRIs.

Right now the default closure types and directions are defined as:

  • subclass, outgoing
  • type, outgoing
  • subproperty, outgoing
  • equivalent_class, both
  • same_as, both

If equivalence is implicit, does that mean equivalent_class and same_as should be implicitly added to the list of custom closure relationships? What about type and subproperty?

The CypherUtil module also defines a ! entailment operator. I'm not sure if that is relevant in this context or not.

Also, if the values are pipe-delimited curies, should the example object_closure value be "rdfs:subClassOf|BFO:0000050" instead of "SubClassOf|BFO:0000050"?

@cmungall
Copy link
Contributor Author

cmungall commented May 27, 2017 via email

@benwbooth
Copy link
Contributor

What should the default DirectedRelationship be? OUTGOING? or BOTH? Or should I define matching keys subject_closure_symmetric, object_closure_symmetric for adding closure relationships with both directions?

@cmungall
Copy link
Contributor Author

OUTGOING. No use case for BOTH/INCOMING

@benwbooth
Copy link
Contributor

@cmungall Do you have that test case you mentioned? If not I can try and write a test case for this.

cmungall added a commit that referenced this issue Jun 1, 2017
benwbooth added a commit that referenced this issue Jun 1, 2017
@benwbooth
Copy link
Contributor

@cmungall How can I use the .ttl file to test this out? From what I've been able to figure out, golr-loader takes a neo4j graph configuration and a directory of queries and produces a directory of .json files to be loaded by solr. Is there a way to create a neo4j graph database and configuration file from the .ttl file?

@kshefchek
Copy link
Contributor

@benwbooth I can create a small test file for bgee.ttl, which contains the gene-anatomy data, some test files are automatically generated during the pipeline: https://data.monarchinitiative.org/ttl/

Over the next week or so I was planning on updating the golr loader to batch insert documents into solr, instead of the intermediate json step, and also fix #30 (which I think may be more a neo4j/scigraph issue)

@cmungall
Copy link
Contributor Author

cmungall commented Jun 1, 2017

Use @kshefchek's rather than mine.

The docs for loading a ttl file into scigraph are here: https://github.com/SciGraph/SciGraph

However for an automated test you want to do this programmatically directly within the junit test.

@kshefchek
Copy link
Contributor

@kshefchek
Copy link
Contributor

Will this allow us to implement #26 ?

If equivalence is implicit, what would configuring these closures look like? I assume we need some sort of way to say that a field is a closure.

@cmungall
Copy link
Contributor Author

cmungall commented Jun 3, 2017

@kshefchek yes it would and good point. I guess relying on conventions in the string not so good

@cmungall
Copy link
Contributor Author

cmungall commented Jun 7, 2017

Use @kshefchek's example data file, but you will also need to load in uberon

so the yaml config will have:

 - bgee_test.ttl
 - http://purl.obolibrary.org/obo/uberon.owl

For the prefixes, just use the prefixes in bgee_test.ttl, but you will also need

  BFO: http://purl.obolibrary.org/obo/BFO_

@benwbooth
Copy link
Contributor

Hi @cmungall,

I loaded hippocampus.ttl using SciGraph. I do see a single relationship with type "RO_0002206", but I don't see any nodes with label "gene". I also tried bgee_test.ttl and didn't see any nodes with the "gene" label either. Does the query need to be modified?

@cmungall
Copy link
Contributor Author

cmungall commented Jun 13, 2017 via email

@benwbooth
Copy link
Contributor

I wrote a pull request for this (see #34), please review and let me know what you think.

kshefchek added a commit that referenced this issue Jun 23, 2017
…ueries

[#17] Configure paths for anatomy queries
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

Successfully merging a pull request may close this issue.

3 participants