Skip to content

v0.1.58

Compare
Choose a tag to compare
@cmungall cmungall released this 05 Dec 22:54
· 220 commits to main since this release
8b14a67

Highlights

Value Set Toolkit

Fixes:

For full context, see:

This PR adds a new top level command (name is not yet final) called vskit:

vskit expand  --help
Usage: vskit expand [OPTIONS] [VALUE_SET_NAMES]...

  Expand a value set. EXPERIMENTAL.

  This will expand an *intensional value set* (aka *dynamic enum*), running a
  query against an ontology backend or backends to materialize the value set
  (permissible values).

  Currently the value set must be specified as LinkML, but in future this will
  be possible with other specifications such as FHIR ValueSet objects.

  Each expression in a dynamic enum has a *source ontology*, this is specified
  as a CURIE such as:

  - obo:mondo - bioregistry:wikidata

  These can be mapped to specific OAK selectors. By default, any obo prefix is
  mapped to the semsql implementation of that. You can use a configuration
  file to map to other backends, such as BioPortal or Wikidata. However, note
  that not all backends are capable of being able to render all value sets.

  Example:

      vskit expand -c config.yaml -s schema.yaml -o expanded.yaml
      my_value_set1 my_value_set2

Options:
  -c, --config PATH
  -s, --schema PATH
  -o, --output PATH
  --help             Show this message and exit.

This can be used to expand a value set.

E.g.

vskit expand -s tests/input/value_set_example.yaml -o z GoMembrane MembraneExcludingEukaryotes

will expand two value sets (enums) from a linkml spec

  GoMembrane:
    pv_formula: CURIE
    reachable_from:
      include_self: true
      source_ontology: obo:go
      source_nodes:
        - GO:0016020 ## membrane

  OnlyInEukaryotes:
    reachable_from:
      source_ontology: obo:go
      source_nodes:
        - NCBITaxon:2759 ## Eukaryota
      relationship_types:
        - rdfs:subClassOf
        - RO:0002162 ## in taxon
        - BFO:0000050 ## part of

  MembraneExcludingEukaryotes:
    inherits: GoMembrane
    minus:
      - inherits: OnlyInEukaryotes

it will materialize the permissible values by querying the relevant ontology

It uses rueaml.yaml when writing the output, so comments are preserved

What's Changed

New Contributors

Full Changelog: v0.1.57...v0.1.58