From 1bc30149be88a99014ba49fe8738f5668f3a463e Mon Sep 17 00:00:00 2001 From: taranewman <69013600+taranewman@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:36:43 -0700 Subject: [PATCH] Make Ct 0 for positive control samples (#20) * Make ct zero for positive control * fix containerid * Add ct 0 when library id starts with POS * remove added whitespace * fix whitespace --- auto_ncov/metadata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auto_ncov/metadata.py b/auto_ncov/metadata.py index 5eec962..283131f 100644 --- a/auto_ncov/metadata.py +++ b/auto_ncov/metadata.py @@ -82,7 +82,7 @@ def combine_ct_values(metadata: dict[str, dict[str, object]]) -> dict[str, dict[ if sample_metadata[ct_field] is not None: ct_combo = sample_metadata[ct_field] break - + sample_metadata['ct_combo'] = ct_combo return metadata @@ -143,6 +143,9 @@ def select_run_metadata(all_metadata: dict[str, dict[str, object]], run_library_ except KeyError as e: pass + if library_id.startswith('POS'): + library_selected_metadata['ct'] = 0 + run_metadata.append(library_selected_metadata) return run_metadata