Skip to content

Conversation

@corneliusroemer
Copy link
Member

It's been a while since I've looked at a Nextstrain workflow other than mpox so thought I go through this one and make some suggestions as I review the code

Commits can be cherry-picked, there's no single theme

snakemake doesn't like when you mess with it while running it. I get the following error when removing .snakemake while running snakemake itself:

````
Complete log(s): /Users/cr/code/rubella/ingest/.snakemake/log/2025-05-05T203735.022933.snakemake.log
Exception in thread Thread-1 (_monitor):
Traceback (most recent call last):
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/logging/handlers.py", line 1598, in _monitor
    self.handle(record)
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/logging/handlers.py", line 1579, in handle
    handler.handle(record)
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/logging/__init__.py", line 1028, in handle
    self.emit(record)
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/logging/__init__.py", line 1278, in emit
    self.stream = self._open()
                  ^^^^^^^^^^^^
  File "/Users/cr/micromamba/envs/py12/lib/python3.12/logging/__init__.py", line 1263, in _open
    return open_func(self.baseFilename, self.mode,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/cr/code/rubella/ingest/.snakemake/log/2025-05-05T203735.022933.snakemake.log'
```
It's annoying that one needs to manually add this file but it allows: `snakemake` as opposed to having to type `snakemake -c1 --ri --printshellcmds`
resolves #28

Trailing `|` was interpreted as "or anything" which ends up always being true
@corneliusroemer corneliusroemer marked this pull request as ready for review May 6, 2025 02:44
@genehack
Copy link
Contributor

genehack commented May 6, 2025

Please note, the rubella build is still under active development.

Comment on lines 1 to 3
cores: all
printshellcmds: true
ri: true No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know you can make these your global default by putting the profile somewhere shared and setting SNAKEMAKE_PROFILE, e.g.

export SNAKEMAKE_PROFILE=~/.config/snakemake/default

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 this pull request may close these issues.

4 participants