Skip to main content

Clew

PyPI Python Tests License: AGPL v3

Clew answers questions about workflow runs that the engine cannot: what a bad input reached, what can safely be deleted, and what one run took from another. It reads the record the engine already writes, for Nextflow, Snakemake, Cromwell, Horus, DNAnexus and Latch, and changes nothing in your pipeline.

The examples are from genomics because that is where it was first used. The graph underneath is neutral: tasks that read files and write files, whatever the field.

A clew is the ball of thread Ariadne gave Theseus. You follow it back out.

Install

pip install clew-lineage
clew demo

Python 3.9 or later, no dependencies. The demo runs over a real nf-core/sarek run that ships with the package.

What it answers

Something upstream went bad. A reference update, a broken container, an input that turned out wrong.

clew impact --graph graph.json --container gatk4

Every affected task gets a verdict, re-run, quarantine, delete or disclose, with the derivation chain as evidence. A verdict that depends on whether the artifact still exists needs --work-root and --results; without them it is withheld, not guessed. Nothing unknown is reported as clean.

The disk is full and nothing is wrong.

clew reclaim --graph graph.json --work-root work/ --results results/

Proposes only the directories the graph proves redundant, and deletes nothing without --apply and a receipt. s3://bucket/prefix works as either root.

Did the new version produce what the old one did?

clew drift --before a.json --after b.json

Names the first task on each chain whose outputs differ and why: an input changed, a container changed, or nothing changed and the tool is not deterministic. Everything else is confirmed reproduced, digest for digest.

One run consumed another's output.

clew stitch --graph a=a.json --graph b=b.json --out chain.json

Joins runs by content digest, so a question follows a change across launches, machines and engines.

Add --html to impact, reclaim or drift for a one-page report.

An impact report: how much of the run a bad container reaches, and what to do about each task it touches

Your runs

One command per engine turns a run into a graph.

Engine Command
Nextflow, including Seqera Platform clew extract nextflow --store .lineage --run <run> --json-out graph.json
Snakemake clew extract snakemake --workdir . --json-out graph.json
Cromwell and WDL, including Terra clew extract cromwell --metadata metadata.json --json-out graph.json
Horus, through horus-lineage clew extract horus --run-dir <run> --json-out graph.json
DNAnexus clew extract dnanexus --analysis <id> --json-out graph.json
Latch clew extract latch --execution <id> --json-out graph.json

clew extract lists every engine it knows, and clew providers shows every adapter and extractor installed with the package each came from. An engine or pipeline that is not there is one subclass away: see providers.

Or skip the file: reclaim, drift and digest take --runs pointing at the engine's own record, a .lineage store or a horus-lineage root, and read the run they need. impact takes a graph file.

Content digests make every answer exact. Horus records them, and Nextflow does with cache 'deep'. For any other run, clew digest reads each file once and fills them in. Sources has what each engine records and what that limits.

Every answer can be checked

Clew is built for the day someone else has to verify what it said. Storage is checked, never assumed. Facts go in an append-only log. The rules are versioned data, so an old plan replays under the rules that produced it. An evidence bundle re-derives every verdict offline, with no database and no credentials. A gate can block a run before it starts.

Storage, event log, policy, evidence, gate, auditor surfaces, architecture, providers for adding your own pipeline or engine.

Status

Verified on real Nextflow, Snakemake, Cromwell and Horus runs. DNAnexus and Latch are built from the platform APIs and await their first live runs. CHANGELOG.md lists what changed in each release.

Contributing

Issues and pull requests are welcome, especially from people who run workflows for a living and can say where the model is wrong. See CONTRIBUTING.md. No agreement to sign.

License

AGPL-3.0.

Metadata

Release files for clew-lineage 0.5.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 clew-lineage 0.5.0
File Size Uploaded
clew_lineage-0.5.0.tar.gz 608.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clew-lineage 0.5.0
File Interpreter ABI Platform
clew_lineage-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / clew_lineage-0.5.0.tar.gz

Download URL clew_lineage-0.5.0.tar.gz
Size 608.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0d9fb3337843fdc8c5b895a057279078fe77439a8cdb390701c03cf2e2a21c48
BLAKE2b-256 checksum
How to use checksums
b63d0adee2db409f64715b35c643d519b2f168c0e0a141155579e23c0fc56c71
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 Sep 16, 2026.

Transparency log

Release files / clew_lineage-0.5.0-py3-none-any.whl

Download URL clew_lineage-0.5.0-py3-none-any.whl
Size 541.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e341c0d4acc04b334cd3e77cc1baf2ed47ad602e58cb971cacc7ab823446be6
BLAKE2b-256 checksum
How to use checksums
875a981fc028dd1c0e8e3c4da5645cf9665d60d51d38abf60b432e64390e49cb
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 Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.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