Open nick-youngblut opened 1 year ago
Hm.. If you place the main.nf
right after run
it works, but when it's at the end it doesn't. Yeah, definitely looks like a bug!
Looks like the run command just expects the project name to be the first argument:
also, using -with-report main.nf
means that you want the pipeline to create the report main.nf
.
cf https://www.nextflow.io/docs/latest/tracing.html#execution-report
Good point, @maxulysse !
I think this is the expected behavior. Not just with Nextflow but with CLIs in general -- positional args must always come before named args. However, I noticed the docs are incorrect: https://nextflow.io/docs/latest/cli.html#run
$ nextflow run [options] [project]
@mribeirodantas can you correct the docs here? I would also check the entire CLI docs page to see if this error was made for other commands. And the CLI output in Nextflow.
Sure! I saw the docs page yesterday and was wondering if this was really true. I will work on that.
It would help to clarify in the nextflow run
docs which parameters are boolean versus which require a >=1 argument:
-with-charliecloud
Enable process execution in a Charliecloud container runtime
-with-conda
Use the specified Conda environment package or file (must end with
.yml|.yaml suffix)
-with-dag
Create pipeline DAG file
-with-docker
Enable process execution in a Docker container
-N, -with-notification
Send a notification email on workflow completion to the specified
recipients
-with-podman
Enable process execution in a Podman container
-with-report
Create processes execution html report
-with-singularity
Enable process execution in a Singularity container
-with-timeline
Create processes execution timeline file
-with-tower
Monitor workflow execution with Seqera Tower service
-with-trace
Create processes execution tracing file
-with-weblog
Send workflow status messages via HTTP to target URL
-without-conda
Disable the use of Conda environments
-without-docker
Disable process execution with Docker
Default: false
-without-podman
Disable process execution in a Podman container
-w, -work-dir
Directory where intermediate result files are stored
I took another look here and it turns out I gave the wrong diagnosis. The problem is that some options like -with-report
expect an argument but Nextflow will insert a default "-" if no argument is given. Unfortunately I don't think we can fix this with the current CLI.
We are working on a new CLI called nf
(see #3595). I just tested it and I can do the following:
nf run --with-trace --with-report -- main.nf
The double dash allows you to separate positional arguments from optional arguments. But it doesn't seem to work with the current CLI. So I will tie this issue to the new CLI effort.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bug report
If one runs
nextflow run
with-with-report
or-with-trace
(and provides a "main" nextflow workflow file as input, such asmain.nf
), then one gets the error:There is no info in https://www.nextflow.io/docs/latest/tracing.html that I can find on how to set the project name. I have tried to set the project name via:
...but that still results in the issue.
Expected behavior and actual behavior
Clear information on how to set the project name when using
-with-report
or-with-trace
.Steps to reproduce the problem
Nextflow version: 22.10.4.5836
Installed Nextflow via bioconda
Run
Config
Environment