×

nf-drs @ 0.1.0

Provider: Sage Bionetworks
Claimed: 18 Jun 2026 11:21:47 (UTC)
Description: `nf-drs` is a Nextflow plugin that integrates with GA4GH DRS-compliant data repositories (Gen3 commons like NCI CRDC, AnVIL, and BioData Catalyst) to enable transparent access to remote data objects using `drs://` URIs in workflows. It automatically resolves DRS identifiers to presigned URLs and streams the data, supporting pluggable authentication methods including Gen3 API keys and OAuth2 bearer tokens. Bioinformaticians and researchers can now reference controlled-access or public genomic data directly in Nextflow pipelines without manual URL resolution or special syntax.
Latest version: 0.1.0
Total downloads: 0 View trends

Summary

nf-drs is a Nextflow plugin for accessing GA4GH DRS objects with drs:// URIs — including Gen3 commons such as NCI CRDC, AnVIL, and BioData Catalyst.

Write file('drs://<host>/<object_id>') anywhere a path is expected (process inputs, samplesheets, Channel.fromPath) and the plugin resolves the object to a presigned URL and streams it, transparently. It registers a read-only NIO filesystem for the drs URI scheme, so no special syntax is needed.

DRS resolution is a GA4GH standard and identical across servers:

  1. GET https://<host>/ga4gh/drs/v1/objects/<object_id> → object metadata + access methods
  2. GET https://<host>/ga4gh/drs/v1/objects/<object_id>/access/<access_id> → presigned URL
  3. stream the presigned URL

Only authentication differs between servers, so it is pluggable via drs.authProvider:

provider behaviour status
gen3 (default) Exchanges a Gen3 api_key for a short-lived bearer token at the Fence token endpoint (/user/credentials/cdis/access_token), caches it per host, refreshes on expiry/401. Mirrors gen3.auth.Gen3Auth. Implemented and verified end-to-end against NCI CRDC.
bearer Sends a directly-supplied OAuth2 access token unchanged. Implemented and unit-tested; not yet validated against a live server.
none Public/open objects; no Authorization header. Implemented and unit-tested; not yet validated against a live server.

The DRS server host is always taken from the URI — no commons is hardcoded.

Get Started

Enable the plugin and configure auth in nextflow.config:

plugins {
    id 'nf-drs@0.1.0'
}

drs {
    authProvider = 'gen3'          // 'gen3' | 'bearer' | 'none'
    authSecret = 'GEN3_API_KEY'    // Nextflow secret holding the credential
    // tokenEndpointPath = '/user/credentials/cdis/access_token'  // gen3 only
    // accessProtocol = 's3'       // prefer a specific access method (else: s3, gs, first)
}

Set the credential as a Nextflow secret:

# gen3: the "api_key" value from your Gen3 credentials.json
nextflow secrets set GEN3_API_KEY <api_key>

# bearer: an OAuth2 access token
nextflow secrets set GEN3_API_KEY <access_token>

For Gen3/CRDC controlled-access data you must first be authorized (e.g. dbGaP approval for the relevant study) and download an API key from the commons' portal.

Examples

Access a DRS object directly:

workflow {
    bam = file('drs://nci-crdc.datacommons.io/dg.4DFC/0123-4567-89ab')
    FASTQC(bam)
}

Read DRS URIs from a samplesheet:

Channel.fromPath('samples.csv')
    .splitCsv(header: true)
    .map { row -> tuple(row.sample_id, file(row.drs_uri)) }
    | FASTQC
sample_id,drs_uri
sample1,drs://nci-crdc.datacommons.io/dg.4DFC/0123-4567-89ab

A runnable validation pipeline is provided under validation/:

nextflow secrets set GEN3_API_KEY <api_key>
nextflow run validation/main.nf \
  --drs_host nci-crdc.datacommons.io \
  --object_id dg.4DFC/<guid>

License

Apache License 2.0. See COPYING.

Nextflow version >=25.04.0
Depends On -
Release Date 18 Jun 2026 12:23:02 (UTC)
Release Notes https://github.com/Sage-Bionetworks-Workflows/nf-drs/releases/tag/0.1.0
Download URL https://registry.nextflow.io/api/v1/plugins/nf-drs/0.1.0/download/nf-drs-0.1.0.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-drs/blobs/sha256:1f1d11cb9cb869b51a40216dacd9819d2f2103f3f612aa67eb9bf758b9d303d0
Size 49.1 KB
Checksum 08416a2eb7894f7b88863b25214e46702f1f8ff9d26f24fb103763e6fa382368ff993b089da10205eae9e71e4db7a5f3ce9f8f04bb3a73d41d17c63907f56941
Total downloads 0 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.1.0 >=25.04.0 18 Jun 2026 12:23:02 (UTC) 0