-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Snakemake version
5.27.4
Describe the bug
When there is a config file loaded and another one is loaded through --configfile, the config dict is updated and not overwritten.
Minimal example
With a snakefile:
import json
configfile: "config.yaml"
print(json.dumps(config, indent="\t"))
and a config file:
ref:
n_chromosomes: 17
species: saccharomyces_cerevisiae
release: 100
build: R64-1-1
url: ensembl.org
you get (with some errors that are not relevant for here):
$ snakemake -j 1
{
"ref": {
"n_chromosomes": 17,
"species": "saccharomyces_cerevisiae",
"release": 100,
"build": "R64-1-1",
"url": "ensembl.org"
}
}
but, if you also load this config through the command line:
ref:
n_chromosomes: 17
species: saccharomyces_cerevisiae
release: 101
build: R64-1-1
name: NEW
you get:
$ snakemake -j 1 --configfile config_NEW.yaml
{
"ref": {
"n_chromosomes": 17,
"species": "saccharomyces_cerevisiae",
"release": 101,
"build": "R64-1-1",
"name": "NEW",
"url": "ensembl.org"
}
}
Shouldn't we expect the config to be fully overwritten (and the key url should not be there)?
If not and snakemake actually merges config files (instead of overwriting them), is there a way to enforce the old one to be overwritten?
thanks,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done