From 6bb58962c2d8cd3c314526a59794d279b5616273 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Tue, 4 Jun 2024 16:58:19 +0200 Subject: [PATCH] Simplify segmentation inference --- ingest/Snakefile | 9 ++------- ingest/config/defaults.yaml | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ingest/Snakefile b/ingest/Snakefile index a905d646f4..3a5f023891 100644 --- a/ingest/Snakefile +++ b/ingest/Snakefile @@ -10,13 +10,8 @@ for key, value in defaults.items(): if not key in config: config[key] = value -# Check if organism is segmented -if "nucleotideSequences" not in config: - config["nucleotideSequences"] = ["main"] -config["segmented"] = not ( - len(config["nucleotideSequences"]) == 1 - and config["nucleotideSequences"][0] == "main" -) +# Infer whether nucleotide sequences are segmented +config["segmented"] = len(config["nucleotideSequences"]) > 1 Path("results").mkdir(parents=True, exist_ok=True) with open("results/config.yaml", "w") as f: diff --git a/ingest/config/defaults.yaml b/ingest/config/defaults.yaml index eff641cc72..72af3f75fd 100644 --- a/ingest/config/defaults.yaml +++ b/ingest/config/defaults.yaml @@ -1,5 +1,6 @@ # Values here are defaults for the `config` variable in the Snakefile # Purpose is to keep the `values.yaml` config file clean +nucleotideSequences: ["main"] post_start_sleep: 0 log_level: DEBUG compound_country_field: ncbi_geo_location