Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main Snakefile DAG should replicate the subworkflow DAG in an identical manner. #379

Open
rajwanir opened this issue Feb 24, 2025 · 0 comments · May be fixed by #367
Open

Main Snakefile DAG should replicate the subworkflow DAG in an identical manner. #379

rajwanir opened this issue Feb 24, 2025 · 0 comments · May be fixed by #367
Assignees
Labels
workflow Anything related to snakemake componenets

Comments

@rajwanir
Copy link

Description:

Some of the workflow logic and works often need to be redefined both within the subworkflow as well as the main snakefile. This sometimes results in redundancy. If a change to workflow rule selection logic is made, it needs to be modified in both places the main snakfile and the subworkflow for correct/desired DAG.

For example:

Checks on whether to execute contamination subworkflow and summarize it's results is referenced in both main snakefile and sample_qc subworkflow:

if sample_qc.use_contamination or cfg.config.user_files.bcf:

if use_contamination or (idat_intensity_retrieved and contamination_checked):

Similar issue was noted when adding a logic to skip plink ibd in PR #367 .

Solution:

Unless there comes a use case to implement a secondary rule selection in main snakefile, It might be preferable to have rule selection logics defined in the subworkflow and the main snakefile simply replicates the subworkflow logic in an identical manner. The main Snakefile would be a good place to select which subworklfows gets executed. But the DAG of the concerned rules for subworkflow and main snakefile should be identical for ease in maintainence.

@rajwanir rajwanir self-assigned this Feb 24, 2025
@rajwanir rajwanir added the workflow Anything related to snakemake componenets label Feb 24, 2025
rajwanir pushed a commit that referenced this issue Feb 24, 2025
@rajwanir rajwanir linked a pull request Feb 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow Anything related to snakemake componenets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant