×

nf-blocks @ 0.8.0-beta.2

Provider: robsyme
Claimed: 26 Oct 2025 22:23:14 (UTC)
Description: `nf-blocks` is a Nextflow plugin that integrates with content-addressed storage (local or S3) and Nextflow's lineage system to automatically publish pipeline outputs with complete provenance tracking. It solves the problem of managing reproducible, traceable pipeline outputs across multiple pipelines by enabling downstream workflows to easily retrieve and reuse published results through the `fromStore` channel factory. Bioinformaticians and pipeline developers would use it to build robust, interconnected computational workflows with full lineage visibility and content-based deduplication.
Latest version: 0.11.0-beta.1
Total downloads: 2.6K View trends

Summary

nf-blocks is a Nextflow plugin that publishes pipeline outputs into a content-addressed store and records their lineage there. It owns the cas URI scheme, allowing users to configure outputDir = 'cas://lab' to send published files through the plugin into a content-addressed store instead of a traditional results/ directory. The plugin provides a lineage store for lineage.store.location = 'cas://lab', integrating with Nextflow's own lid:// records. It maintains a SQLite index of lineage records in DAG-CBOR format, supports reading outputs from other pipelines via the fromStore channel factory, and includes an explorer tool (nf-blocks:explore) for browsing stores and managing Selections. The plugin is currently in beta (0.8.0-beta.2) and is built and tested against Nextflow 26.04.6.

Get Started

Enable the plugin and point both the lineage store and the output directory at the same store alias:

plugins {
    id 'nf-blocks@0.8.0-beta.2'
}

lineage.enabled = true
lineage.store.location = 'cas://lab'   // alias of the writable member
outputDir = 'cas://lab'                // optional: unset, it is the lineage alias

cas {
    stores {
        lab {
            location = '/data/cas'     // the writable member
        }
    }
    resolve = ['lab']                  // optional; default is every alias, writable first
    asserted_by = 'anonymous'          // optional opaque label; never the OS user name
}

An alias must match ^[a-z][a-z0-9_-]{0,31}$ and must not parse as a content address. outputDir may be left unset, in which case it defaults to the alias in lineage.store.location. When set, it must name that alias, or the run aborts. Nextflow downloads the plugin from the Nextflow Registry automatically on first use.

When adding nf-blocks to someone else's pipeline (such as an nf-core pipeline) with a -c config file, note that a plugins { } block replaces rather than adds to the pipeline's plugin list. Repeat the pipeline's pinned plugins alongside nf-blocks, or Nextflow will install the latest release of each plugin the pipeline includes, potentially breaking compatibility.

Examples

Any pipeline with a workflow output block publishes into the store. With the configuration above, running a pipeline writes each published path under the store's coordinate tree:

/data/cas/coords/aligned/A/A.bam
/data/cas/coords/qc/A/A_qc/summary.txt
/data/cas/nf/<run hash>/aligned/A/A.bam/.data.json

The lineage record for a published file names its coordinate rather than a work directory path:

{"kind":"FileOutput","spec":{"path":"cas://lab/aligned/A/A.bam", ...}}

To read outputs from a run in another pipeline, configure a read-only member alongside your writable store:

plugins {
    id 'nf-blocks@0.8.0-beta.2'
}

manifest.name = 'downstream'

lineage.enabled = true
lineage.store.location = 'cas://mine'

cas {
    stores {
        mine { location = '/data/cas-downstream' }
        lab  { location = '/data/cas' }
    }
    resolve = ['mine', 'lab']
}

Then use fromStore in your workflow:

include { fromStore } from 'plugin/nf-blocks'

workflow {
    main:
    picked  = channel.fromStore(selection: '<selection address>')
    aligned = channel.fromStore(run: 'latest', pipeline: 'cas-test-pipeline', output: 'aligned', where: [sample: 'B'])

    picked.mix(aligned).view()
}

Each item arrives in the shape the producer published it, with every file a cas:// path that Nextflow stages automatically. The where: parameter filters by metadata paths using equality or comparison operators (>, >=, <, <=).

For S3 storage with a cloud executor:

plugins {
    id 'nf-blocks@0.8.0-beta.2'
}

lineage.enabled = true
lineage.store.location = 'cas://lab'

workDir = 's3://my-work-bucket/work'
process.executor = 'awsbatch'
process.queue = 'my-queue'

aws {
    region = 'us-east-1'
    profile = 'my-profile'
}

cas {
    stores {
        lab { location = 's3://my-cas-bucket/cas' }
    }
    tmpDir = '/scratch/nf-blocks'
}

Browse a store with:

nextflow plugin nf-blocks:explore

Manage retention and perform sweeps:

nextflow plugin nf-blocks:prune --keep-last 3
nextflow plugin nf-blocks:prune --keep-last 3 --apply true
nextflow plugin nf-blocks:sweep
nextflow plugin nf-blocks:sweep --apply true

What's new

This is a beta release (0.8.0-beta.2). Key milestones implemented include:

  • Milestone 4 (cloud): Any store member, including the writable one, can be a local directory or S3 location. Runs on AWS Batch with or without Fusion publish to writable S3 members. Under Fusion, task nodes hash their own outputs; between S3 buckets, S3 computes SHA-256 server-side, so most files never pass through the head node.
  • Milestone 5 (nf-core pipelines): nf-blocks records lineage from workflow output { } blocks only. Processes using publishDir are warned once; their files are stored but not recorded against any run (counted as unjoined). Outputs declaring index { } record their Output Index File.
  • Milestone 6 (retention): Every run's content is a root by default and kept until released. A sweep only deletes released, unpinned content past its grace period.

The plugin requires nf-amazon >= 3.9.2. The on-disk format (block kinds, index, Store Log) may change before 1.0.0, with migrations provided for block addresses. Warnings from the plugin go to .nextflow.log and the terminal.

Breaking changes

The on-disk format (block kinds, the index, the Store Log) may still change before version 1.0. Block format changes will include migrations, since a block's address is its content and existing stores keep their blocks.

In typed scripts with nextflow.enable.types = true, Nextflow 26.04.6 cannot reach plugin channel factories through channel. (see nextflow-io/nextflow#7694). Call nextflow.Channel.fromStore(..., records: true) instead until this is fixed.

License

Apache License 2.0

Nextflow version >=26.04.6
Depends On nf-amazon@>=3.9.2
Release Date 24 Oct 2026 18:36:29 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-blocks/0.8.0-beta.2/download/nf-blocks-0.8.0-beta.2.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-blocks/blobs/sha256:3f808c67a73182db761e4cf7f2daf02dba9e96fbe7bdf2a37932dfd8995a2834
Size 15.2 MB
Checksum 6e04be43df4a26dd3b7b6890b619067911b00cd10531c382d2693519f88420acf54f8a5d3a2f01afb0698481f9c21aaad6580915f2945a2d1f908d1e35efe8f0
Total downloads 103 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.11.0-beta.1 >=26.04.6 28 Oct 2026 19:18:11 (UTC) 87
0.10.0-beta.2 >=26.04.6 26 Oct 2026 22:43:55 (UTC) 101
0.10.0-beta.1 >=26.04.6 26 Oct 2026 13:10:02 (UTC) 99
0.9.0-beta.1 >=26.04.6 24 Oct 2026 19:52:43 (UTC) 103
0.8.0-beta.2 >=26.04.6 24 Oct 2026 18:36:29 (UTC) 103
0.8.0-beta.1 >=26.04.6 24 Oct 2026 18:32:20 (UTC) 102
0.7.0-beta.1 >=26.04.6 15 Oct 2026 13:56:25 (UTC) 175
0.6.0-beta.1 >=26.04.6 14 Oct 2026 19:51:36 (UTC) 178
0.5.0-beta.1 >=26.04.6 01 Oct 2026 03:22:16 (UTC) 228
0.4.0-beta.1 >=26.04.6 01 Oct 2026 00:05:41 (UTC) 231
0.3.0-beta.2 >=26.04.6 30 Sep 2026 21:07:45 (UTC) 231
0.3.0-beta.1