Convert OMOP vocab into OWL and SemanticSQL.
Project description
OMOP2OWL-vocab
Convert OMOP vocab into OWL and SemanticSQL.
Prerequisites
- Python 3.9+
- Docker
robot
Installation
- Set up a virtual environment and activate it.
- Run:
make install
Running
Run: python -m omop2owl_vocab OPTIONS
CLI
python -m omop2owl_vocab --help
usage: Convert OMOP vocabularies to OWL and SemanticSQL. [-h] -c CONCEPT_CSV_PATH -r CONCEPT_RELATIONSHIP_CSV_PATH [-O OUTDIR] [-I ONTOLOGY_ID]
[-o {merged,split,merged-post-split,rxnorm}] [-v VOCABS [VOCABS ...]]
[-R RELATIONSHIPS [RELATIONSHIPS ...]] [-S] [-e] [-s] [-C] [-M MEMORY]
options:
-h, --help show this help message and exit
-c CONCEPT_CSV_PATH, --concept-csv-path CONCEPT_CSV_PATH
Path to CSV of OMOP concept table.
-r CONCEPT_RELATIONSHIP_CSV_PATH, --concept-relationship-csv-path CONCEPT_RELATIONSHIP_CSV_PATH
Path to CSV of OMOP concept_relationship table.
-O OUTDIR, --outdir OUTDIR
Output directory.
-I ONTOLOGY_ID, --ontology-id ONTOLOGY_ID
Identifier for ontology. Used to generate a pURL and file name.
-o {merged,split,merged-post-split,rxnorm}, --output-type {merged,split,merged-post-split,rxnorm}
What output to generate? If "merged" will create an ONTOLOGY_ID.db file with all concepts of all vocabs merged into one. If "split" will
create an ONTOLOGY_ID-*.db file for each vocab. "merged-post-split" output will be as if running both "split" and "merged", but the
merging implementation is different. Use this option if running out of memory. If using "rxnorm", will create a specifically customized
ONTOLOGY_ID-RxNorm.db.
-v VOCABS [VOCABS ...], --vocabs VOCABS [VOCABS ...]
Used with `--output-type specific-vocabs-merged`. Which vocabularies to include in the output? Usage: --vocabs "Procedure Type" "Device
Type"
-R RELATIONSHIPS [RELATIONSHIPS ...], --relationships RELATIONSHIPS [RELATIONSHIPS ...]
Which relationship types from the concept_relationship table's relationship_id field to include? Default is "Subsumes" only. Passing
"ALL" includes everything. Ignored for --output-type options that are specific to a pre-set vocabulary (e.g. rxnorm). Usage:
--realationships "Subsumes" "Maps to"
-S, --skip-semsql In addition to .owl, also convert to a SemanticSQL .db? This is always True except when --output-type is all-merged-post-split and it is
creating initial .owl files to be merged.
-e, --exclude-singletons
Exclude terms that do not have any relationships. This only applies to --method robot.
-s, --semsql-only Use this if the .owl already exists and you just want to create a SemanticSQL .db.
-C, --use-cache Of outputs or intermediates already exist, use them.
-M MEMORY, --memory MEMORY
The amount of Java memory (GB) to allocate.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
omop2owl-vocab-1.0.0.tar.gz
(14.7 kB
view hashes)
Built Distribution
Close
Hashes for omop2owl_vocab-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18b34027cef313480d9f3983486276f42bc0321a2ae070d0b6f3a33b4646824d |
|
MD5 | e95a6e2bb318538a30d4f0db858d0930 |
|
BLAKE2b-256 | bd955898fdb5397b77b9de07ff70aae30e800c7c58009730da3dded9387c2780 |