flaxsearch / BioSolr

A project aiming "to significantly advance the state of the art with regard to indexing and querying biomedical data with freely available open source software"
Apache License 2.0
77 stars 26 forks source link

Example using OWL ontology? #7

Open theyaa opened 7 years ago

theyaa commented 7 years ago

Hi, Do you have an example/demo using OWL ontology please? what would be the value of the efo_uri field in the documents to be indexed? @mattflax @tburdett @tomjon Thanks

mattflax commented 7 years ago

Hi,

The spot-ontology directory has an example set-up using an OWL ontology. See the solrconfig.xml in https://github.com/flaxsearch/BioSolr/blob/master/spot/spot-ontology/solr-conf/documents/conf/solrconfig.xml, line 586, to see how it is configured. The properties file referred to in the config can be found at https://github.com/flaxsearch/BioSolr/blob/master/spot/spot-ontology/solr-conf/documents/conf/ontology/efo.properties

Unfortunately there is no demo for that part of the project (the data source is an internal database), but you should be able to modify the swat4ls_demo material to work using an OWL ontology instead of calling OLS.

The efo_uri field in the example data contains the annotation IRI - eg. http://www.ebi.ac.uk/efo/EFO_0000180 is equivalent to the document being annotated with the EFO entry for "HIV-1 Infection". (The field is named that because the data I was working with was annotated against the EFO ontology.)

Hope that helps!

theyaa commented 7 years ago

Thank you for the quick reply. What I am trying to get to is, what if I use a local OWL file, how do I define the value for the efo_uri?

Is there also a way for the plugin to use a text field in the document, parse its content, and then assign the right ontology to it?

For example, I have a text field with content " This is a document related to lung cancer". Then the plugin would annotate the document with [lung, lung cancer, cancer], according to the OWL ontology I provided it with. @mattflax @tburdett @tomjon

Thanks