Skip to content

Commit

Permalink
Fix function to read FASTA file
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmig committed Oct 3, 2023
1 parent be4960d commit e5d77c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/scripts/weighted_distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e5d77c1

Please sign in to comment.