From e5d77c1fc36cf93901c668a6b12268d9e6f1d506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81lvarez=20Herrera?= Date: Tue, 3 Oct 2023 13:46:25 +0200 Subject: [PATCH] Fix function to read FASTA file --- workflow/scripts/weighted_distances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/scripts/weighted_distances.py b/workflow/scripts/weighted_distances.py index 7aed257..48a229f 100644 --- a/workflow/scripts/weighted_distances.py +++ b/workflow/scripts/weighted_distances.py @@ -16,7 +16,7 @@ def read_monofasta(path: str) -> SeqRecord: fasta = SeqIO.parse(path, "fasta") record = next(fasta) - if next(fasta): + if next(fasta, None) is None: logging.warning(f"There are unread records left in '{path}'") return record