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

Use Snakemake tmpdir resource #319

Closed
holtgrewe opened this issue Jan 5, 2023 · 0 comments · Fixed by #320
Closed

Use Snakemake tmpdir resource #319

holtgrewe opened this issue Jan 5, 2023 · 0 comments · Fixed by #320

Comments

@holtgrewe
Copy link
Member

Is your feature request related to a problem? Please describe.
A while ago, Snakemake introduced the tmpdir resource. We currently override tmpdir in the job script. This is bad.

Describe the solution you'd like
Implement a get_tmpdir() in the BaseStep class and implement the resource tmpdir in ResourceUsage. The behaviour should be as follows:

First, prefer to use ResourceUsage.tmpdir if set.

Then, fall back to:

  1. Configuration global_settings/tmpdir and interpret environment variables such as $HOSTNAME and $HOME. Introduce date +%Y%m%d as $TODAY.
  2. If not set, return environment variable $TMPDIR
  3. If not set, return tempdir.gettmpdir() as Snakemake does.

Describe alternatives you've considered
N/A

Additional context
N/A

holtgrewe added a commit that referenced this issue Jan 5, 2023
You can use the following config snippet (top level key "global_config"):

    global_config:
      tmpdir: /data/wekafs-1/groups/cubi/scratch/holtgrem_c/$HOSTNAME/$TODAY
@holtgrewe holtgrewe linked a pull request Jan 5, 2023 that will close this issue
holtgrewe added a commit that referenced this issue Jan 5, 2023
You can use the following config snippet (top level key "global_config"):

    global_config:
      tmpdir: /data/wekafs-1/groups/cubi/scratch/holtgrem_c/$HOSTNAME/$TODAY
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.

1 participant