Skip to content

Updated cleaning methodology to clean correct files for viralrecon#692

Merged
victor5lm merged 7 commits into
BU-ISCIII:developfrom
victor5lm:update_clean_viralrecon
Jun 11, 2026
Merged

Updated cleaning methodology to clean correct files for viralrecon#692
victor5lm merged 7 commits into
BU-ISCIII:developfrom
victor5lm:update_clean_viralrecon

Conversation

@victor5lm

@victor5lm victor5lm commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

PR checklist

  • This comment contains a description of changes (with reason).
  • Make sure your code lints (black and flake8).
  • If a new tamplate was added make sure:
    • Template's schema is added in templates/services.json.
    • Template's pipeline's documentation in assets/reports/md/template.md is added.
    • Results Documentation in assets/reports/results/template.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).
  • If you know a new user was added to the SFTP, make sure you added it to templates/sftp_user.json

PR description

Closes #311.
Currently, depending on the protocol defined when running the viralrecon pipeline, .sorted.bam files should be deleted or not. To handle this situation, the following changes are suggested by this PR:

  1. services.json has a new field: clean_script, by which it will be possible to indicate if a specific cleaning script should be used to clean files associated with that specific service. For now, this is only useful for viralrecon, but could be used for other services in the future.
  2. In relation to this, within assets/utils, a new script called viralrecon_clean.py is stored. This script is indicated in services.json, and the clean module will use this auxiliary script to get the service's protocol from the viralrecon_params.yml file and, depending on this, delete or not the appropriate BAM files.
  3. The clean module is accordingly adapted to this. Given each one of the services associated with the resolution, this module will check if an auxiliary cleaning script exists for each of these services, and then will perform the cleaning depending on whether the service has an auxiliary file associated or not. If it does, the auxiliary script will be employed. If no auxiliary script exists, the files and folders to be deleted/purged will be the ones indicated in the clean --> folders/files field of services.json.

@victor5lm victor5lm added this to the v2.3.3 milestone Jun 11, 2026
@victor5lm victor5lm self-assigned this Jun 11, 2026
@victor5lm victor5lm marked this pull request as ready for review June 11, 2026 13:30

@saramonzon saramonzon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool!

@victor5lm victor5lm merged commit 2a8674d into BU-ISCIII:develop Jun 11, 2026
2 checks 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.

viralrecon template remove sorted.bams only for amplicons, not for metagenomic

2 participants