Skip to content

Commit

Permalink
API change in Ruamel >=0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
DrYak committed Dec 28, 2023
1 parent 9c6cd25 commit ad32f1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lollipop/cli/deconvolute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", [])
Expand All @@ -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:
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit ad32f1a

Please sign in to comment.