Generated banner for Nextflow Development
Generated logo for Nextflow Development

Nextflow Development

AnthropicOfficialPublished by Anthropic

  • Skill
  • Workflow
  • Science and research
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Run nf-core bioinformatics pipelines (rnaseq, sarek, atacseq) on sequencing data. Use when analyzing RNA-seq, WGS/WES, or ATAC-seq data—either local FASTQs or public datasets from GEO/SRA. Triggers on nf-core, Nextflow, FASTQ analysis, variant calling, gene expression, differential expression, GEO reanalysis, GSE/GSM/SRR accessions, or samplesheet creation.
— the description by Anthropic

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured workflow for researchers to execute nf-core bioinformatics pipelines. It guides users through environment validation, data acquisition from public repositories like GEO/SRA or local sources, samplesheet generation, and pipeline execution. It supports standard omics analyses including gene expression, variant calling, and chromatin accessibility, while ensuring the computing environment is correctly configured with Docker and Nextflow.

What it does

  • Validates system requirements including Docker, Nextflow, and Java versions.
  • Fetches and prepares public sequencing data from GEO/SRA accessions.
  • Automates the creation and validation of pipeline-specific samplesheets.
  • Executes nf-core pipelines for RNA-seq, Sarek, and ATAC-seq workflows.
  • Manages reference genome downloads and configuration.
  • Verifies analysis outputs and pipeline completion logs.

When to use it

  • When you need to perform large-scale omics analysis on local FASTQ files.
  • When reanalyzing public datasets from GEO/SRA.
  • When you require a standardized, reproducible pipeline for RNA-seq, WGS/WES, or ATAC-seq.
  • When setting up a new bioinformatics environment for nf-core pipeline execution.

Advantages

  • Standardizes bioinformatics workflows for non-specialists.
  • Reduces manual errors in samplesheet creation and environment setup.
  • Provides clear decision points for pipeline selection and configuration.
  • Includes built-in validation steps to ensure pipeline success.
  • Simplifies the integration of public data into local analysis pipelines.

Usage examples

“Run the rnaseq pipeline on my local FASTQ files.”
The agent will check your environment, help you generate a samplesheet, confirm the genome, and execute the nf-core/rnaseq pipeline.
“Analyze the public dataset GSE110004.”
The agent will fetch the study metadata, download the relevant FASTQ files, create the necessary samplesheet, and prepare the pipeline for execution.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/anthropics/nextflow-development/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nextflow-development.zip -d .agents/skills

Documentation by Anthropic

nf-core Pipeline Deployment

Run nf-core bioinformatics pipelines on local or public sequencing data.

Target users: Bench scientists and researchers without specialized bioinformatics training who need to run large-scale omics analyses—differential expression, variant calling, or chromatin accessibility analysis.

Workflow Checklist

- [ ] Step 0: Acquire data (if from GEO/SRA)
- [ ] Step 1: Environment check (MUST pass)
- [ ] Step 2: Select pipeline (confirm with user)
- [ ] Step 3: Run test profile (MUST pass)
- [ ] Step 4: Create samplesheet
- [ ] Step 5: Configure & run (confirm genome with user)
- [ ] Step 6: Verify outputs

Step 0: Acquire Data (GEO/SRA Only)

Skip this step if user has local FASTQ files.

For public datasets, fetch from GEO/SRA first. See references/geo-sra-acquisition.md for the full workflow.

Quick start:

# 1. Get study info
python scripts/sra_geo_fetch.py info GSE110004

# 2. Download (interactive mode)
python scripts/sra_geo_fetch.py download GSE110004 -o ./fastq -i

# 3. Generate samplesheet
python scripts/sra_geo_fetch.py samplesheet GSE110004 --fastq-dir ./fastq -o samplesheet.csv

DECISION POINT: After fetching study info, confirm with user:

  • Which sample subset to download (if multiple data types)

  • Suggested genome and pipeline

Then continue to Step 1.


Step 1: Environment Check

Run first. Pipeline will fail without passing environment.

python scripts/check_environment.py

All critical checks must pass. If any fail, provide fix instructions:

Docker issues
ProblemFix
Not installedInstall from https://docs.docker.com/get-docker/
Permission deniedsudo usermod -aG docker $USER then re-login
Daemon not runningsudo systemctl start docker
Nextflow issues
ProblemFix
Not installedcurl -s https://get.nextflow.io | bash && mv nextflow ~/bin/
Version < 23.04nextflow self-update
Java issues
ProblemFix
Not installed / < 11sudo apt install openjdk-11-jdk

