Possibility to specify file path in paramsText?

Hi!

I am trying to launch a workflow and I can not find any documentation about whether it is possible to specify a file path in the paramsText? I know that for the configText, I can just go “includeConfig ‘path/to/some/config/file.json’” and it will read the file contents. Is there a similar way to provide a file path for the parameters?

Kind regards,
Isak

Hi @islean,

So if I understood well, you would want to include a params-file (in yaml or in json) which contains default values for params within a workflow?
I do think I would usually handle that particular case of a default set of values with a specific profile for a pipeline.
Can you please provide more information?

Hi!

No, I was a bit unclear! So we are thinking of migrating from using the CLI to the seqera platform, and we have some default parameters for the workflow configured in a pipeline, which I can fetch from /pipelines/:pipelineId/launch. But then we have variable parameters which can not be determined from the workflow alone. In our current setup, these are written to a file with a predictable file name. When running the CLI on the cluster, we write e.g. --params-file /path/to/some/file.yaml.

If I now run a cURL towards the POST /workflow/launch endpoint from my local device, or some VM which does not necessarily have read access to the cluster where we actually have the params file, I am wondering if I can just specify the path to the file in some way? So if I know that the path on the cluster is /path/to/some/file.yaml, but I can not read that file, can I still provide it in the request? Or would I need read access to the file and dump the contents into a yaml/json formatted string and provide it as the paramsText in the request body?

Thanks!
Isak

Hi Isak!

Instead of using the API endpoint directly, you might want to use the tw cli. It has some convenient logic for reading files containing the parameters the same way the Nextflow CLI does:

If you do need to use the API endpoint directly, then the configText and paramsText params are what you need to feed into the API call. You can read about those in the swagger docs here.

Hopefully one of those two solutions works for your use case!

Hi!

Sorry, we are not looking to use a CLI, but thanks either way! I have looked at the docs and thought that since you can write the configText as

“configText”: “includeConfig ‘/path/to/some/file.json’”

despite it not being explicitly written in the documentation, maybe there was similar support for the params file. But alas, maybe there is no such thing. For now, we are planning on running the commands from somewhere with read access to the parameters so it should be no issue dumping the contents into the request though.

Thanks!

I agree, this would be a useful feature. I too searched for a way to “include” a params (YAML) file of parameter.

It would be great to be able to do this in the config, just like you can already with JSON.

includeConfig "path/to/some/params.yml"

It would also be useful to be able to upload a params.yml file in the Seqera run launcher, rather than editing/pasting YAML (or using the schema-based web form).