×

nf-blocks @ 0.11.0-beta.1

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 instead of to a traditional results/ directory tree. The plugin provides a lineage store for lineage.store.location = 'cas://lab', so Nextflow's own lid:// records live in the same store. It supports content-addressed storage with DAG-CBOR lineage records, SQLite indexing, and features like the fromStore channel factory for reading outputs in downstream pipelines and an explorer for browsing stored content and managing Selections.

Status: beta (version 0.11.0-beta.1). The plugin supports Milestone 4 (cloud) with local directories or S3 locations, Milestone 5 (nf-core pipelines) with workflow output lineage recording, and Milestone 6 (retention) with configurable content retention and garbage collection. It requires the nf-amazon plugin (≥3.9.2).

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.11.0-beta.1'
}

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 = 'ada@example.org'    // optional; who the blocks say asserted them
}

asserted_by is optional. Left unset, nf-blocks uses your Seqera Platform identity, then NXF_BLOCKS_USER, then git config user.email, and warns if none of them gives a name. A value of anonymous counts as unset. See docs/identity.md for the order and what each source reads.

An alias matches ^[a-z][a-z0-9_-]{0,31}$ and must not parse as a content address. outputDir may be left out: unset, it means 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 the first time the pipeline runs.

To add nf-blocks to someone else's pipeline, such as an nf-core one, with a -c config file: a plugins { } block in that file replaces the pipeline's own plugin list rather than adding to it. Repeat the pipeline's pinned plugins beside nf-blocks, or Nextflow installs the latest release of each one the pipeline includes.

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", ...}}

A second pipeline reads a run's outputs back out of the store with fromStore. Its config names the producer's store as a read-only member beside its own writable one:

plugins {
    id 'nf-blocks@0.11.0-beta.1'
}

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']
}

fromStore is used in a pipeline script:

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, here [meta, bam], with every file a cas:// path Nextflow stages like any other.

For publishing into S3:

plugins {
    id 'nf-blocks@0.11.0-beta.1'
}

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

This serves a live view of every configured member at http://127.0.0.1:<port>/.

Command-line tools for managing content and retention:

nextflow plugin nf-blocks:items aligned nested.kit=truseq --run latest --pipeline cas-test-pipeline

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

nextflow plugin nf-blocks:untrash <cid> [<cid> ...]

For typed scripts:

nextflow.enable.types = true

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

record Sample {
    sample: String
    lane: Integer
}

process COUNT_LINES {
    input:
    tuple(meta: Sample, bam: Path)

    output:
    stdout()

    script:
    """
    printf '%s\\t' '${meta.sample}'
    wc -l < '${bam}'
    """
}

workflow {
    COUNT_LINES(nextflow.Channel.fromStore(selection: '<selection address>', records: true))
        .view()
}

License

Apache License 2.0. See the COPYING file for details.

Nextflow version >=26.04.6
Depends On nf-amazon@>=3.9.2
Release Date 28 Oct 2026 19:18:11 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-blocks/0.11.0-beta.1/download/nf-blocks-0.11.0-beta.1.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-blocks/blobs/sha256:963af50d203885dc1d7a867a08974cdf59166677d77f388b13ea809277b1fe7d
Size 16.2 MB
Checksum 5cfb1b526b12d3a16fbdd81dfc379e51d2b50e81c2a7e8cd27274cd2ae9dae8e9754893a09e6ff3bcbd1474d27b14fec191dfa8543b8fe54153b5012816d6660
Total downloads 87 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 >=26.04.6 30 Sep 2026 16:02:49 (UTC)