From ee4352f13fb5c764782f12f0913f614ebea876fd Mon Sep 17 00:00:00 2001 From: Ivan Blagoev Topolsky Date: Thu, 28 Dec 2023 14:33:57 +0100 Subject: [PATCH] API change in Ruamel >=0.15 --- lollipop/cli/deconvolute.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lollipop/cli/deconvolute.py b/lollipop/cli/deconvolute.py index cf02bdf..88ef22c 100755 --- a/lollipop/cli/deconvolute.py +++ b/lollipop/cli/deconvolute.py @@ -116,9 +116,10 @@ def deconvolute( tally_data, ): # load data + yaml = ruamel.yaml.YAML(typ="rt") print("load data") with open(variants_config, "r") as file: - conf_yaml = ruamel.yaml.load(file, Loader=ruamel.yaml.Loader) + conf_yaml = yaml.load(file) variants_pangolin = conf_yaml["variants_pangolin"] variants_list = conf_yaml.get("variants_list", None) variants_not_reported = conf_yaml.get("variants_not_reported", []) @@ -132,7 +133,7 @@ def deconvolute( # kernel deconvolution params with open(deconv_config, "r") as file: - deconv = ruamel.yaml.load(file, Loader=ruamel.yaml.Loader) + deconv = yaml.load(file) # data try: @@ -221,7 +222,7 @@ def deconvolute( f"WARNING: running in `no_date` mode, still var_dates specified in {variants_dates}" ) with open(variants_dates, "r") as file: - var_dates = ruamel.yaml.load(file, Loader=ruamel.yaml.Loader) + var_dates = yaml.load(file) all_var_dates = set( [var for lst in var_dates["var_dates"].values() for var in lst]