Running a Nextflow pipeline from a Git repository: Setting defaults

Nextflow pipelines can be run directly from their Git repository URL. It’s as simple as:

nextflow run nextflow-io/hello

Under the hood, Nextflow will choose GitHub as Git provider by default (https://github.com/nextflow-io/hello, for the example above), but you can set this with the command-line interface option -hub. Other options are gitlab and bitbucket. The command above will download the GitHub - nextflow-io/hello: Classic hello world script in Nextflow language git repository, under the stickied branch (usually main or master) and run the main.nf script at the root of the git project.

But what if my pipeline main script file is not main.nf? Or what if I want to download the pipeline code under a branch name other than master? And if I want my pipeline to require a Nextflow version that is not older than X.Y.Z? That’s what the manifest scope is for. See the snippet below for an example, saved in your nextflow.config file:

manifest {
  description = 'Proof of concept pipeline implemented with Nextflow for X, Y and Z' 
  author = 'Marcel Ribeiro-Dantas'
  nextflowVersion = '>=23.04.0'
  manifest.defaultBranch = 'main'
  manifest.mainScript = 'script.nf'
}

For an nf-core pipeline example, check nf-core/RNAseq here. And if you want to read more about the manifest scope, click here.

3 Likes