owlcollab / owltools

OWLTools
BSD 3-Clause "New" or "Revised" License
106 stars 32 forks source link

Handling of obo namespaces in golr loads #118

Open cmungall opened 9 years ago

cmungall commented 9 years ago

Ontologies are not well behaved in populating the obo format 'namespace' tag with meaningful, concise values (important note: obo namespaces != owl/xml namespace. See obo specs).

We should ditch the namespace field in favor of a more useful category field. This would cause a bit of churn. We can instead overload the namespace field and overwrite it with useful info.

Mapping from ID space (CL, GO, etc) to value:

last step: s/[\-_]/ /g; (for amigo facet purposes)

hdietze commented 9 years ago

The flex loader can now be configured to use the new method categorizeNamespace() to create a human readable category string. An example configuration could be:

  - id: source_category
    description: "Term category."
    display_name: Category
    type: string
    property: [categorizeNamespace]
    property_config:
       use-namespace: ["GO"]
       idspace-map:
          MA: "mouse anatomy"
          CL: "cell"
          UBERON: "animal anatomy"
          EMAP: "embryonic mouse"
          CHEBI: "chemical"

Potential trick to remove unwanted categories (i.e. ncbi taxonomy), use the option: use-fallback: false to skip the fallback mechanism

@cmungall and @kltm decide, if this method should replace the currentsource category or should be a new field. The later one would require some Amigo widget changes.