Skip to main content

Tablassert

PyPI Python CI License Docs

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

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: supporting_study_size, method: column, encoding: D }

Wrap it in a graph config (graph.yaml) pointing at your fullmap entity-resolution database:

name: MY_KG
version: 1.0.0
description: Gene–disease associations extracted from tabular sources.
tables:
  - ./table.yaml
fullmap: /path/to/fullmap

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"]}
{"subject":"HGNC:11998","predicate":"biolink:associated_with","object":"MONDO:0008903","p_value":"1.0000e-03","supporting_study_size":"450"}

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 three-stage audit (exact → fuzzy → BioBERT 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. The base install builds knowledge graphs from CSV/TSV/Excel sources; optional extras add runtime and pipeline capabilities:

Extra Adds Install
rt CPU-compatible Polars runtime pip install "tablassert[rt]"
aria2 bundled aria2c downloader for build-fullmap --aria2c (Linux/Windows wheels only) pip install "tablassert[aria2]"
qc three-stage QC audit (exact → fuzzy → BioBERT embeddings) pip install "tablassert[qc]"
agent autonomous agent (smolagents, litellm, PDF context) pip install "tablassert[agent]"
optimize GEPA prompt optimization for agent --optimize (dspy) pip install "tablassert[optimize]"

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. 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 qc
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, Alex 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 10.1.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 10.1.0
File Size Uploaded
tablassert-10.1.0.tar.gz 236.8 kB Details

Built distributions (wheels)

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

Total release size: 10.8 MB

Release files / tablassert-10.1.0.tar.gz

Download URL tablassert-10.1.0.tar.gz
Size 236.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7c6025b189c89af7e6e7f5bc282b8834757565d8b19e969c0d8b322f3a2d3098
BLAKE2b-256 checksum
How to use checksums
f54412e63d515c57327469af0da741577d854d1ab2a6d40a6834c8d8cdf82163
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
Size 1.4 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
40d47ac3facf50b9910e346f1729b9ad140219c8480b0e6fe7f3685cddfe07f4
BLAKE2b-256 checksum
How to use checksums
3204af24d9fd42e6dfaf487ce2c1272ad15a61f23d93f6f422680a2baa326fc0
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp314-cp314-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
aa7a5d3e1061ab18c158e1f6a7e9234f9e6f03ae72efec205017e4d4879fafd2
BLAKE2b-256 checksum
How to use checksums
5210525bcc72a71cd7a58dc0cc6be68d884f6c8c6d8a43de2264ef5224375bce
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Size 1.4 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
0a3a7127071959d9bf2da7aab68869a8c151955bed35ca698bf085f57ace00fc
BLAKE2b-256 checksum
How to use checksums
db2ed4ee9725c2c08af9574b197765690429c4be37463fa62d6f059d60451ace
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
76a131c0b4129c4d843c265c11acab52005c0c56bebaf3dc9d280e02a5c28770
BLAKE2b-256 checksum
How to use checksums
bac6e14370dc9a23f5424daaf7cdec67bded1293a52eae0a0441bef75a65e5b6
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
83d632f75a4625526b5b0baa4de7e8d3138518ce3d9ca3bceb0a034a16f0cb05
BLAKE2b-256 checksum
How to use checksums
a147c5456257dbb881fbba51615b8fe150dfb99987e539b66012c36422ea03a6
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
edbc2e7907b1750ac12c73bf7c8af34483d79812f377f6434c8ee199c7f974d1
BLAKE2b-256 checksum
How to use checksums
c6332119d4e46859451ca7c44de032dea37541625eb6ebc529fabc500d21e9dd
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
1e618d31e5916f9d4deff3bb9d3110d22e3056586e8329758c6aef9ae507484d
BLAKE2b-256 checksum
How to use checksums
ff9a7f9ad3cab0e90474fdd47a93d9ed36a29f9c2c0ce448b9702acf9396b694
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 Aug 13, 2026.

Transparency log

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

Download URL tablassert-10.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a705272b0c31082206ef2de45a9e886d4a447df5efd0240059b8e3c917d8bbf3
BLAKE2b-256 checksum
How to use checksums
f2bdb25e9576d2787042d0cb6da959efd1c33adb0d38dd6a0f67983df2d7506f
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 Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

19.5.0

9 release files

19.4.0

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

This release

10.1.0 This release

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