Do not proceed until all checks pass. For HPC/Singularity, see references/troubleshooting.md.


Step 2: Select Pipeline

DECISION POINT: Confirm with user before proceeding.

Data TypePipelineVersionGoal
RNA-seqrnaseq3.22.2Gene expression
WGS/WESsarek3.7.1Variant calling
ATAC-seqatacseq2.1.2Chromatin accessibility

Auto-detect from data:

python scripts/detect_data_type.py /path/to/data

For pipeline-specific details:


Step 3: Run Test Profile

Validates environment with small data. MUST pass before real data.

nextflow run nf-core/<pipeline> -r <version> -profile test,docker --outdir test_output
PipelineCommand
rnaseqnextflow run nf-core/rnaseq -r 3.22.2 -profile test,docker --outdir test_rnaseq
sareknextflow run nf-core/sarek -r 3.7.1 -profile test,docker --outdir test_sarek
atacseqnextflow run nf-core/atacseq -r 2.1.2 -profile test,docker --outdir test_atacseq

Verify:

ls test_output/multiqc/multiqc_report.html
grep "Pipeline completed successfully" .nextflow.log

If test fails, see references/troubleshooting.md.


Step 4: Create Samplesheet

Generate automatically
python scripts/generate_samplesheet.py /path/to/data <pipeline> -o samplesheet.csv

The script:

  • Discovers FASTQ/BAM/CRAM files

  • Pairs R1/R2 reads

  • Infers sample metadata

  • Validates before writing

For sarek: Script prompts for tumor/normal status if not auto-detected.

Validate existing samplesheet
python scripts/generate_samplesheet.py --validate samplesheet.csv <pipeline>
Samplesheet formats

rnaseq:

sample,fastq_1,fastq_2,strandedness
SAMPLE1,/abs/path/R1.fq.gz,/abs/path/R2.fq.gz,auto

sarek:

patient,sample,lane,fastq_1,fastq_2,status
patient1,tumor,L001,/abs/path/tumor_R1.fq.gz,/abs/path/tumor_R2.fq.gz,1
patient1,normal,L001,/abs/path/normal_R1.fq.gz,/abs/path/normal_R2.fq.gz,0

atacseq:

sample,fastq_1,fastq_2,replicate
CONTROL,/abs/path/ctrl_R1.fq.gz,/abs/path/ctrl_R2.fq.gz,1

Step 5: Configure & Run

5a. Check genome availability
python scripts/manage_genomes.py check <genome>
# If not installed:
python scripts/manage_genomes.py download <genome>

Common genomes: GRCh38 (human), GRCh37 (legacy), GRCm39 (mouse), R64-1-1 (yeast), BDGP6 (fly)

5b. Decision points

DECISION POINT: Confirm with user:

  1. Genome: Which reference to use

  2. Pipeline-specific options:

    • rnaseq: aligner (star_salmon recommended, hisat2 for low memory)

    • sarek: tools (haplotypecaller for germline, mutect2 for somatic)

    • atacseq: read_length (50, 75, 100, or 150)

5c. Run pipeline
nextflow run nf-core/<pipeline> \
    -r <version> \
    -profile docker \
    --input samplesheet.csv \
    --outdir results \
    --genome <genome> \
    -resume

Key flags:

  • -r: Pin version

  • -profile docker: Use Docker (or singularity for HPC)

  • --genome: iGenomes key

  • -resume: Continue from checkpoint

Resource limits (if needed):

--max_cpus 8 --max_memory '32.GB' --max_time '24.h'

Step 6: Verify Outputs

Check completion
ls results/multiqc/multiqc_report.html
grep "Pipeline completed successfully" .nextflow.log
Key outputs by pipeline

rnaseq:

  • results/star_salmon/salmon.merged.gene_counts.tsv - Gene counts

  • results/star_salmon/salmon.merged.gene_tpm.tsv - TPM values

