Skipping processes in an nf-core pipeline

You may want to run an nf-core pipeline, without having to go through all the steps. Some pipelines such as sarek will already have you covered with pipeline options such as --skip_tools (check here), but what if this specific nf-core pipeline doesn’t provide you with this feature? (It’s still worth checking the pipeline page, as some will have skip options, though not as powerful as sarek’s one).

All nf-core modules check ext.when, which is passed to the when block in the process body. With that, you can disable any process and go step by step if you like using a custom config such as:

process {
    withName: 'FASTQC' {
        ext.when = false
    }

With the configuration above, the FASTQC process will be skipped. You can use process selectors and regular expressions to make very powerful decisions. Check the one below:

    withName: '!(FASTQC|MULTIQC)' {
        ext.when = false

In the situation above, you are disabling everything but FASTQC and MULTIQC.

Thanks to @mahesh.binzerpanchal for this powerful insight originally here.

1 Like