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.

Statement of need

Biomedical knowledge lives in spreadsheets: association tables, assay results, curated gene-disease lists. Getting those rows into an NCATS Translator knowledge graph means writing an ingest that maps columns to Biolink statements, resolves free text ("TP53", "lung cancer") to standard CURIEs, and records provenance, terms of use, and statistical annotations. Today that ingest is Python code maintained per source, and entity resolution usually means calling a hosted name-resolution service at build time.

Tablassert replaces the per-source code with a declarative YAML mapping plus an embedded, offline entity-resolution database built from RENCI BABEL exports, so a build is reproducible, auditable, and network-free. It is aimed at Translator ingest authors and knowledge-graph data engineers who hold tabular biomedical sources, and at bioinformatics groups that want a validated KGX output without writing a transform pipeline. The configuration model and the Biolink/KGX contracts it emits follow current NCATSTranslator/translator-ingests practice, and each build can emit the Resource Ingest Guide (RIG) metadata those submissions require.

Getting help

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. Build or download that database once first (tablassert build-fullmap, a multi-GB download; see the Fullmap guide), which makes ./fullmap below the right path:

name: MY_KG
version: 1.0.0
tables:
  - ./table.yaml
fullmap: ./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. The edge sample below is abridged; real records also carry provenance fields such as knowledge_level, agent_type, sources, and original_subject/original_object.

{"id":"HGNC:11998","name":"TP53","category":["biolink:Gene"],"in_taxon":["NCBITaxon:9606"],"provided_by":["infores:my-kg"]}
{"id":"MONDO:0008903","name":"lung cancer","category":["biolink:Disease"],"in_taxon":["NCBITaxon:9606"],"provided_by":["infores:my-kg"]}
{"id":"8f41c2d7-9b3e-35c1-a4e8-6d2f9a0c5b71","subject":"HGNC:11998","predicate":"biolink:associated_with","object":"MONDO:0008903","p_value":"1.0000e-03","statistical_significance_qualifier":"very_strongly_significant","has_supporting_studies":{"PMID:12345678":{"id":"PMID:12345678","name":"gene-disease.yaml SECTION 1","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 match, fuzzy match, abbreviation expansion, then SapBERT embeddings) flags low-confidence mappings
  • KGX compliance: emits NCATS Translator-compatible node/edge NDJSON with Biolink categories and predicates
  • Performance & reproducibility: lazy Polars pipelines and a deterministic UV-based development environment

Installation

pip install tablassert

To use the Python API, install Tablassert into your project's environment with pip install "tablassert" (or uv add tablassert). To get the tablassert command as a standalone tool, use uv tool install "tablassert[cli]"; note that a tool install is isolated and does not expose the Python API to your project. Other extras are opt-in:

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 match, fuzzy match, abbreviation expansion, and SapBERT embeddings) pip install "tablassert[qc]"
log loguru-backed file/progress logging (rotation, enqueue) pip install "tablassert[log]"

Reaching a feature whose extra is missing never produces a bare ModuleNotFoundError: the failure names the missing package and the install command that fixes it. QC is opt-in at build time (build-kg --qc). See the Installation guide for the full matrix, per-command preflight behavior, 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 22.0.1

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 22.0.1
File Size Uploaded Provenance
tablassert-22.0.1.tar.gz 364.1 kB With provenance Details

Built distributions (wheels)

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

Total release size: 15.5 MB

Release files / tablassert-22.0.1.tar.gz

Download URL tablassert-22.0.1.tar.gz
Size 364.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3a4b57dc5d6f0c2d9623693647af95abd55ab92f78ebcd07e7efbbda65342f3e
BLAKE2b-256 checksum
How to use checksums
21e04a842a7e47c7b8c83c02060d681132fead4e2129dc76bc49a7d421058ab0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / tablassert-22.0.1-cp315-cp315-macosx_11_0_arm64.whl

Download URL tablassert-22.0.1-cp315-cp315-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.15 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8a8715cf12cf272dff088799ca9ede7ac9ffc2f360556f5be6aa04a456b66fe2
BLAKE2b-256 checksum
How to use checksums
d74568db4b7bc686c9058b5d560ce9987039bf0f478e9da13d68e4a2df18e1d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp314-cp314-manylinux_2_34_x86_64.whl
Size 1.8 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
fa8615799c26cbbab2141ee4d503dcfe60cb834c1f254b5108500e08258e0679
BLAKE2b-256 checksum
How to use checksums
63979819e1102ea8d2e79699d872f17cd335325fe85a437cb0835bdc9ee2d7b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp314-cp314-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
53bd2d3a1fee7bf2c9f1e482d25f60d78b4699311fbf9520d31f0d1727cec913
BLAKE2b-256 checksum
How to use checksums
e74d4dcb6a81312433daaefec2191c223069b66d77bf6418b1d2df2f45b7a8ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp313-cp313-manylinux_2_34_x86_64.whl
Size 1.8 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
7586edeb09a46b84530571d4431412c6e813ac90e29c94087de42e3dc9c6a85d
BLAKE2b-256 checksum
How to use checksums
19cedc08655741ac931eb1cc4f24235e752691af8fd4c0c111df88a9fb43a2b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp313-cp313-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
593c8a7ca8520b039cb68b281bea7938765fc17ffaa7623df7caa55fbe80ed92
BLAKE2b-256 checksum
How to use checksums
fb89795fe6c870e7fa015c88446cbe2f9010271b078cc80097cab5df66d80dd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp312-cp312-manylinux_2_34_x86_64.whl
Size 1.8 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b14e0dee074d18a484fd63d2b87a1efe482e620e650de54a6e3b33d2f0139381
BLAKE2b-256 checksum
How to use checksums
bf5080f73f54d2d6a3086becf3c3348653249070e1c9a5a44137ed8232d798b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp312-cp312-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3c09b5483b1db3c36e61856ce38d0a19b7b67315b498aa9a446e2c1395349d62
BLAKE2b-256 checksum
How to use checksums
c2d216dbdd68a66841494270fa5d92029830f58d5147e22c62bef352b43ca356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
Size 1.8 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ea3c54112af4713a387e0464ca1ee5b25c42e53bfc67d24fbe4c1b4b17b1bda0
BLAKE2b-256 checksum
How to use checksums
0e16353a057e36226d0937f5111ba31340e30cb49f5b5e768713d38511e6de21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

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

Download URL tablassert-22.0.1-cp311-cp311-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6f60f5c2e12447086b75027596594b4fc53162bb55386102105dfc1d7bedf105
BLAKE2b-256 checksum
How to use checksums
b0045de44685b2032a54f93c21defadf124f339a7d34374f8626050c63390eeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Security for tablassert 22.0.1

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.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for tablassert-22.0.1.tar.gz

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 Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

22.0.1 This release

10 release files Full provenance

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