sarek:

  • results/variant_calling/*/ - VCF files

  • results/preprocessing/recalibrated/ - BAM files

atacseq:

  • results/macs2/narrowPeak/ - Peak calls

  • results/bwa/mergedLibrary/bigwig/ - Coverage tracks


Quick Reference

For common exit codes and fixes, see references/troubleshooting.md.

Resume failed run
nextflow run nf-core/<pipeline> -resume

References


Disclaimer

This skill is provided as a prototype example demonstrating how to integrate nf-core bioinformatics pipelines into Claude Code for automated analysis workflows. The current implementation supports three pipelines (rnaseq, sarek, and atacseq), serving as a foundation that enables the community to expand support to the full set of nf-core pipelines.

It is intended for educational and research purposes and should not be considered production-ready without appropriate validation for your specific use case. Users are responsible for ensuring their computing environment meets pipeline requirements and for verifying analysis results.

Anthropic does not guarantee the accuracy of bioinformatics outputs, and users should follow standard practices for validating computational analyses. This integration is not officially endorsed by or affiliated with the nf-core community.

Attribution

When publishing results, cite the appropriate pipeline. Citations are available in each nf-core repository's CITATIONS.md file (e.g., https://github.com/nf-core/rnaseq/blob/3.22.2/CITATIONS.md).

Licenses

Files

references/geo-sra-acquisition.md

GEO/SRA Data Acquisition

Download raw sequencing data from NCBI GEO/SRA and prepare it for nf-core pipelines.

Use this when: Reanalyzing published datasets, validating findings, or comparing results against public cohorts.

Table of Contents

  • Workflow Overview

  • Step 1: Fetch Study Information

  • Step 2: Review Sample Groups

  • Step 3: Download FASTQ Files

  • Step 4: Generate Samplesheet

  • Step 5: Run nf-core Pipeline

  • Supported Pipelines

  • Supported Organisms

  • Complete Example

  • Troubleshooting


Workflow Overview

Example: "Find differentially expressed genes in GSE309891 (drug-treated vs control)"

┌─────────────────────────────────────────────────────────────────┐
│                    GEO/SRA DATA ACQUISITION                     │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
                 ┌────────────────────────┐
                 │   Fetch study info     │
                 │   • Query NCBI/SRA     │
                 │   • Get metadata       │
                 │   • Detect organism    │
                 │   • Identify data type │
                 └────────────────────────┘
                              │
                              ▼
                 ┌────────────────────────┐
                 │   Present summary      │
                 │   • Organism: Human    │
                 │   • Genome: GRCh38     │
                 │   • Type: RNA-Seq      │
                 │   • Pipeline: rnaseq   │
                 │   • Samples: 12        │
                 │     (6 treated,        │
                 │      6 control)        │
                 │   • Size: ~24 GB       │
                 └────────────────────────┘
                              │
                              ▼
                    ┌─────────────────┐
                    │  USER CONFIRMS  │◄──── Decision point
                    │  genome/pipeline│
                    └─────────────────┘
                              │
                              ▼
                 ┌────────────────────────┐
                 │   Select samples       │
                 │   • Group by condition │
                 │   • Show treated/ctrl  │
                 └────────────────────────┘
                              │
                              ▼
                    ┌─────────────────┐
                    │  USER SELECTS   │◄──── Decision point
                    │  sample subset  │
                    └─────────────────┘
                              │
                              ▼
                 ┌────────────────────────┐
                 │   Download FASTQs      │
                 │   • 24 files (R1+R2)   │
                 │   • Parallel transfers │
                 │   • Auto-resume        │
                 └────────────────────────┘
                              │
                              ▼
                 ┌────────────────────────┐
                 │   Generate samplesheet │
                 │   • Map SRR to files   │
                 │   • Pair R1/R2         │
                 │   • Assign conditions  │
                 └────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                    NF-CORE PIPELINE EXECUTION                   │
│              (Continue with Step 1 of main workflow)            │
└─────────────────────────────────────────────────────────────────┘

Instructions for Claude

When assisting users with GEO/SRA data acquisition:

  1. Always fetch study info first to show the user what data is available

  2. Ask for confirmation before downloading - Present the sample groups and sizes, then ask which subset to download using AskUserQuestion

  3. Suggest appropriate genome and pipeline based on the organism and data type

  4. Return to main SKILL.md workflow after data preparation is complete

Example confirmation question:

Question: "Which sample group would you like to download?"
Options:
  - "RNA-Seq:PAIRED (42 samples, ~87 GB)"
  - "RNA-Seq:SINGLE (7 samples, ~4.5 GB)"
  - "All samples (49 samples, ~92 GB)"

Step 1: Fetch Study Information

Get metadata about a GEO study before downloading.

python scripts/sra_geo_fetch.py info <GEO_ID>

Example:

python scripts/sra_geo_fetch.py info GSE110004

Output includes:

  • Study title and summary

  • Organism (with auto-suggested genome)

  • Number of samples and runs

  • Data types (RNA-Seq, ATAC-seq, etc.)

  • Estimated download size

  • Suggested nf-core pipeline

Save info to JSON:

python scripts/sra_geo_fetch.py info GSE110004 -o study_info.json

Step 2: Review Sample Groups

View sample groups organized by data type and layout. This is useful for studies with mixed data types.

python scripts/sra_geo_fetch.py groups <GEO_ID>

Example output:

Sample Group          Count Layout     GSM Range                    Est. Size
--------------------------------------------------------------------------------
RNA-Seq                  42 PAIRED     GSM2879618...(42 samples)      87.4 GB
RNA-Seq                   7 SINGLE     GSM2976181-GSM2976187           4.5 GB
--------------------------------------------------------------------------------
TOTAL                    49                                           91.9 GB

Available groups for --subset option:
  1. "RNA-Seq:PAIRED" - 42 samples (~87.4 GB)
  2. "RNA-Seq:SINGLE" - 7 samples (~4.5 GB)

List individual runs:

python scripts/sra_geo_fetch.py list <GEO_ID>

# Filter by data type
python scripts/sra_geo_fetch.py list GSE110004 --filter "RNA-Seq:PAIRED"

DECISION POINT: Review the sample groups. Decide which subset to download if the study has multiple data types.


Step 3: Download FASTQ Files

Download FASTQ files from ENA (faster than SRA).

python scripts/sra_geo_fetch.py download <GEO_ID> -o <OUTPUT_DIR>

Options:

  • -o, --output: Output directory (required)

  • -i, --interactive: Interactively select sample group to download

  • -s, --subset: Filter by data type (e.g., "RNA-Seq:PAIRED")

  • -p, --parallel: Parallel downloads (default: 4)

  • -t, --timeout: Download timeout in seconds (default: 600)

Use -i flag for interactive sample selection when the study has multiple data types:

python scripts/sra_geo_fetch.py download GSE110004 -o ./fastq -i

Interactive output:

============================================================
  SELECT SAMPLE GROUP TO DOWNLOAD
============================================================

  [1] RNA-Seq (paired)
      Samples: 42
      GSM: GSM2879618...(42 samples)
      Size: ~87.4 GB

  [2] RNA-Seq (single)
      Samples: 7
      GSM: GSM2976181-GSM2976187
      Size: ~4.5 GB

  [0] Download ALL (49 samples)
------------------------------------------------------------

Enter selection (0-2):
Direct Subset Selection

Alternatively, specify the subset directly:

# Download only RNA-Seq paired-end data
python scripts/sra_geo_fetch.py download GSE110004 -o ./fastq \
    --subset "RNA-Seq:PAIRED" --parallel 6

Note: Downloads automatically skip existing files. Resume interrupted downloads by re-running the command.


Step 4: Generate Samplesheet

Create a samplesheet compatible with nf-core pipelines.

python scripts/sra_geo_fetch.py samplesheet <GEO_ID> \
    --fastq-dir <FASTQ_DIR> \
    -o samplesheet.csv

Options:

  • -f, --fastq-dir: Directory containing downloaded FASTQ files (required)

  • -o, --output: Output samplesheet path (default: samplesheet.csv)

  • -p, --pipeline: Target pipeline (auto-detected if not specified)

Example:

python scripts/sra_geo_fetch.py samplesheet GSE110004 \
    --fastq-dir ./fastq \
    -o samplesheet.csv

Output: The script will:

  1. Create samplesheet in the format required by the target pipeline

  2. Display suggested genome reference

  3. Show suggested nf-core command


Step 5: Run nf-core Pipeline

After generating the samplesheet, the script provides a suggested command.

Example output:

Suggested command:
   nextflow run nf-core/rnaseq \
       --input samplesheet.csv \
       --outdir results \
       --genome R64-1-1 \
       -profile docker

DECISION POINT: Review and confirm:

  1. Is the suggested pipeline correct?

  2. Is the genome reference correct for your organism?

  3. Do you need additional pipeline options?

Then return to the main SKILL.md workflow (Step 1: Environment Check) to proceed with pipeline execution.


Supported Pipelines

The skill auto-detects appropriate pipelines based on library strategy. Pipelines marked with ★ are fully supported with configs, samplesheet generation, and documentation. Others are suggested but require manual setup following nf-core documentation.

Library StrategySuggested PipelineSupport
RNA-Seqnf-core/rnaseq★ Full
ATAC-seqnf-core/atacseq★ Full
WGS/WXSnf-core/sarek★ Full
ChIP-seqnf-core/chipseqManual
Bisulfite-Seqnf-core/methylseqManual
miRNA-Seqnf-core/smrnaseqManual
Ampliconnf-core/ampliseqManual

Supported Organisms

Common organisms with auto-suggested genomes:

OrganismGenomeNotes
Homo sapiensGRCh38Human reference
Mus musculusGRCm39Mouse reference
Saccharomyces cerevisiaeR64-1-1Yeast S288C
Drosophila melanogasterBDGP6Fruit fly
Caenorhabditis elegansWBcel235C. elegans
Danio rerioGRCz11Zebrafish
Arabidopsis thalianaTAIR10Arabidopsis
Rattus norvegicusRnor_6.0Rat

See scripts/config/genomes.yaml for the full list.


Complete Example

Reanalyze GSE110004 (yeast RNA-seq):

# 1. Get study info and sample groups
python scripts/sra_geo_fetch.py info GSE110004

# 2. Download with interactive selection
python scripts/sra_geo_fetch.py download GSE110004 -o ./fastq -i
# Select option [1] for RNA-Seq paired-end samples

# 3. Generate samplesheet
python scripts/sra_geo_fetch.py samplesheet GSE110004 \
    --fastq-dir ./fastq \
    -o samplesheet.csv

# 4. Run nf-core/rnaseq (continue with main SKILL.md workflow)
nextflow run nf-core/rnaseq \
    --input samplesheet.csv \
    --outdir results \
    --genome R64-1-1 \
    -profile docker
Alternative: Non-interactive Download
# Review sample groups first
python scripts/sra_geo_fetch.py groups GSE110004

# Download specific subset directly
python scripts/sra_geo_fetch.py download GSE110004 \
    --subset "RNA-Seq:PAIRED" \
    -o ./fastq \
    --parallel 4

Troubleshooting

ENA Download Fails

If ENA downloads fail, the data may need to be fetched directly from SRA:

# Create SRA tools environment
conda create -n sra_tools -c bioconda sra-tools

# Download with prefetch + fasterq-dump
conda run -n sra_tools prefetch SRR6357070
conda run -n sra_tools fasterq-dump SRR6357070 -O ./fastq
No SRA Runs Found

Some GEO datasets only have processed data, not raw sequencing reads. Check:

python scripts/sra_geo_fetch.py info <GEO_ID>

If "Runs: 0", the dataset may not have raw data in SRA.

SuperSeries Support

GEO SuperSeries (which contain multiple SubSeries) are automatically handled. The tool will:

  1. Detect that a GEO ID is a SuperSeries

  2. Find the linked BioProject accession

  3. Fetch all SRA runs from the BioProject

Example: GSE110004 is a SuperSeries that links to BioProject PRJNA432544.

Genome Not Recognized

If the organism is not in the genome mapping, manually specify the genome:

# Check available iGenomes
python scripts/manage_genomes.py list

# Or provide custom reference files to nf-core
nextflow run nf-core/rnaseq --fasta /path/to/genome.fa --gtf /path/to/genes.gtf

Requirements

  • Python 3.8+

  • requests library (optional but recommended)

  • pyyaml library (optional, for genome config)

  • Network access to NCBI and ENA

Install optional dependencies:

pip install requests pyyaml

Requirements and compatibility

Written for: Claude Code, Claude apps

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs network access, Needs Python

Security

What our scanner noticed· Medium risk

  • Instructions that use the network
  • Downloads piped into a shell
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Anthropic
Publisher
Anthropic (Official)
Source
anthropics/knowledge-work-plugins · bio-research/skills/nextflow-development · commit e050c2e
Licence
Apache License 2.0 (redistribution allowed)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Anthropic.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nextflow-development.zip