Command Line Interface
sssom_pydantic automatically installs the command sssom_pydantic. See
sssom_pydantic --help for usage details.
sssom_pydantic
CLI for sssom_pydantic.
Usage
sssom_pydantic [OPTIONS] COMMAND [ARGS]...
bridge
Write OWL bridge axioms in Functional OWL (OFN).
Usage
sssom_pydantic bridge [OPTIONS]
Options
- -i, --input <input>
Path to a local file or URL to a remote file. If not given, will get input from STDIN
- -o, --output <output>
Path to a local file to output. If not given, will write to STDOUT
- --cutoff <cutoff>
Minimum confidence cutoff. Mappings w/o confidence are assumed to have 1.0 confidence
- -a, --mapping-annotations
If set, propagates annotations from mappings into bridge
- -d, --declarations
If set, adds declarations (and labels, when available)
format
Lint a SSSOM TSV file.
Usage
sssom_pydantic format [OPTIONS] PATH
Options
- --standardize
Standardize against Bioregistry preferred CURIE prefixes and (RDF) URI prefixes
- --relabel
Re-label all subjects and objects using PyOBO
- --drop-duplicates
Arguments
- PATH
Required argument
merge
Merge SSSOM documents.
Usage
sssom_pydantic merge [OPTIONS]
Options
- -i, --input <input>
Path to a local file or URL to a remote file. If not given, will get input from STDIN
- -o, --output <output>
Path to a local file to output. If not given, will write to STDOUT
- --mapping-set-id <mapping_set_id>
The ID for the merged mapping set
- --merge-manual
- --standardize
Standardize against Bioregistry preferred CURIE prefixes and (RDF) URI prefixes
subset
Implement the filter workflow for a given prefix.
This workflow removes negative mappings, unsure mappings, and non-exact mappings.
Usage
sssom_pydantic subset [OPTIONS]
Options
- -p, --prefix <prefix>
Required The prefix that becomes the subjects of all mappings. If used in combination with –standardize, will get automatically standardized.
- --target-prefix <target_prefix>
The prefix that becomes the object of all mappings. If used in combination with –standardize, will get automatically standardized.
- -i, --input <input>
Path to a local file or URL to a remote file. If not given, will get input from STDIN
- -o, --output <output>
Path to a local file to output. If not given, will write to STDOUT
- --justification-policy
When inverting mappings, should the justification be derived to semapv:MappingInversion and reference be made back to the original mapping, or should the original jusitication be retained?
- Options:
retain | derive
- --standardize
Standardize against Bioregistry preferred CURIE prefixes and (RDF) URI prefixes
web
Run the web app (with SQL backend).
Usage
sssom_pydantic web [OPTIONS]
Options
- --add-examples
Add example SSSOM records.
- --tab
- --host <host>
- Default:
'0.0.0.0'
- --port <port>
- Default:
8876
Here’s an end-to-end workflow for merging several SSSOM documents together, filtering to an appropriate subset, and generating an OWL bridge.
$ sssom_pydantic subset \
--input https://w3id.org/biopragmatics/biomappings/sssom/biomappings.sssom.tsv \
--prefix CHMO \
--target-prefix FIX \
--standardize \
--output biomappings-chmo-fix.sssom.tsv
$ sssom_pydantic subset \
--input https://github.com/nfdi-de/section-metadata-wg-onto/raw/refs/heads/main/sssom/data/positive.sssom.tsv \
--prefix CHMO \
--target-prefix FIX \
--standardize \
--output nfdi-chmo-fix.sssom.tsv
$ sssom_pydantic merge \
--input https://github.com/NFDI4Chem/rsc-cmo/raw/0e53ad96495576890c217ebdddac7fadc2e9e0b1/src/mappings/fix-mappings.sssom.tsv \
--input nfdi-chmo-fix.sssom.tsv \
--input biomappings-chmo-fix.sssom.tsv \
--standardize \
--merge-manual \
--mapping-set-id https://example.org/chmo-fix.sssom.tsv \
| sssom_pydantic bridge \
--output chmo-fix-bridge.ofn