Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept config from YAML/JSON #5398

Closed
bskubi opened this issue Oct 11, 2024 · 7 comments
Closed

Accept config from YAML/JSON #5398

bskubi opened this issue Oct 11, 2024 · 7 comments

Comments

@bskubi
Copy link

bskubi commented Oct 11, 2024

I am working on a Python-based guided-track tool to let users set config for my Nextflow pipeline. I wrote a parser that can format Python dicts into a nextflow.config file. This is relatively easy as I am starting with a structured object.

However, going in the reverse direction will be harder, if I want to write my own parser for a nextflow.config file. I would like to avoid this. Is there an easy way to convert a nextflow.config file to something more standard, like JSON or YAML? Or could such a feature be implemented? I think an extra benefit is that this would potentially allow Nextflow pipelines with complex config to be "driven" by some other process from arbitrary other programming languages. It would become relatively straightforward to create new user interfaces for building config for a specific pipeline and running it.

@pditommaso
Copy link
Member

Using nextflow config -f print the config as dot property notation. it should be relatively easy to convert to json having that

@pditommaso
Copy link
Member

I wanted to give a try to this, I've added -o yaml and -o json output options to the config command.

@bentsherman
Copy link
Member

We are working on a config parser for Nextflow #4744 , but agree that it would be good to support JSON/YAML input/output for integrating with external systems

#5399 will add JSON/YAML output, so beyond that we just need to add JSON/YAML input in the run command

@pditommaso
Copy link
Member

Solved by #5399 and #5408

@bentsherman
Copy link
Member

I think we still need to implement the other direction i.e. accepting JSON/YAML config files as input

@pditommaso
Copy link
Member

To be discussed. That could be a good option, but it should be considered as a replacement of current config. For that we have #2723

@bentsherman
Copy link
Member

Indeed. I'll add some notes there. @bskubi feel free to follow #2723 for updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants