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 downloads
  • AWK_PATH - GNU AWK for NDJSON processing
  • JQ_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

  1. Create graph configuration - Define output name, table configs, databases
  2. Create table configurations - Define data sources and transformations
  3. Run CLI - tablassert-cli -i graph.yaml
  4. Process executes:
  5. Downloads files from URLs (if needed)
  6. Applies transformations to each table
  7. Resolves entities using dbssert
  8. Validates mappings with QC pipeline
  9. Aggregates subgraphs into NDJSON

Next Steps