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

create-test-yml: move 'work' and '.nextflow*' files to tmp directory #908

Closed
KevinMenden opened this issue Mar 18, 2021 · 7 comments · Fixed by #1098
Closed

create-test-yml: move 'work' and '.nextflow*' files to tmp directory #908

KevinMenden opened this issue Mar 18, 2021 · 7 comments · Fixed by #1098

Comments

@KevinMenden
Copy link
Contributor

Currently, nf-core modules create-test-yml creates the "work" directory and ".nextflow" files in the current working directly (which is "modules"). These files should be moved to the tmp directory used for creating the output.

@KevinMenden
Copy link
Contributor Author

Alright I have had another go at this. Essentially there are three things that pollute the CWD, which is the clone of modules:

  • work
  • .nextflow/
  • .nextflow.log

It's possible to direct the .nextflow.log files to the tmp directories by adding a -log directive to the nextflow command before running it. The work and .nextflow/ can't be redirected that way unfortunately, that would require a new workDir directive which can only be modified in an additional config file. However we are already using a custom config file via -c.
So from what I understand the only solution to clean things up would be to manually remove them.
nextflow clean -f doesn't really work either (needs workflow name, doesn't remove the work directory ...).

So this is not super important, I would say we wait until something more elegant from the nextflow side is available, see here for instance:

seqeralabs/nf-tower#279
nextflow-io/nextflow#452

Not sure when this will be available though.

@ewels
Copy link
Member

ewels commented Apr 10, 2021

I thought that -w set the work directory from the command line?

@KevinMenden
Copy link
Contributor Author

KevinMenden commented Apr 12, 2021

😱
Do you happen to have the part in the nextflow documentation that explains that? I've been looking through it for a while but all I could find was the workDir directive and search didn't help .... 😏
I never find stuff on documentation pages.

Well anyway thanks! In that case I guess we could at least direct the work dir and the .nextflow.log to the tmp-dirs. I think the .nextflow/ folder will still exist though, but it's better than nothing.

@ewels
Copy link
Member

ewels commented May 9, 2021

Yeah these flags can be tricky to find. nextflow help run | grep "-w"? 😅

Not sure about the hidden log dirs, that might be harder as you say..

@ewels
Copy link
Member

ewels commented May 9, 2021

Found it: https://www.nextflow.io/docs/latest/cli.html#run

@KevinMenden
Copy link
Contributor Author

Yeah that works if you know what to look for :P also I just looked at the documentation 😏

Okay so the search function on that documentation really doesn't work and I am too dumb to search. Alright I guess we can already start adding that to the code, and then it's only the hidden logs left, which is something we can live with for now I'd say 👍

@drpatelh
Copy link
Member

drpatelh commented Dec 8, 2021

Closed by #1098

@drpatelh drpatelh closed this as completed Dec 8, 2021
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

Successfully merging a pull request may close this issue.

3 participants