|
| 1 | +Command Line Usage |
| 2 | +------------------ |
| 3 | + |
| 4 | +Annotating Enums |
| 5 | +~~~~~~~~~~~~~~~~ |
| 6 | + |
| 7 | +This toolkit allows automated annotation of LinkML enums, mapping text |
| 8 | +strings to ontology terms. |
| 9 | + |
| 10 | +The command line tool ``annotate-enums`` takes a LinkML schema, with |
| 11 | +enums and fills in the ``meaning`` slots. |
| 12 | + |
| 13 | +See the `annotators <schema_automator/annotators/>`__ folder for docs |
| 14 | + |
| 15 | +Converting TSVs |
| 16 | +~~~~~~~~~~~~~~~ |
| 17 | + |
| 18 | +The ``tsv2linkml`` command infers a single-class schema from a TSV |
| 19 | +datafile |
| 20 | + |
| 21 | +.. code:: bash |
| 22 | +
|
| 23 | + tsv2linkml --help |
| 24 | + Usage: tsv2linkml [OPTIONS] TSVFILE |
| 25 | +
|
| 26 | + Infer a model from a TSV |
| 27 | +
|
| 28 | + Options: |
| 29 | + -o, --output TEXT Output file |
| 30 | + -c, --class_name TEXT Core class name in schema |
| 31 | + -n, --schema_name TEXT Schema name |
| 32 | + -s, --sep TEXT separator |
| 33 | + -E, --enum-columns TEXT column that is forced to be an enum |
| 34 | + --robot / --no-robot set if the TSV is a ROBOT template |
| 35 | + --help Show this message and exit. |
| 36 | +
|
| 37 | +Example: |
| 38 | +
|
| 39 | +.. code:: bash |
| 40 | +
|
| 41 | + tsv2linkml tests/resources/biobank-specimens.tsv |
| 42 | +
|
| 43 | +The ``tsvs2linkml`` command infers a multi-class schema from multiple |
| 44 | +TSV datafiles |
| 45 | +
|
| 46 | +.. code:: bash |
| 47 | +
|
| 48 | + tsvs2linkml --help |
| 49 | + Usage: tsvs2linkml [OPTIONS] [TSVFILES]... |
| 50 | +
|
| 51 | + Infer a model from multiple TSVs |
| 52 | +
|
| 53 | + Options: |
| 54 | + -o, --output TEXT Output file |
| 55 | + -n, --schema_name TEXT Schema name |
| 56 | + -s, --sep TEXT separator |
| 57 | + -E, --enum-columns TEXT column(s) that is forced to be an enum |
| 58 | + --enum-mask-columns TEXT column(s) that are excluded from being enums |
| 59 | + --max-enum-size INTEGER do not create an enum if more than max distinct |
| 60 | + members |
| 61 | +
|
| 62 | + --enum-threshold FLOAT if the number of distinct values / rows is less |
| 63 | + than this, do not make an enum |
| 64 | +
|
| 65 | + --robot / --no-robot set if the TSV is a ROBOT template |
| 66 | + --help Show this message and exit. |
| 67 | +
|
| 68 | +Converting OWL |
| 69 | +~~~~~~~~~~~~~~ |
| 70 | +
|
| 71 | +.. code:: bash |
| 72 | +
|
| 73 | + owl2linkml --help |
| 74 | + Usage: owl2linkml [OPTIONS] OWLFILE |
| 75 | +
|
| 76 | + Infer a model from OWL Ontology |
| 77 | +
|
| 78 | + Note: input must be in functional syntax |
| 79 | +
|
| 80 | + Options: |
| 81 | + -n, --name TEXT Schema name |
| 82 | + --help Show this message and exit. |
| 83 | +
|
| 84 | +Example: |
| 85 | +
|
| 86 | +.. code:: bash |
| 87 | +
|
| 88 | + owl2linkml -n prov tests/resources/prov.ofn > prov.yaml |
| 89 | +
|
| 90 | +Note this works best on schema-style ontologies such as Prov |
| 91 | +
|
| 92 | +**NOT** recommended for terminological-style ontologies such as OBO |
| 93 | +
|
| 94 | +Converting RDF instance graphs |
| 95 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 96 | +
|
| 97 | +.. code:: bash |
| 98 | +
|
| 99 | + rdf2linkml --help |
| 100 | + Usage: rdf2linkml [OPTIONS] RDFFILE |
| 101 | +
|
| 102 | + Infer a model from RDF instance data |
| 103 | +
|
| 104 | + Options: |
| 105 | + -d, --dir TEXT [required] |
| 106 | + --help Show this message and exit. |
| 107 | +
|
| 108 | +Converting JSON Instance Data |
| 109 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 110 | +
|
| 111 | +.. code:: bash |
| 112 | +
|
| 113 | + jsondata2linkml --help |
| 114 | + Usage: jsondata2linkml [OPTIONS] INPUT |
| 115 | +
|
| 116 | + Infer a model from JSON instance data |
| 117 | +
|
| 118 | +
|
| 119 | +
|
| 120 | + Options: |
| 121 | + --container-class-name TEXT name of root class |
| 122 | + -f, --format TEXT json or yaml (or json.gz or yaml.gz) |
| 123 | + --omit-null / --no-omit-null if true, ignore null values |
| 124 | + --help Show this message and exit. |
| 125 | +
|
| 126 | +Converting JSON-Schema |
| 127 | +~~~~~~~~~~~~~~~~~~~~~~ |
| 128 | +
|
| 129 | +.. code:: bash |
| 130 | +
|
| 131 | + jsonschema2linkml --help |
| 132 | + Usage: jsonschema2linkml [OPTIONS] INPUT |
| 133 | +
|
| 134 | + Infer a model from JSON Schema |
| 135 | +
|
| 136 | + Options: |
| 137 | + -n, --name TEXT ID of schema [required] |
| 138 | + -f, --format TEXT JSON Schema format - yaml or json |
| 139 | + -o, --output TEXT output path |
| 140 | + --help Show this message and exit. |
| 141 | +
|
| 142 | +jsonschema2linkml example |
| 143 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 144 | +
|
| 145 | +.. code:: bash |
| 146 | +
|
| 147 | + poetry run jsonschema2linkml -n test-model -f yaml -o vrs-linkml.yaml cp tests/resources/jsonschema/vrs.schema.json |
0 commit comments