Snippet is a programming term for a small region of re-usable source code, machine code, or text, and Nextflow is both a Domain-Specific Language for writing data pipelines and a pipeline orchestrator. For more information about Nextflow, check the official site and documentation. For community training material, this link is a greaaaaaat place to start! :smiley:
This repository contains a collection of numerous solutions I have worked on throughout the past months as a Nextflow and nf-core Developer Advocate at Seqera Labs providing community support to numerous users around the world. I haven't saved all the snippets I created, but as I have now answered over 500 questions in this period, there are indeed quite a few I have kept when I found the solution interesting enough :satisfied:
Below, you'll find links to Markdown documents in this repository explaining the issue followed by the snippet that solves it.
countBy
operator for channels consisting of single elements or tuplespublishDir
paths for a specific tasknextflow.config
fileIf you're looking for more snippets, you can find plenty at Nextflow Patterns.