Skip to content

Instantly share code, notes, and snippets.

@capsulecorplab
Last active July 30, 2023 00:48
Show Gist options
  • Select an option

  • Save capsulecorplab/3e41c7d1fc4ab31b99109adcf93062b3 to your computer and use it in GitHub Desktop.

Select an option

Save capsulecorplab/3e41c7d1fc4ab31b99109adcf93062b3 to your computer and use it in GitHub Desktop.

Revisions

  1. capsulecorplab revised this gist Jul 30, 2023. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions validate.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    #!/usr/bin/sh

    linkml-validate -s schema.yaml --target-class Organism data.yaml
  2. capsulecorplab revised this gist Jul 30, 2023. 1 changed file with 15 additions and 10 deletions.
    25 changes: 15 additions & 10 deletions schema.yaml
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,18 @@ default_range: string

    classes:
    Organism:
    attributes:
    id:
    identifier: true
    name:
    range: string
    has_subtypes:
    range: Organism
    multivalued: true
    inlined: true
    inlined_as_list: false
    slots:
    - id
    - name
    - has_subtypes

    slots:
    id:
    identifier: true
    name:
    range: string
    has_subtypes:
    range: Organism
    multivalued: true
    inlined: true
    inlined_as_list: false
  3. capsulecorplab created this gist Jul 30, 2023.
    10 changes: 10 additions & 0 deletions data.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    id: NCBITaxon:40674
    name: mammals
    has_subtypes:
    NCBITaxon:9443:
    name: primates
    has_subtypes:
    NCBITaxon:9606:
    name: humans
    NCBITaxon:9682:
    name: cats
    21 changes: 21 additions & 0 deletions schema.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # https://linkml.io/linkml/schemas/inlining.html#inlining-as-a-dictionary
    id: https://w3id.org/linkml/examples/
    name: organisms
    prefixes:
    linkml: https://w3id.org/linkml/
    imports:
    - linkml:types
    default_range: string

    classes:
    Organism:
    attributes:
    id:
    identifier: true
    name:
    range: string
    has_subtypes:
    range: Organism
    multivalued: true
    inlined: true
    inlined_as_list: false