KGX CLI¶
kgx¶
Knowledge Graph Exchange CLI entrypoint.
kgx [OPTIONS] COMMAND [ARGS]...
Options
- --version¶
Show the version and exit.
graph-summary¶
Loads and summarizes a knowledge graph from a set of input files.
kgx graph-summary [OPTIONS] INPUTS...
Options
- -i, --input-format <input_format>¶
Required The input format. Can be one of (‘tsv’, ‘csv’, ‘graph’, ‘json’, ‘jsonl’, ‘obojson’, ‘obo-json’, ‘trapi-json’, ‘neo4j’, ‘nt’, ‘owl’, ‘sssom’)
- -c, --input-compression <input_compression>¶
The input compression type
- -o, --output <output>¶
Required
- -r, --report-type <report_type>¶
The summary report type. Must be one of (‘kgx-map’, ‘knowledge-map’)
- -s, --stream¶
Parse input as a stream
- --node-facet-properties <node_facet_properties>¶
A list of node properties from which to generate counts per value for those properties
- --edge-facet-properties <edge_facet_properties>¶
A list of edge properties from which to generate counts per value for those properties
Arguments
- INPUTS¶
Required argument(s)
merge¶
Load nodes and edges from files and KGs, as defined in a config YAML, and merge them into a single graph. The merged graph can then be written to a local/remote Neo4j instance OR be serialized into a file.
kgx merge [OPTIONS]
Options
- --merge-config <merge_config>¶
Required
- --source <source>¶
Source(s) from the YAML to process
- --destination <destination>¶
Destination(s) from the YAML to process
- -p, --processes <processes>¶
Number of processes to use
neo4j-download¶
Download nodes and edges from Neo4j database.
kgx neo4j-download [OPTIONS]
Options
- -l, --uri <uri>¶
Required Neo4j URI to download from. For example, https://localhost:7474
- -u, --username <username>¶
Required Neo4j username
- -p, --password <password>¶
Required Neo4j password
- -o, --output <output>¶
Required Output
- -f, --output-format <output_format>¶
Required The output format. Can be one of (‘tsv’, ‘csv’, ‘graph’, ‘json’, ‘jsonl’, ‘obojson’, ‘obo-json’, ‘trapi-json’, ‘neo4j’, ‘nt’, ‘owl’, ‘sssom’)
- -d, --output-compression <output_compression>¶
The output compression type
- -s, --stream¶
Parse input as a stream
- -n, --node-filters <node_filters>¶
Filters for filtering nodes from the input graph
- -e, --edge-filters <edge_filters>¶
Filters for filtering edges from the input graph
neo4j-upload¶
Upload a set of nodes/edges to a Neo4j database.
kgx neo4j-upload [OPTIONS] INPUTS...
Options
- -i, --input-format <input_format>¶
Required The input format. Can be one of (‘tsv’, ‘csv’, ‘graph’, ‘json’, ‘jsonl’, ‘obojson’, ‘obo-json’, ‘trapi-json’, ‘neo4j’, ‘nt’, ‘owl’, ‘sssom’)
- -c, --input-compression <input_compression>¶
The input compression type
- -l, --uri <uri>¶
Required Neo4j URI to upload to. For example, https://localhost:7474
- -u, --username <username>¶
Required Neo4j username
- -p, --password <password>¶
Required Neo4j password
- -s, --stream¶
Parse input as a stream
- -n, --node-filters <node_filters>¶
Filters for filtering nodes from the input graph
- -e, --edge-filters <edge_filters>¶
Filters for filtering edges from the input graph
Arguments
- INPUTS¶
Required argument(s)
transform¶
Transform a Knowledge Graph from one serialization form to another.
kgx transform [OPTIONS] [INPUTS]...
Options
- -i, --input-format <input_format>¶
The input format. Can be one of (‘tsv’, ‘csv’, ‘graph’, ‘json’, ‘jsonl’, ‘obojson’, ‘obo-json’, ‘trapi-json’, ‘neo4j’, ‘nt’, ‘owl’, ‘sssom’)
- -c, --input-compression <input_compression>¶
The input compression type
- -o, --output <output>¶
Output
- -f, --output-format <output_format>¶
The output format. Can be one of (‘tsv’, ‘csv’, ‘graph’, ‘json’, ‘jsonl’, ‘obojson’, ‘obo-json’, ‘trapi-json’, ‘neo4j’, ‘nt’, ‘owl’, ‘sssom’)
- -d, --output-compression <output_compression>¶
The output compression type
- --stream¶
Parse input as a stream
- -n, --node-filters <node_filters>¶
Filters for filtering nodes from the input graph
- -e, --edge-filters <edge_filters>¶
Filters for filtering edges from the input graph
- --transform-config <transform_config>¶
Transform config YAML
- --source <source>¶
Source(s) from the YAML to process
- -p, --processes <processes>¶
Number of processes to use
Arguments
- INPUTS¶
Optional argument(s)
validate¶
Run KGX validator on an input file to check for Biolink Model compliance.
kgx validate [OPTIONS] INPUTS...
Options
- -i, --input-format <input_format>¶
Required The input format. Can be one of (‘tsv’, ‘csv’, ‘graph’, ‘json’, ‘jsonl’, ‘obojson’, ‘obo-json’, ‘trapi-json’, ‘neo4j’, ‘nt’, ‘owl’, ‘sssom’)
- -c, --input-compression <input_compression>¶
The input compression type
- -o, --output <output>¶
File to write validation reports to
- -s, --stream¶
Parse input as a stream
Arguments
- INPUTS¶
Required argument(s)