@@ -18,148 +18,4 @@ These can be composed together. For example, run `tsvs2linkml` followed by `anno
1818The toolkit is still experimental. It is intended as an aid to schema creation rather than act as a formal conversion
1919tool
2020
21- ## Installation
22-
23- ` schema-automator ` and its components require Python 3.9 or greater.
24-
25- ``` bash
26- chmod 755 environment.sh
27- . environment.sh
28- pip install -r requirements.txt
29- pip install -e .
30- ```
31-
32- ## Command Line Usage
33-
34- ### Annotating Enums
35-
36- This toolkit allows automated annotation of LinkML enums, mapping text strings to ontology terms.
37-
38- The command line tool ` annotate-enums ` takes a LinkML schema, with enums and fills in the ` meaning ` slots.
39-
40- See the [ annotators] ( schema_automator/annotators/ ) folder for docs
41-
42- ### Converting TSVs
43-
44- The ` tsv2linkml ` command infers a single-class schema from a TSV datafile
45-
46- ``` bash
47- tsv2linkml --help
48- Usage: tsv2linkml [OPTIONS] TSVFILE
49-
50- Infer a model from a TSV
51-
52- Options:
53- -o, --output TEXT Output file
54- -c, --class_name TEXT Core class name in schema
55- -n, --schema_name TEXT Schema name
56- -s, --sep TEXT separator
57- -E, --enum-columns TEXT column that is forced to be an enum
58- --robot / --no-robot set if the TSV is a ROBOT template
59- --help Show this message and exit.
60- ` ` `
61-
62- Example:
63-
64- ` ` ` bash
65- tsv2linkml tests/resources/biobank-specimens.tsv
66- ` ` `
67-
68- The ` tsvs2linkml` command infers a multi-class schema from multiple TSV datafiles
69-
70- ` ` ` bash
71- tsvs2linkml --help
72- Usage: tsvs2linkml [OPTIONS] [TSVFILES]...
73-
74- Infer a model from multiple TSVs
75-
76- Options:
77- -o, --output TEXT Output file
78- -n, --schema_name TEXT Schema name
79- -s, --sep TEXT separator
80- -E, --enum-columns TEXT column(s) that is forced to be an enum
81- --enum-mask-columns TEXT column(s) that are excluded from being enums
82- --max-enum-size INTEGER do not create an enum if more than max distinct
83- members
84-
85- --enum-threshold FLOAT if the number of distinct values / rows is less
86- than this, do not make an enum
87-
88- --robot / --no-robot set if the TSV is a ROBOT template
89- --help Show this message and exit.
90- ` ` `
91-
92- # ## Converting OWL
93-
94- ` ` ` bash
95- owl2linkml --help
96- Usage: owl2linkml [OPTIONS] OWLFILE
97-
98- Infer a model from OWL Ontology
99-
100- Note: input must be in functional syntax
101-
102- Options:
103- -n, --name TEXT Schema name
104- --help Show this message and exit.
105- ` ` `
106-
107- Example:
108-
109- ` ` ` bash
110- owl2linkml -n prov tests/resources/prov.ofn > prov.yaml
111- ` ` `
112-
113- Note this works best on schema-style ontologies such as Prov
114-
115- ** NOT** recommended for terminological-style ontologies such as OBO
116-
117- # ## Converting RDF instance graphs
118-
119- ` ` ` bash
120- rdf2linkml --help
121- Usage: rdf2linkml [OPTIONS] RDFFILE
122-
123- Infer a model from RDF instance data
124-
125- Options:
126- -d, --dir TEXT [required]
127- --help Show this message and exit.
128- ` ` `
129-
130- # ## Converting JSON Instance Data
131-
132- ` ` ` bash
133- jsondata2linkml --help
134- Usage: jsondata2linkml [OPTIONS] INPUT
135-
136- Infer a model from JSON instance data
137-
138-
139-
140- Options:
141- --container-class-name TEXT name of root class
142- -f, --format TEXT json or yaml (or json.gz or yaml.gz)
143- --omit-null / --no-omit-null if true, ignore null values
144- --help Show this message and exit.
145- ` ` `
146-
147- # ## Converting JSON-Schema
148-
149- ` ` ` bash
150- jsonschema2linkml --help
151- Usage: jsonschema2linkml [OPTIONS] INPUT
152-
153- Infer a model from JSON Schema
154-
155- Options:
156- -n, --name TEXT ID of schema [required]
157- -f, --format TEXT JSON Schema format - yaml or json
158- -o, --output TEXT output path
159- --help Show this message and exit.
160- ` ` `
161-
162- # ## jsonschema2linkml example
163- ` ` ` bash
164- poetry run jsonschema2linkml -n test-model -f yaml -o vrs-linkml.yaml cp tests/resources/jsonschema/vrs.schema.json
165- ` ` `
21+ [ Full Documentation] ( https://linkml.io/schema-automator/ )
0 commit comments