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

Add intermediates option to extract #441

Merged
merged 3 commits into from
Mar 1, 2019

Conversation

beckyjackson
Copy link
Contributor

Replaces #436, from the docs:


Intermediates

When extracting (especially with MIREOT), sometimes the hierarchy can have too many intermediate classes, making it difficult to identify relevant relationships. For example, you may end up with this after extracting adrenal gland:

- material anatomical entity
  - anatomical structure
    - multicellular anatomical structure
      - organ
        - abdomen element
          - adrenal/interrenal gland
            - adrenal gland (*)
    - lateral structure
      - adrenal gland (*)

By specifying how to handle these intermediates, you can reduce unnecessary intermediate classes:

  • --intermediates all: default behavior, do not prune the ontology
  • --intermediates minimal: only include intermediate intermediates with more than one sibling (i.e. the parent class has another child)
  • --intermediates none: do not include any intermediates
    • For MIREOT, this will only include top and bottom level classes.
    • For any SLME method, this will only include the classes directly used in the logic of the input terms

Running this command to extract, inclusively, between 'material anatomical entity' and 'adrenal gland':

robot extract --method MIREOT \
    --input uberon_fragment.owl \
    --upper-term UBERON:0000465 \
    --lower-term UBERON:0002369 \
    --intermediates minimal \
    --output results/uberon_minimal.owl

Would result in the following structure:

- material anatomical entity
  - anatomical structure
    - adrenal gland (*)
    - organ
      - adrenal gland (*)

You can chain this output into reduce to further clean up the structure, as some redundant axioms may appear.

Running the same command, but with --intermediates none:

robot extract --method MIREOT \
    --input uberon_fragment.owl \
    --upper-term UBERON:0000465 \
    --lower-term UBERON:0002369 \
    --intermediates none \
    --output results/uberon_none.owl

Would result in:

- material anatomical entity
  - adrenal gland

Any term specified as an input term will not be pruned.

@jamesaoverton jamesaoverton merged commit 5b7771d into ontodev:master Mar 1, 2019
@beckyjackson beckyjackson deleted the new-intermediates branch May 2, 2019 13:57
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 this pull request may close these issues.

2 participants