agentleFS
Kdevos12Kdevos12/ALKYL/skills/nextflow/SKILL.md

nextflow

Skill6 starsChanged 9 months agoMITView on GitHub

Use when writing, debugging, or optimizing Nextflow pipelines for computational chemistry, bioinformatics, or HPC workflows. Covers DSL2 syntax, process/channel/workflow composition, configuration, containers, and execution on HPC/cloud.

  • Pipes a download into a shell

The file

Files
SKILL.md

Nextflow

Workflow language for scalable and reproducible computational pipelines — write once, run anywhere (local, HPC, AWS, GCP, Azure).

When to Use This Skill

  • Writing or debugging Nextflow DSL2 pipelines (.nf files)
  • Composing processes into workflows with channel dataflow
  • Configuring executors (SLURM, LSF, AWS Batch, Google Batch)
  • Managing containers (Docker, Singularity/Apptainer, Conda) for reproducibility
  • Building chemistry/bioinformatics pipelines (BLAST, aligners, RDKit, ORCA, Gaussian)
  • Understanding -resume / cache behavior
  • Modularizing pipelines with include / module aliases

Quick Start — Minimal DSL2 Pipeline

// main.nf
params.input  = 'data/*.sdf'
params.outdir = 'results'

process RUN_ORCA {
    publishDir params.outdir, mode: 'copy'
    container  'quay.io/biocontainers/orca:5.0.4--h2f1ea3e_0'

    input:
    path mol

    output:
    path "*.out"

    script:
    """
    orca ${mol}.inp > ${mol}.out
    """
}

workflow {
    mols = channel.fromPath(params.input)
    RUN_ORCA(mols)
}

Run it:

nextflow run main.nf -profile docker -resume

Router — What to Read

TaskReference
Processes, channels, input/output qualifiers, script typesreferences/core-concepts.md
Workflows, named workflows, pipe/and operators, modules, compositionreferences/pipeline-patterns.md
nextflow.config, executors, profiles, HPC/cloud, cache/resumereferences/execution-config.md
Docker, Apptainer/Singularity, Conda, Wave, reproducibilityreferences/containers-envs.md
Channel factories, operators, file handling, remote filesreferences/files-channels.md
Chemistry/bioinformatics patterns (BLAST, RDKit, ORCA, MD)references/chem-bioinformatics.md

Key Concepts at a Glance

ConceptWhat it is
processRuns a script/command; defines input, output, directives
workflowComposes processes and operators via dataflow channels
channelAsynchronous stream of values connecting processes
val / pathInput qualifiers — val for data, path for staged files
publishDirCopies task output to a user-visible results directory
executorWhere tasks run: local, slurm, awsbatch, google-batch…
-resumeReuses cached task results; skips unchanged tasks
moduleReusable .nf file included with include { X } from './module'

Installation

# Requires Java 11+
curl -s https://get.nextflow.io | bash
./nextflow self-update          # upgrade to latest
nextflow -version               # verify

# Enable DSL2 strict parser (recommended for new pipelines)
export NXF_SYNTAX_PARSER=v2

Related Skills

  • rdkit — Molecular preprocessing before pipeline ingestion
  • deepchem — ML models on molecular datasets (can be wrapped in NF processes)
  • cheminformatics — SMILES, molecular file formats (SDF, MOL2, XYZ)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.