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, a withdrawn sample.

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

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-store --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

Or skip the file: every question takes --runs pointing at the engine's own record, a .lineage store or a horus-lineage root, and reads the run it needs.

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.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clew_lineage-0.4.0.tar.gz (557.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clew_lineage-0.4.0-py3-none-any.whl (523.2 kB view details)

Uploaded Python 3

File details

Details for the file clew_lineage-0.4.0.tar.gz.

File metadata

  • Download URL: clew_lineage-0.4.0.tar.gz
  • Upload date:
  • Size: 557.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clew_lineage-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c0979e935856e78d68317567f22a919e60368652f5708218f05f404a23f18a8a
MD5 53a665e3652a56596b0f24b682ed59e9
BLAKE2b-256 b1a578c6c96440f6fbb05bce33fb228dd18fd74dc27216168059cb6e2faa24ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for clew_lineage-0.4.0.tar.gz:

Publisher: release.yml on QuietFlare/clew

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clew_lineage-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: clew_lineage-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 523.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clew_lineage-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b66121bd51c46ae71fd7f0928b26525c1c1eb553b2c1fd905b8c2f14d7dd6ff
MD5 4599ea56efa7eedc635978404bdbeb2c
BLAKE2b-256 182fc8b92979d915133a63a9113e6c36ed56581049f45abd6411669cc8560b01

See more details on using hashes here.

Provenance

The following attestation bundles were made for clew_lineage-0.4.0-py3-none-any.whl:

Publisher: release.yml on QuietFlare/clew

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 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