Skip to content

Refactor: Deduplicate download rules in downloads.smkΒ #140

@cmkobel

Description

@cmkobel

Summary

workflow/rules/downloads.smk contains 7 download rules that all follow the same conditional structure:

if [ -f "{output}" ]; then
    touch {output:q}
else
    # Download logic (unique per tool)
    touch {output:q}
fi

The boilerplate around the actual download command is identical in every rule.

Proposed approach

Consider a helper function or template that wraps the "skip if exists, otherwise download and touch" logic, so each rule only needs to specify its unique download command. This would reduce repetition and make it easier to add new download rules consistently.

Files to touch

  • workflow/rules/downloads.smk (rules at approximately lines 6, 43, 85, 142, 179, 214, 245)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions