×

nf-synapse @ 0.1.3

Provider: Sage Bionetworks
Claimed: 02 Feb 2026 18:35:23 (UTC)
Description: This Nextflow plugin integrates with Synapse (Sage Bionetworks) to enable transparent reading and writing of files using `syn://` URIs directly in pipelines, solving the problem of accessing cloud-hosted research data without manual downloads. It supports versioned files, secure authentication, and samplesheet integration, making it ideal for bioinformaticians and researchers running nf-core pipelines that need to work with Synapse-hosted datasets.
Latest version: 0.1.3
Total downloads: 280 View trends

Summary

A Nextflow plugin for accessing Synapse (Sage Bionetworks) files using syn:// URIs. The plugin enables transparent reading of Synapse files directly in pipelines and publishing of pipeline outputs to Synapse folders using publishDir. It supports versioned files, automatic subfolder creation, secure authentication via Nextflow secrets, and integration with samplesheets including nf-core pipelines.

Get Started

Installation

Add to your nextflow.config:

plugins {
    id 'nf-synapse@0.1.1'
}

Nextflow will automatically download the plugin from the Nextflow plugin registry.

Alternatively, for local installation:

git clone https://github.com/Sage-Bionetworks-Workflows/nf-synapse-plugin.git
cd nf-synapse-plugin
make install

Configuration

Set your Synapse Personal Access Token as a Nextflow secret:

nextflow secrets set SYNAPSE_AUTH_TOKEN syn_pat_xxxxxxxxxx

You can create a Personal Access Token at: https://www.synapse.org/#!PersonalAccessTokens:

The plugin automatically looks for a secret named SYNAPSE_AUTH_TOKEN. Optional configuration:

synapse {
    authToken = secrets.MY_OTHER_TOKEN
    endpoint = 'https://repo-prod.prod.sagebase.org'  // default
}

Examples

Direct File Access

// Access a Synapse file (latest version)
synapse_file = file('syn://syn26947830')

// Access a specific version
versioned_file = file('syn://syn26947830.1')

In a Process

process ANALYZE {
    input:
    path input_file

    output:
    path "result.txt"

    script:
    """
    echo "Processing: ${input_file}"
    analyze.sh ${input_file} > result.txt
    """
}

workflow {
    synapse_file = file('syn://syn26947830')
    ANALYZE(synapse_file)
}

With Samplesheets

// samplesheet.csv:
// sample_id,synapse_uri
// sample1,syn://syn26947830
// sample2,syn://syn26947830.1

Channel.fromPath('samplesheet.csv')
    .splitCsv(header: true)
    .map { row -> tuple(row.sample_id, file(row.synapse_uri)) }
    .set { samples_ch }

samples_ch.view { sample_id, f -> "Sample: ${sample_id}, File: ${f.name}" }

Publishing to Synapse

params.outDir = 'syn://syn25858544'  // Synapse folder ID

process ANALYZE {
    publishDir params.outDir, mode: 'copy'

    input:
    path input_file

    output:
    path "results.txt"

    script:
    """
    analyze.sh ${input_file} > results.txt
    """
}

Publishing to Subfolders

process ANALYZE {
    publishDir "${params.outDir}/${sample_id}/results", mode: 'copy'

    input:
    tuple val(sample_id), path(input_file)

    output:
    path "output.txt"

    script:
    """
    analyze.sh ${input_file} > output.txt
    """
}

nf-core Samplesheet Integration

For pipelines like nf-core/rnaseq that validate filename patterns, append a decorative extension to the Synapse URI:

sample,fastq_1,fastq_2,strandedness
SAMPLE1,syn://syn1234567.fastq.gz,syn://syn1234568.fastq.gz,auto
SAMPLE2,syn://syn1234569.5.fastq.gz,syn://syn1234570.5.fastq.gz,auto

The plugin strips the .fastq.gz suffix for validation but stages files with their original Synapse filename.

License

Apache License 2.0

Nextflow version >=25.10.0
Depends On -
Release Date 24 Jun 2026 10:48:17 (UTC)
Release Notes https://github.com/Sage-Bionetworks-Workflows/nf-synapse-plugin/releases/tag/0.1.3
Download URL https://registry.nextflow.io/api/v1/plugins/nf-synapse/0.1.3/download/nf-synapse-0.1.3.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-synapse/blobs/sha256:c969d3e0456c5af7d357561214bfdf03be29147a8af63c04715c128b7f6fe649
Size 60.3 KB
Checksum 14959427d05da1140a28494e2084d34efb165a31a9516b4fe6c15a62d3a44bbbccd777d553327e41614696e22f9593001ffe128354da0f70a5f1e6eab5a0b55f
Total downloads 22 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.1.3 >=25.10.0 24 Jun 2026 10:48:17 (UTC) 22
0.1.2 >=25.04.0 25 Feb 2026 09:47:15 (UTC) 93
0.1.1 >=25.04.0 25 Feb 2026 09:27:46 (UTC) 88
0.1.0 >=25.04.0 23 Feb 2026 15:13:09 (UTC) 77