Derived models#

Asserted vs Derived Models/Schemas#

LinkML distinguishes between the asserted data model and the derived data model

For example, if a class inherits a slot from a parent class, the schema author does not need to redundantly assert this, as this can be inferred.

Examples of things that can be derived:

  • new slot definitions by composing:

    • slot_usage

    • information from parent/ancestor slots

    • information from parent/ancestor classes

  • deriving patterns from structured patterns

Materializing a derived model#

Use gen-linkml to create a derived schema saved as YAML

This can be useful for feeding to basic tools that do not need to implement logic for inheritance

Programmatically inferring models#

Specification#

  • Part 4 of LinkML specification