From 8e8a5e76f7c69d675341355419b1851db283d81c Mon Sep 17 00:00:00 2001 From: Kristoffer Kiil Date: Thu, 12 Dec 2024 14:50:51 +0100 Subject: [PATCH] Fixed datatype mismatch in multiple_alleles func --- bifrost_chewbbaca/datadump.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bifrost_chewbbaca/datadump.py b/bifrost_chewbbaca/datadump.py index 6d0b82b..87b8b91 100755 --- a/bifrost_chewbbaca/datadump.py +++ b/bifrost_chewbbaca/datadump.py @@ -21,9 +21,8 @@ def call_percent(calls): def multiple_alleles(calls): - return round( - len([x for x in calls if x.startswith("NIPH") or x.startswith("NIPHEM")]) - ) + multi_allele_codes = set("NIPH","NIPHEM") + return len([x for x in calls if x in multi_allele_codes]) def schema_digest(locus_names, alg=md5): hash = alg("\t".join(locus_names).encode())