Tablassert
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 agentderives, 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
- Installation: install methods, extras, and development setup
- Tutorial: step-by-step example with synthetic data
- Use Case Gallery: real-world configuration patterns
- CLI Reference: complete command-line flag reference
- Fullmap: building and querying the entity-resolution database
- Agent: the autonomous agent pipeline
- Configuration: graph and table configuration reference
- API Reference: core functions documentation
- Development: dev environment setup and contributor workflow
- Changelog: release history
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
Contributors
- Skye Lane Goetz, Institute for Systems Biology
- Gwênlyn Glusman, Institute for Systems Biology
- Jared C. Roach, Institute for Systems Biology
Metadata
Release files for tablassert 19.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tablassert-19.5.0.tar.gz | 443.9 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tablassert-19.5.0-cp314-cp314-manylinux_2_34_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.34+ x86-64 | Details |
| tablassert-19.5.0-cp314-cp314-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 11.0+ ARM64 | Details |
| tablassert-19.5.0-cp313-cp313-manylinux_2_34_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.34+ x86-64 | Details |
| tablassert-19.5.0-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details |
| tablassert-19.5.0-cp312-cp312-manylinux_2_34_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.34+ x86-64 | Details |
| tablassert-19.5.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
| tablassert-19.5.0-cp311-cp311-manylinux_2_34_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.34+ x86-64 | Details |
| tablassert-19.5.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.5.0.tar.gz
| Download URL | tablassert-19.5.0.tar.gz |
|---|---|
| Size | 443.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ba1fcd9047690add2fc498dc7b7f7c48d003a8f0371c6c859280db8fd2f09ee
|
|
BLAKE2b-256 checksum How to use checksums |
1a35bd2a839ce11379fd6717eed405a742c8409ca94a6294785edbc8d6e69d0d
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | tablassert-19.5.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 |
18c43cd4c3d1e6a88e58bb4636a108a138d371faacf98b7b82233addc31a06d2
|
|
BLAKE2b-256 checksum How to use checksums |
f2e56cb11a00d437feb37c85637674aff8f1ef9069c0bb5e9f17fd0ad6c49739
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | tablassert-19.5.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 |
163b923b541a152123dc8fd5c7337528f93c89373c04a6559269fac9b590d0ee
|
|
BLAKE2b-256 checksum How to use checksums |
6f76f1e2e437c4226c6848b005f88080d443f0ff62618108e9312d985643ad74
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | tablassert-19.5.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 |
d69eb7bc1c9b8fcae0734e244ee9d9f32ace2fa17cf7d6cce2869d4f3507ee5f
|
|
BLAKE2b-256 checksum How to use checksums |
9f54719189cbc9bf4fc0fd1561fdf79853f0f09636d1d245b5571cdc2d2412a3
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | tablassert-19.5.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 |
0e48351eab496e6eb1beaff48bcee3904f2c7efad81edc89d115e99b3bedfec1
|
|
BLAKE2b-256 checksum How to use checksums |
497eef89f7a88179c831b1af8d7fba65dd0c8bc7623904719127bdc936dbc084
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | tablassert-19.5.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 |
6af3d3a068a5588a631f42ff86748107af351a4357509e1ac560d2b840111ee6
|
|
BLAKE2b-256 checksum How to use checksums |
53b3ae4e4ccc28db04aa98302119ae8c68b6fc59472fc21e6cc6a9186a0cd868
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | tablassert-19.5.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 |
c1b166f0195e91281ebcccac264a155876329a356d897e1268cc7ab4f1c89489
|
|
BLAKE2b-256 checksum How to use checksums |
f2a41dd1802894a129b11da4e1f44899c1fbabd39f9c35370c5c2e4f779ba20a
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | tablassert-19.5.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 |
5ab27b89bf4ff1c5be10ae7cf569f4d3fa1fc6ae22f81e16125977faec1f189a
|
|
BLAKE2b-256 checksum How to use checksums |
a4d5a7bc781870d1be55b6f4a74e063497748456ba0ab51f36d493537dd52396
|
| 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 30, 2026.
Transparency logRelease files / tablassert-19.5.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | tablassert-19.5.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 |
90a16a1f559e32dae79df156df43b3529291c454560ff94f1870143c3a6fcdfd
|
|
BLAKE2b-256 checksum How to use checksums |
fce93d55dfa4070ed3c97eef5b90af1e757f9029af69a117077eb9903328782a
|
| 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 30, 2026.
Transparency log