nextflow-io / nextflow-io/nextflow

Add an env var which points to a config file for all pipelines

Open
#6,151 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue lang/config
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

New feature

Currently there are several ways to provide a nextflow.config and I suggest allowing an extra one, an environment variable (e.g. NXF_CONFIG) which points to an arbitrary path.

Use case

This would allow the provision of a nextflow config in a location which is not writable by users since currently NXF_HOME / NXF_WORK must be writable to be functional.
The only way to do this currently as far as I understand it is via a bash alias alias nextflow="nextflow -c {some_config}" which is quite fragile or adding the file to the users homedir which runs into the same problem as above, it also makes updating the config more complex and fragile due to how our homedirs work.

This would be handy for my specific usecase where we run a cluster in which users must use a specific nextflow config to make proper use of our cluster resources (k8s) and we don't want users to notice this or have the ability to break the config by modifying it.

Suggested implementation

Covered above I think.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Nextflow configuration documentation and tracing how the nextflow command currently discovers nextflow.config files, including NXF_HOME and NXF_WORK. Done means an NXF_CONFIG-style environment variable can point to an arbitrary config path and that config is applied for all pipelines without requiring users to modify it.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.