-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSnakefile
46 lines (33 loc) · 1.11 KB
/
Snakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# SPDX-FileCopyrightText: 2020-2022 Johannes Hampp
#
# SPDX-License-Identifier: GPL-3.0-or-later
from pathlib import Path
from copy import deepcopy
import pandas as pd
from snakemake.utils import Paramspace
from snakemake.utils import update_config
from shutil import move
from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider
from snakemake.io import load_configfile
HTTP = HTTPRemoteProvider()
# Specify config file
configfile: "config/config.initial_paper.yaml"
# Default configs - do not change
default_configfile = "config/config.default.yaml"
# Load default config and overwrite with specific config
specific_config = config.copy()
config = load_configfile(Path(default_configfile))
update_config(config, specific_config)
wildcard_constraints:
year="\d+",
era_year="\d+",
scenario="[-\w]+",
region="[A-Z]+",
def get_scenario(scenario_name):
s = deepcopy(config["scenarios"]["default"])
update_config(s, config["scenarios"][scenario_name])
return s
include: "rules/gegis.smk"
include: "rules/esc_construction.smk"
include: "rules/solving.smk"
include: "rules/results.smk"