CLI Reference
Tablassert provides a single command-line interface for building knowledge graphs from declarative configurations.
Command
tablassert-cli -i <graph-config.yaml>
Options
-i, --ingest PATH (required)
Path to the graph configuration file (YAML format).
Example:
tablassert-cli -i /path/to/MOKGV6.yaml
The graph configuration specifies: - Output knowledge graph name and version - Paths to table configurations - Database locations (dbssert, pubmed_db, pmc_db)
See Graph Configuration for details.
--help
Display help message and exit.
tablassert-cli --help
Output Files
Tablassert generates two NDJSON files:
{name}_{version}.nodes.ndjson- Node file (entities){name}_{version}.edges.ndjson- Edge file (relationships)
Where {name} and {version} come from the graph configuration.
Example:
# graph-config.yaml
name: MULTIOMICS_KG
version: UNSTABLE
Produces:
- MULTIOMICS_KG_UNSTABLE.nodes.ndjson
- MULTIOMICS_KG_UNSTABLE.edges.ndjson
Output Format
Files are KGX-compliant NDJSON (newline-delimited JSON):
Nodes:
{"id": "HGNC:1234", "name": "GENE1", "category": ["biolink:Gene"], "taxon": "NCBITaxon:9606"}
{"id": "MONDO:0005148", "name": "diabetes mellitus", "category": ["biolink:Disease"]}
Edges:
{"id": "uuid:...", "subject": "HGNC:1234", "predicate": "biolink:associated_with", "object": "MONDO:0005148"}
Environment Variables
When using Nix, these are configured automatically:
CHROMIUM_PATH- Chromium for file downloadsAWK_PATH- GNU AWK for NDJSON processingJQ_PATH- JQ for JSON cleanup
Examples
Basic Usage
tablassert-cli -i my-graph.yaml
With Absolute Path
tablassert-cli -i /home/user/configs/graph.yaml
Using Nix Run (No Installation)
nix run github:SkyeAv/Tablassert#default -- -i ./graph.yaml
Workflow
- Create graph configuration - Define output name, table configs, databases
- Create table configurations - Define data sources and transformations
- Run CLI -
tablassert-cli -i graph.yaml - Process executes:
- Downloads files from URLs (if needed)
- Applies transformations to each table
- Resolves entities using dbssert
- Validates mappings with QC pipeline
- Aggregates subgraphs into NDJSON
Next Steps
- Tutorial - Complete example walkthrough
- Configuration Guide - YAML configuration reference