Skip to content

Tidy code#27

Merged
samnooij merged 27 commits intomainfrom
dev
Jan 21, 2026
Merged

Tidy code#27
samnooij merged 27 commits intomainfrom
dev

Conversation

@samnooij
Copy link
Copy Markdown
Member

@samnooij samnooij commented Jan 21, 2026

Prepare for release 0.2. Code overhaul and a number of bugfixes. Implement some of Snakemake's best practices for code quality, readability and portability and reproducibility. This will force a complete rerun of your analyses!

Documentation has not been updated and needs revision of many parts. (Planned for version 0.4.)

Feature updates

  • Adopt Snakemake's recommended structure, with resources/ for databases and results/ for output
  • Include conda environments for all rules
  • Use helper functions to generate paths in params
  • Download genome annotations (Bakta) from AllTheBacteria
    • including the file all_atb_files.tsv

Bugfixes/code cleanup:

  • Remove outdated CCTyper parsing scripts
  • Revise bash scripts
  • Apply standardised code formatting:
    • snakefmt for Snakefiles,
    • styler for R code,
    • black for Python
  • Better integrate scripts with Snakemake

Fixes: #7, #24. Partly solves #19.

samnooij and others added 27 commits December 5, 2025 10:55
- Also adjust bullet indentation
Also see https://snakemake.readthedocs.io/en/stable/snakefiles/best_practices.html for advice; mainly, it is simpler to just write paths than to assemble them using a 'WORK_DIR' variable, and use functions in params to extract paths from input and output files
Other changes:
- Update parallel command
- Correct merging CRISPRidentify batches
- Correctly integrate script with Snakemake variables
This includes:
- Move databases to 'resources'
- Move output to 'results'

Other changes:
- Download databases automatically
- Have Snakemake check for missing input - should fix #7
- Apply snakefmt
This includes:
- Separate downloading of PhageScope and PLSDB (2 scripts instead of 1)

Bugfixes:
- Add end message to bin/prepare_genomes.sh
- Add parallel to 'basic' env
@samnooij samnooij merged commit 6044af3 into main Jan 21, 2026
1 check passed
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.

Snakefile runs without actual input

1 participant