bihealth / snappy-pipeline

SNAPPY Nucleic Acid Processing in Python
MIT License
8 stars 4 forks source link

The gcnv `contig_ploidy` wrapper hardcodes config paths #500

Open Nicolai-vKuegelgen opened 5 months ago

Nicolai-vKuegelgen commented 5 months ago

Describe the bug The wrapper for gcnv contig_ploidy contains hard-coded config sections (see below) but is uactually sed by different steps (helper_gcnv_model_targeted and helper_gcnv_model_wgs)

From snappy_wrappers/wrappers/gcnv/contig_ploidy/wrapper.py

par_intervals = snakemake.config["step_config"]["helper_gcnv_model_targeted"]["gcnv"].get(
    "path_par_intervals"
)

To Reproduce Steps to reproduce the behavior:

  1. Run the helper_gcnv_model_wgs step

Expected behavior The wrapper script should automatically determine whether the targeted or wgs step is being run.

tedil commented 5 months ago

The wrapper should not determine anything but remain oblivious of its context. I'd rather factor the config access out and make the par_intervals a parameter, i.e. an entry in params.args. I.e. the steps calling this wrapper should be in charge of producing the correct par_intervals value to hand off to the wrapper.

Nicolai-vKuegelgen commented 5 months ago

Sounds like a better solution, I have so far only 'hotfixed' this by adding a "helper_gcnv_model_targeted" config section to my WGS projects.