×

nf-synapse @ 0.1.1

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 within pipelines, supporting versioned files and automatic authentication. It solves the problem of managing biomedical research data stored in Synapse by allowing seamless file access in samplesheets and output publishing. Researchers and bioinformaticians using Nextflow for collaborative biomedical projects would use this plugin to work with Synapse-hosted datasets without manual downloads or custom file handling logic.
Latest version: 0.1.2
Total downloads: 40 View trends

Summary

A Nextflow plugin for accessing Synapse (Sage Bionetworks) files using syn:// URIs. The plugin enables transparent file access in pipelines, supporting both reading Synapse files as process inputs and publishing pipeline outputs directly to Synapse folders. Features include support for versioned files, automatic subfolder creation, secure authentication via Nextflow secrets, and the ability to use Synapse URIs in samplesheets.

Get Started

Installation

Note: This plugin is not yet published to the Nextflow plugin registry. You must build and install locally.

# Clone the repo
git clone https://github.com/Sage-Bionetworks-Workflows/nf-synapse-plugin.git
cd nf-synapse-plugin

# Build and install to ~/.nextflow/plugins
make install

Then add to your nextflow.config:

plugins {
    id 'nf-synapse@0.1.0'
}

synapse {
    authToken = secrets.SYNAPSE_AUTH_TOKEN
}

Authentication

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:

Optional Configuration

synapse {
    authToken = secrets.SYNAPSE_AUTH_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
    """
}

License

Apache License 2.0

Nextflow version >=25.04.0
Depends On -
Release Date 25 Feb 2026 09:27:46 (UTC)
Release Notes https://github.com/Sage-Bionetworks-Workflows/nf-synapse-plugin/releases/tag/0.1.1
Download URL https://registry.nextflow.io/api/v1/plugins/nf-synapse/0.1.1/download/nf-synapse-0.1.1.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-synapse/blobs/sha256:b9d2c11c29b2b548873b51599fa829726ae7a84ca6b0b15a1c2db90e4f682ae0
Size 58.3 KB
Checksum cdb6d70fa9523dffb9f6dc3580af2657179d8355409ccbfdc6427ad8a3246e9cac8d38e67bbb1d40035cbef79ede8ef678dca0f0093263fdd4479fe4cceab9ac
Total downloads 17 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.1.2 >=25.04.0 25 Feb 2026 09:47:15 (UTC) 17
0.1.1 >=25.04.0 25 Feb 2026 09:27:46 (UTC) 17
0.1.0 >=25.04.0 23 Feb 2026 15:13:09 (UTC) 6