snakemake-wrappers
snakemake-wrappers copied to clipboard
fix: fixed GATK3 conda channel priorities and code reformat
Description
Fixed conda channel priorities, plus some code clean-up
QC
- [x] I confirm that:
For all wrappers added by this PR,
- there is a test case which covers any introduced changes,
input:andoutput:file paths in the resulting rule can be changed arbitrarily,- either the wrapper can only use a single core, or the example rule contains a
threads: xstatement withxbeing a reasonable default, - rule names in the test case are in snake_case and somehow tell what the rule is about or match the tools purpose or name (e.g.,
map_readsfor a step that maps reads), - all
environment.yamlspecifications follow the respective best practices, - wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in
input:oroutput:), - all fields of the example rules in the
Snakefiles and their entries are explained via comments (input:/output:/params:etc.), stderrand/orstdoutare logged correctly (log:), depending on the wrapped tool,- temporary files are either written to a unique hidden folder in the working directory, or (better) stored where the Python function
tempfile.gettempdir()points to (see here; this also means that using any Pythontempfiledefault behavior works), - the
meta.yamlcontains a link to the documentation of the respective tool or command, Snakefiles pass the linting (snakemake --lint),Snakefiles are formatted with snakefmt,- Python wrapper scripts are formatted with black.
Closing in favor of #508. Thanks anyway!
I'll re-open it (and convert to draft), since I am planning to add some proper testing for GATK3.
Oh sure, sorry!
When I test these changes locally, all works without any error or warning but, on GitHub I am getting a warning and an error:
Environment defines Python version < 3.7. Using Python of the main process to execute script. Note that this cannot be avoided, because the script uses data structures from Snakemake which are Python >=3.7 only.
/usr/share/miniconda/envs/snakemake/bin/python3.10 /tmp/tmpx7gcjxc0/test/.snakemake/scripts/tmpqx1der4s.wrapper.py
Activating conda environment: .snakemake/conda/81a69fc1574731cf5b92c4d702182e2c
Traceback (most recent call last):
File "/tmp/tmpx7gcjxc0/test/.snakemake/scripts/tmpqx1der4s.wrapper.py", line 13, in <module>
from snakemake_wrapper_utils.java import get_java_opts
ModuleNotFoundError: No module named 'snakemake_wrapper_utils'
It seems it cannot find snakemake_wrapper_utils, but it is in the environment.yaml file. Could it be because of the Python 3.7 warning? Why does environment on GitHub defines Python version < 3.7 while locally it uses 3.10.5?
Finally managed to get it to work!
Had to add python >= 3.10 in the environment, otherwise it would install a python lower than 3.7 (no idea why).