Skip to main content

Tablassert

PyPI version CI Docs License

Extract knowledge assertions from tabular data into NCATS Translator-compliant KGX NDJSON, declaratively, with entity resolution built in and optional quality control.

Tablassert turns biomedical spreadsheets (Excel, CSV, TSV) into knowledge graphs ready for NCATS Translator. Declare how your columns map to subject-predicate-object statements in YAML; Tablassert resolves free text to standard CURIEs, attaches provenance and statistical annotations, and emits KGX-compliant nodes and edges.

Full Documentation: installation guides, tutorial, configuration reference, and API docs.

Quick Start

pip install "tablassert[cli]"

Given a CSV of gene-disease associations with p-values and sample sizes, declare the mapping in a table config (table.yaml):

template:
  source:
    kind: text
    local: ./gene-disease.csv
    url: [https://example.com/data.csv]
    row_slice: [1, auto]
    delimiter: ","
  statement:
    subject: { method: column, encoding: A, prioritize: [Gene] }
    predicate: associated_with
    object: { method: column, encoding: B, prioritize: [Disease] }
  provenance: { repo: PMID, publication: "12345678" }
  annotations:
    - { annotation: p_value, method: column, encoding: C }
    - { annotation: study_size, method: column, encoding: D }

Wrap it in a graph config (graph.yaml) pointing at your fullmap entity-resolution database and carrying the required rig: metadata for the generated Resource Ingest Guide:

name: MY_KG
version: 1.0.0
tables:
  - ./table.yaml
fullmap: /path/to/fullmap
rig:
  source_info:
    infores_id: infores:my-kg
    terms_of_use_info:
      terms_of_use_url: https://example.org/terms
    data_access_locations:
      - My source downloads - https://example.org/downloads
    source_status: maintained_regular_updates
  ingest_info:
    utility: Gene-disease associations support Translator disease-mechanism queries.
    scope: Gene-disease associations extracted from tabular sources.
  provenance_info:
    contributions:
      - "Author Name - code author, data modeling"
  artifact_base_url: https://example.org/my-kg
  artifact_base_path: ./published/my-kg

Build the knowledge graph:

tablassert build-kg graph.yaml

Output is one JSON object per line: nodes with Biolink categories, edges with annotations.

{"id":"HGNC:11998","name":"TP53","category":["biolink:Gene"],"taxon":"NCBITaxon:9606"}
{"id":"MONDO:0008903","name":"lung cancer","category":["biolink:Disease"]}
{"id":"2cfea591-0f8f-33af-a7df-03da531d3359","subject":"HGNC:11998","predicate":"biolink:associated_with","object":"MONDO:0008903","p_value":"1.0000e-03","statistical_significance_qualifier":"strongly_significant","has_supporting_studies":{"PMID:12345678":{"id":"PMID:12345678","name":"gene-disease.csv","study_size":450,"has_study_results":[{"id":"row:2"}]}},"publications":["PMID:12345678"]}

See the Tutorial for the full walkthrough.

Key Features

  • Declarative YAML configuration: define data transformations without writing code
  • Built-in entity resolution: map free text to genes, diseases, and chemicals with standard CURIEs, taxonomic filtering, and provenance, backed by an embedded redb database
  • Optional quality control: a four-stage audit (exact -> fuzzy -> abbreviation -> SapBERT embeddings) flags low-confidence mappings
  • KGX compliance: emits NCATS Translator-compatible node/edge NDJSON with Biolink categories and predicates
  • Autonomous agent: tablassert agent derives, builds, and refines configs for whole papers
  • Performance & reproducibility: lazy Polars pipelines and a deterministic UV-based development environment

Installation

pip install tablassert

Or with uv: uv tool install "tablassert[cli]". The base install provides the Python API; install [cli] to use the tablassert command and optional extras for additional runtime and pipeline capabilities:

Extra Adds Install
cli tablassert command and rich terminal progress pip install "tablassert[cli]"
rt CPU-compatible Polars runtime pip install "tablassert[rt]"
aria2 bundled aria2c downloader, used automatically by build-fullmap when installed (Linux/Windows wheels only) pip install "tablassert[aria2]"
qc four-stage QC audit (exact -> fuzzy -> abbreviation -> SapBERT embeddings) pip install "tablassert[qc]"
agent autonomous agent (smolagents, litellm, article/table context) pip install "tablassert[agent]"
optimize GEPA prompt optimization for agent --optimize (dspy) pip install "tablassert[optimize]"
distill distillation dataset export (tablassert distill-export, HF datasets) pip install "tablassert[distill]"
log loguru-backed file/progress logging (rotation, enqueue) pip install "tablassert[log]"

The tablassert command requires [cli]; without it, the console launcher reports the exact install command. QC is opt-in at build time (build-kg --qc). Reaching a feature whose extra is not installed never produces a bare ModuleNotFoundError: the failure names the missing package and the exact install command, and for build-kg --qc and tablassert agent it arrives before the run starts rather than partway through. Logging is the exception: without the log extra Tablassert produces no logs instead of failing. See the Installation guide for the full matrix and the CLI Reference for every flag.

Entity Resolution API

from pathlib import Path
from tablassert.lib import resolve_many

results = resolve_many(
    col="gene",
    entities=["TP53", "BRCA1"],
    fullmap=Path("/path/to/fullmap"),
    taxon="9606",
)
# [{"original_gene": "TP53", "gene": "HGNC:11998", "gene_name": "TP53", ...}, ...]

Point resolve_many() at a fullmap database to resolve any iterable of entity strings to CURIEs, no LazyFrame setup or NLP preprocessing required. See the Batch Resolution API for the full reference.

Documentation

Developing

uv sync --group dev --extra cli --extra qc --extra log
uv run maturin develop --manifest-path rust/Cargo.toml
make check

See CONTRIBUTING.md for the full development loop, quality gates, and pull request guidelines.

Citation

If you use Tablassert, please cite it as described in CITATION.cff. The approach is described in:

Skye Lane Goetz, Amy K. Glen, and Gwênlyn Glusman. "MicrobiomeKG: bridging microbiome research and host health through knowledge graphs." Frontiers in Systems Biology 5 (2025). doi:10.3389/fsysb.2025.1544432

License

Apache License 2.0

Contributors

Metadata

Release files for tablassert 19.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tablassert 19.4.0
File Size Uploaded
tablassert-19.4.0.tar.gz 443.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tablassert 19.4.0
File
tablassert-19.4.0-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details
tablassert-19.4.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
tablassert-19.4.0-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
tablassert-19.4.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
tablassert-19.4.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
tablassert-19.4.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
tablassert-19.4.0-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
tablassert-19.4.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 14.7 MB

Release files / tablassert-19.4.0.tar.gz

Download URL tablassert-19.4.0.tar.gz
Size 443.4 kB
Tags Source
SHA-256 checksum
How to use checksums
799c5546d2b629a18923cb92d74f94acae47696e9f66bd2d8993c8d837c970ff
BLAKE2b-256 checksum
How to use checksums
317ebbca332b94d4c2b11c3a2c64ef0971a5c9aa5e80233e90a5dc996164aca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL tablassert-19.4.0-cp314-cp314-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b6745952938a1e31b36553208a4bb9fd968e304f9fa79d31070a84d196461863
BLAKE2b-256 checksum
How to use checksums
a4331fd8bcefaf141b262ffdbecd4374465c17508c8524409e48e253e728af41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL tablassert-19.4.0-cp314-cp314-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c7c9a186ca1751be5ab83607df4e1580005afe61ec49805f3e07e62d3762836e
BLAKE2b-256 checksum
How to use checksums
6a3fcf25cbdcf636721ad155e9c12ca7974aed1d5d0f378f05b396d3cb76c42e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL tablassert-19.4.0-cp313-cp313-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
f01167679c18124279432f68de9bb1e14fc09b3de8ab0a459e4acc7b38cf9882
BLAKE2b-256 checksum
How to use checksums
ad985226db44940574d1462839985edd0f3e6a98449339516af13b355fd2f6f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL tablassert-19.4.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
661ace32d3f97417d822a691035373cff4fc83205068b92ba431ab47b811eca9
BLAKE2b-256 checksum
How to use checksums
cb00fdcd98329ae1b5cb4227b96622e1f3fe2181e6bc4864967e1a5929ce950c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL tablassert-19.4.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
6e69c98101b5eed1312676fbfd9a0de7218947ecf75e1ef4fc002f0b3719d670
BLAKE2b-256 checksum
How to use checksums
ca49e5196032e411f8775cde9361326e7df9e44bc4f9da984809a0d81c7852c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL tablassert-19.4.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1af4f4b5b36ba83df71584893f6cf422653d3ed14201414c3a6421ff4db8c86c
BLAKE2b-256 checksum
How to use checksums
e0a560b1d02fa72af152d3fd42b04f7310d6cffad53aa7261df1b342951017bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL tablassert-19.4.0-cp311-cp311-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
891322f6e3092fea843ecb7ce771cd278af6ebdef01ee9c8b17dc15a1abf4a77
BLAKE2b-256 checksum
How to use checksums
ffb5dee907a9ad668b8e2f49dcc436e2d7ecf58a9a3ebda4ed517114f6b7b64b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tablassert-19.4.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL tablassert-19.4.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
35391937c4cb263818b6180fc8b780af64b1bf3e2727fe90b0b5662295f08fb8
BLAKE2b-256 checksum
How to use checksums
49164d27afacb66fc952d39c134faa323f08be694fb6febb04dcecf86da838d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

19.5.0

9 release files

This release

19.4.0 This release

9 release files

19.3.0

9 release files

19.2.0

9 release files

19.1.0

9 release files

19.0.1

9 release files

19.0.0

9 release files

18.1.0

9 release files

18.0.0

9 release files

16.0.0

9 release files

15.1.0

9 release files

15.0.0

9 release files

14.0.0

9 release files

13.0.0

9 release files

12.1.0

9 release files

12.0.0

9 release files

11.0.0

9 release files

10.1.0

9 release files

10.0.0

9 release files

9.1.0

9 release files

9.0.0

9 release files

8.2.1

9 release files

8.2.0

9 release files

8.1.0

9 release files

8.0.1

9 release files

8.0.0

9 release files

7.5.2

2 release files

7.5.1

2 release files

7.5.0

2 release files

7.4.14

2 release files

7.4.13

2 release files

7.4.12

2 release files

7.4.11

2 release files

7.4.10

2 release files

7.4.9

2 release files

7.4.8

2 release files

7.4.7

2 release files

7.4.6

2 release files

7.4.5

2 release files

7.4.4

2 release files

7.4.3

2 release files

7.4.2

2 release files

7.4.1

2 release files

7.4.0

2 release files

7.3.6

2 release files

7.3.5

2 release files

7.3.4

2 release files

7.3.3

2 release files

7.3.2

2 release files

7.3.1

2 release files

7.3.0

2 release files

7.2.2

2 release files

7.2.1

2 release files

7.2.0

2 release files

7.1.0

2 release files

7.0.2

2 release files

7.0.1

2 release files

7.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page