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.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 22.0.0
File Size Uploaded
tablassert-22.0.0.tar.gz 363.6 kB Details

Built distributions (wheels)

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

Total release size: 15.4 MB

Release files / tablassert-22.0.0.tar.gz

Download URL tablassert-22.0.0.tar.gz
Size 363.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2ebde608e9e38ba6d53e9fe565fea4135673be4fdf8881829300549e36d9817c
BLAKE2b-256 checksum
How to use checksums
e28c9425d29eea79c34fa40d35558230e085088706bdfa996d75c76f137fd4ab
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
d768387e31de536e7a67ef929b7f1bcbee93252ccb8e6e2dae633248db52925b
BLAKE2b-256 checksum
How to use checksums
42a0e0e3ffc078709699b7da29305e04a93b549f2b42a79d09b7e9343d2ad37a
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
e50d36c14289b964c905c107431f58b59d21f2e37246fcad9d4ef13c175ae449
BLAKE2b-256 checksum
How to use checksums
92fe2d48ece8a1db2b638a63491d206d71879c0c40e8fa1a2df7656d7d25c4f1
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
89cf7ca4f667708fe5949d0610966e4c5fd4f758ab3d35e54182606f18003f65
BLAKE2b-256 checksum
How to use checksums
c6418e2329535109d0204f7c6ee8c0023a8f378d83dfd4ded139b7fa64663931
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
7865de6cd3ade387399350447ec5e90774ee0be5a6f3e592c5c55bab60ae6206
BLAKE2b-256 checksum
How to use checksums
3be8dc89becaec5f5ea9b0756cf60dba3d3700cd891006b00708096b2fc957a3
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
71aa8117df1f69bf89712780f7c707b4ed46d49e6ef8586ad60f2bcffa8a8c0e
BLAKE2b-256 checksum
How to use checksums
a0857e30531bf9ff16988d201cf157b18c7dcd7e9d8b076bf0dc9604cec70bda
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
3e014ab7f1c02b90bbf7e6fbd4a7219f5db8210180403d191b068d825b924489
BLAKE2b-256 checksum
How to use checksums
5e9a8756abe8979ad91403cd4d573ce0386958f3ddb2a2fe248d762a73d69101
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
893301147ec37a22d41b30057c4727fe2a39aea965052ab2f1f9dbb2378348e6
BLAKE2b-256 checksum
How to use checksums
b6cabd1b4dfbd5066341349d2f3311bffa7abc4b61adcb1c49715a9bfdbd6fce
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
8cc7aa74eb2f4cc8216c083a7a3080da6808ed5f318f76b224287e6deb355f0a
BLAKE2b-256 checksum
How to use checksums
bc3a31935094ed687e051d4233267e48a932456b1f2d7e16e13d86b45ee657ea
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 Oct 16, 2026.

Transparency log

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

Download URL tablassert-22.0.0-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
9a5ef7400e1b70a20397b779e0f76557ec5e4efc3dd8153edad4fcd4a642b1e4
BLAKE2b-256 checksum
How to use checksums
e013fd39a86f82ff638f849b002fdd8c4e56a639f24fb521c667d7332a50fcfe
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 Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

22.0.0 This release

10 release files

21.0.0

9 release files

20.0.0

9 release files

19.7.0

9 release files

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

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