[Python] Use different config files depending on the rule called

Discussão em 'Python' iniciado por Stack, Fevereiro 13, 2025.

  1. Stack

    Stack Membro Participativo

    First of all, I might have the wrong approach to this.

    I have a Snakemake pipeline that I used to run multiple types of simulations, and then run a program on these simulations.

    Depending on the type of simulation I run, a different set of parameters has to be used. For example, if I want the simulation that I called Ne over PI, I want Snakemake to use the following parameters set:

    • N = [100, 1000]
    • PI = [0.1, O.5]
    • s = [0]

    For other simulations, I want these variable to take other values.

    What I would like to do, to keep it simple and easy to use, is to have a config file for each simulation, such as config_Ne_over_PI.yaml containing the parameters I described above. Therefore, when I call snakemake Ne_over_PI.results, my Snakefile should run the corresponding rule, and set the configfile to config_Ne_over_PI.yaml. But it seems that Snakemake is not able to decide between multiple config files depending on a condition ?

    Continue reading...

Compartilhe esta Página