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]"
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). 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 9.0.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 9.0.0
File Size Uploaded
tablassert-9.0.0.tar.gz 223.5 kB Details

Built distributions (wheels)

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

Total release size: 10.6 MB

Release files / tablassert-9.0.0.tar.gz

Download URL tablassert-9.0.0.tar.gz
Size 223.5 kB
Tags Source
SHA-256 checksum
How to use checksums
537fe9ed2575f2859ae77204e37f3a51500d40b7d4dcbc7ce5a91d1daf80c53a
BLAKE2b-256 checksum
How to use checksums
22e6f5e0d36347a3dae8f46d235aa51e873c6a8a33fccf9c079e1a3eb630361d
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
77f600d6bf6c2968e674c1f714be985d4e3eda93626abcde9fd74b8f0d5328ce
BLAKE2b-256 checksum
How to use checksums
cf4fcafadbfab134ea24eccb1d476dbb5a7c8b80d03872780d6625af335a526c
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
812afbd9e3a4009f6bbd269de023b1bebd279a15668e8b33d0b3caeda0e2bdaa
BLAKE2b-256 checksum
How to use checksums
b0d72fdc408e4fbeaa97ebebe1399e093d4fb90f7f4d3211d41f32439989ab50
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
4050543bfd094cc8becfc05d732e49a54ec4a81272e73296c14feb285df9a883
BLAKE2b-256 checksum
How to use checksums
9cf743f938bcc94b1c6f135e5a81c96b605ba9a93e062802e6d89b34772e5c8c
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
7d8e9b0b045732bb5de0606d553c7a08247fe5494d27441710f7515509766bc3
BLAKE2b-256 checksum
How to use checksums
adf10fc55631bf839b40ce238ccde45e7a9e3e009301a5c3575644546cebc433
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
f7fd502ff1aa89d400ab64ed809e6b70bd9a1d8a104763c0cccfd10a470b49c2
BLAKE2b-256 checksum
How to use checksums
5cd3791999929bab44225567ff0e8e71bdb2dd361de0ba77c570c10ae3911597
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
22a3bfb048633006f3587bca3b75df071837df5557379952e895ee268d38022a
BLAKE2b-256 checksum
How to use checksums
9af3a25c962745069460eda2a977e30d144c5a7fac35e0f33e6b770da566338e
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
ad51d34c238496bec40dc8169954d9c4592320a8f11e0d0990b447be7922e33c
BLAKE2b-256 checksum
How to use checksums
578f1d49481006a82761d9bed3e2c223d7384bfb60622184ef7c29c722bcdeb4
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 11, 2026.

Transparency log

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

Download URL tablassert-9.0.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
2033045283af6d858ad7fee1c706586f64feb3cbde59dd19d63c65afdab9c513
BLAKE2b-256 checksum
How to use checksums
2c8263cab720d429db9a935fcaac4cc3bad981a1ae0598ba0c9aaabdf80e2d53
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 11, 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

10.1.0

9 release files

10.0.0

9 release files

9.1.0

9 release files

This release

9.0.0 This release

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