Skip to main content

LLM-PathwayCurator

LLM-PathwayCurator logo

Source-linked enrichment reports and checks of pathway draft wording.

Docs Historical preprint License: MIT Python


Enrichment output and an interpretation are different records. LLM-PathwayCurator keeps the complete enrichment table, writes statistical statements tied to that table, and places supplied draft text beside checks of its numbers, signed enrichment direction, declared study context, and inferential wording. The HTML report lets a researcher inspect the original evidence and wording together.

The current default makes no model requests. It does not use hash-derived context scores or simulated gene survival to select statements. You can inspect drafts written by a person or any language model without calling that model again. The historical LLM pipeline remains available through an explicit legacy mode.

The manuscript source tables contain the seven-cohort TCGA analysis using the corrected gene identities and mutation-group policy. See the reproduction guide. Earlier TCGA outputs are retained as historical records; they are not the manuscript inputs.

The optional structured curation workflow adds supporting-gene modules, typed source observations and a proposal packet. Import saved model- or human-authored JSONL with --proposals to review proposed interpretations beside their exact sources. This workflow makes no model calls and never automatically approves free prose.

📦 Install the current source

PyPI version

  • pip install llm-pathway-curator
    

    (See PyPI project page: https://pypi.org/project/llm-sc-curator/)

  • Option B: Install from GitHub (development)

    git clone https://github.com/kenflab/LLM-PathwayCurator.git
    cd LLM-PathwayCurator
    python -m pip install -e .
    

Python 3.11 or later is required. Existing users can update their checkout and reinstall it; a second checkout is unnecessary.

⚡ Try a source report

llm-pathway-curator run \
  --evidence-table examples/source_report/evidence_table.tsv \
  --sample-card examples/source_report/sample_card.json \
  --claims examples/source_report/drafts.tsv \
  --outdir out/source_report

Open out/source_report/report.html. The example is synthetic software test data, including deliberately problematic wording; it is not a biological benchmark. Omit --claims to create a report from the enrichment table alone.

Supply a new or empty output directory for each run. Previous reports and input files are preserved.

📊 Visualize saved results

llm-pathway-curator plot-source --run-dir out/source_report --outdir out/source_plot

This writes PNG/PDF/SVG figures, the plotted table and an input-hash receipt. Source statistics, statistical selection and draft-check counts remain distinct. The visualization guide explains the display and the retained plot-ranked packed-circle and bar plots for historical ranked inputs.

See the examples index for the source report, structured curation and retained historical demo.

🧩 Inputs

The EvidenceTable TSV requires term_id, term_name, source, stat, qval, direction (up, down, or na), and evidence_genes (semicolon-separated). Use stat_kind=NES for a signed normalized enrichment score; fgsea sources infer that label. Missing statistics remain missing. The tool checks unique source:term_id identities and rejects ambiguous evidence links.

The Sample Card JSON must give a nonblank comparison, including the positive group and reference group. Optional condition, tissue, perturbation, and study_design describe your system. No cancer type or TP53 comparison is required.

Optional draft TSVs contain text and either term_uid (source:term_id) or an unambiguous term_id. Optional claim_id, study context fields, and evidence_sha256 allow explicit identity checks. Submitted wording is preserved. See the input guide and adapters.

🛡️ Outputs and decisions

Artifact Purpose
report.html Searchable source evidence, statistical statements, original drafts and quoted findings
report.md, report.jsonl Readable and machine-readable records for every input pathway
evidence.source.tsv Complete normalized census with source and evidence hashes
audit_log.tsv Statistical statement eligibility and reasons
claims.checked.tsv Original draft text, limited checks and human-review disposition
run_meta.json Input/output hashes, settings, implementation hashes and run counts

The default adjusted-value cutoff is 0.05; set --q-threshold explicitly to change it. --k-claims optionally caps eligible source statements, ordered by adjusted value and identifier. All other candidates stay in the report. This selection rule does not claim an advantage over selection by the same adjusted values.

PASS applies to a source statistical statement under the declared cutoff. An explicit contradiction in supplied prose gives FAIL; other prose remains ABSTAIN for human review. Mechanistic or clinical wording is flagged for review. Absence of a flag never establishes semantic or biological correctness. The limited wording rules currently cover specified English expressions, not a general language understanding system. See scope and limitations.

🐍 Python API

from llm_pathway_curator import ReviewConfig, review_enrichment

result = review_enrichment(ReviewConfig(
    evidence_table="evidence.tsv",
    sample_card="sample_card.json",
    claims_file="drafts.tsv",  # optional
    outdir="out/my_source_report",
))
print(result.artifacts["report_html"])

run_pipeline(RunConfig(...)) uses the same source workflow by default.

📄 Reproduce manuscript figures and summaries

After installing this checkout, run:

python paper/revision/CRM_R1/reproduce.py --outdir out/manuscript_reproduction

This verifies 64 supplied source files, repeats the 50 DEX text checks, recomputes human-rating and split-replication summaries, creates seven TCGA source reports, and renders Figures 2–3 and S1–S4 with numerical table exports and hash receipts. Use a new output directory. The command starts from saved enrichment records, texts, ratings and split results; expression-model fits are a separate step. Figure 1 is author-supplied artwork. The guide and figure map list each input, script and output, including upstream dependencies that are needed for a complete study rerun.

Historical pipeline

Use --workflow legacy, or RunConfig(workflow="legacy", ...), to request the historical distill/module/proposal pipeline. Its proxy context scores and synthetic gene perturbations are historical computational mechanisms, not empirical stability or biological validation. Model-related environment settings only affect that explicit workflow; legacy model settings can make API requests.

For an exact historical reproduction, pin commit b069e8a. Changing file paths changes frozen code hashes, so archived protocols should not be silently relocked against the reorganized source tree.

The paper workspace and revision README describe research-only comparisons, saved-result reporting and the updated-tool reassessment. Development prototypes, study-specific registries and revision tests live under paper/revision/CRM_R1/; they are excluded from the installed package. Earlier versioned notes are retained in its archive/ for provenance.

🧾 Development and citation

python -m pip install -e ".[dev]"
python -m pytest
python -m build

Software tests establish implementation behavior. They do not estimate expert agreement, interpretive utility, or biological accuracy. The revised implementation requires a separately specified evaluation before those performance claims.

CITATION.cff describes the software. Cite the release-specific DOI and commit used. Two separate records preserve v0.1.0:

These identify the historical implementation. The original citation is preserved in the archive. The release guide explains versioned code and data archives.

Metadata

Release files for llm-pathway-curator 0.2.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 llm-pathway-curator 0.2.0
File Size Uploaded Provenance Actions
llm_pathway_curator-0.2.0.tar.gz 1.1 MB With provenance Details for llm_pathway_curator-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-pathway-curator 0.2.0
File Interpreter ABI Platform Actions
llm_pathway_curator-0.2.0-py3-none-any.whl Python 3 none any Details for llm_pathway_curator-0.2.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / llm_pathway_curator-0.2.0.tar.gz

Download URL llm_pathway_curator-0.2.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
8ad3c78f73737844c2b2fc92d07d1090e1ec9dc7ba93012304f4c1a1763e0e83
BLAKE2b-256 checksum
How to use checksums
9dce9d8bbcefa81d01f477339c79327303cfcf86dd634702ac8f43e8253ad6d5
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 27, 2026.

Transparency log

Release files / llm_pathway_curator-0.2.0-py3-none-any.whl

Download URL llm_pathway_curator-0.2.0-py3-none-any.whl
Size 256.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5865b5fffe3fade875decbbfdfd1e4d6ca584c7f546d5c91199f4c189184ba38
BLAKE2b-256 checksum
How to use checksums
627413924c7e01486b7f16657e980edc9977829fa72368eb4a977a90692eb0a0
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 27, 2026.

Transparency log

Security for llm-pathway-curator 0.2.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_pathway_curator-0.2.0.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 27, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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