The ontoparse CLI
xrefs
Extract cross-references (xrefs) from ontologies. Currenly supports OBO format-version 1.2.
ontoparse xref <FILE> --to <PREFIX> [--from <PREFIX>] [--separator <SEP>]
-
Arguments
<FILE>: An ontology OBO file.
-
Required options
--to <PREFIX>: An anchor prefix to map from (e.g,MESH).
-
Optional arguments
--from <PREFIX>: An anchor prefix to map from (e.g.,UBERON). Must contain term entries in the file. Defaults to the most frequent prefix in the file.--separator <SEP>: Delimiter of the output table. Defaults to\t.
Examples
From the primary prefix (i.e., UBERON):
ontoparse xref uberon.obo --to MESH
Or you can specify:
ontoparse xref uberon.obo --to MESH --from UBERON
You can also map from other prefixes if they exist:
ontoparse xref uberon.obo --to MESH --from CL
Write the output to tsv:
ontoparse xref uberon.obo --to MESH > uberon_to_mesh.tsv
You may also change the separator:
ontoparse xref uberon.obo --to MESH --separator "," > uberon_to_mesh.csv