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

Make --outdir a mandatory parameter #1415

Closed
drpatelh opened this issue Feb 18, 2022 · 4 comments
Closed

Make --outdir a mandatory parameter #1415

drpatelh opened this issue Feb 18, 2022 · 4 comments

Comments

@drpatelh
Copy link
Member

drpatelh commented Feb 18, 2022

Description of feature

We need to re-assess what we set --outdir by default in the nf-core pipeline template.

It is currently set to ./results which is fine for shared file systems / HPC environments but with the growing adoption of Cloud this simply doesn't work anymore and can end up costing money and time if an absolute path isn't provided instead of a relative one. e.g. on AWS Batch, by default the results will get written to the head node and are lost with it.

We have tried to add a solution that checks if we are using -profile awsbatch and to raise an error if we aren't using an absolute path here but that will only work for those using -profile awsbatch and so isn't a generic solution.

The only solution I can see is to make --outdir a mandatory parameter. This would avoid silent failures at the very least and can easily be set to the current default value within a config albeit a local or institutional one.

@drpatelh
Copy link
Member Author

drpatelh commented Feb 20, 2022

One problem we have here is that if we set --outdir = null in nextflow.config then tracedir gets evaluated to null/pipeline_info even if --outdir ./results is specified on the CLI.

Wondering what the best solution is here 🤔 Ping @mahesh-panchal

CORRECTION: All is good here! I just realised that the reason I get an output dir called null is if you don't specify --outdir - in this case a schema validation error is generated asking you to use it. On adding it to the CLI then the trace files are published in ${params.outdir}/pipeline_info as expected.

As you were.

@pditommaso
Copy link

I think it would make more sense to address this on nextflow. Likely adding a configuration setting that when enable instructs Nextflow to resolve relative paths against the work-dir instead of the launching directory. We had already a chat with @jordeu at this regard. Could be an issue opened in the Nextflow repo?

@drpatelh
Copy link
Member Author

Thanks @pditommaso ! Done nextflow-io/nextflow#2661

@drpatelh
Copy link
Member Author

drpatelh commented Mar 8, 2022

Will be fixed in #1431

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

No branches or pull requests

2 participants