Using nf-core configs outside nf-core
When you’ve been working with nf-core pipelines for a while, you often will get very used to many of the convenience functionality offered by the wider nf-core infrastructure.
One such thing is the centralised nf-core/configs repository of pre-configured configuration files that allow nf-core pipelines to run optimally on institutional clusters via the -profile
parameter, e.g. -profile uppmax
. A list of existing institutional profiles can be seen on the nf-core website.
One great thing about nf-core/configs is that they aren’t just restricted to nf-core pipelines, they can also be used in fully fledged ‘unofficial’ nf-core pipelines but also in your own custom mini-scripts and pipelines!
Here we will describe the four things you will need to do in your custom script or pipeline to use nf-core institutional configs.
- Set default basic resources for all processes, e.g. in a
conf/base.config
At the bare minimum, the file should contain:
(or other sensible default values)
For a more sophisticated base.config
, see the full nf-core template
- Load the base config in the
nextflow.config
The following should be placed outside all scopes:
- Load nf-core’s institutional profile repository in the pipeline’s
nextflow.config
Note nf-core pipelines use a parameter for the URL to allow debugging.
- Finally Add the the
check_max
function tonextflow.config
The following should be placed outside all scopes, typically at the bottom of the file:
With this, you should be able to run nextflow run mainf.nf -profile <your_institutional_profile>
, and your custom script/pipeline should integrate nicely with your cluster!