From 2bc4adaa4d5383a6ba8c821796133cb90e2cc3d3 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:19:47 -0800 Subject: [PATCH] Replace deprecated seq.ungap() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was deprecated in Biopython 1.79 and removed in 1.82.¹ ¹ --- scripts/cut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cut.py b/scripts/cut.py index cbd672b..7ee76ca 100644 --- a/scripts/cut.py +++ b/scripts/cut.py @@ -21,7 +21,7 @@ def cut(oldalignment, newalignment, referencefile, gene, min_length=0): alignment =SeqIO.parse(oldalignment, 'fasta') for entry in alignment: newrecord = SeqRecord(Seq(entry.seq[startofgene:endofgene]), id=entry.id, description=entry.description) - if len(newrecord.seq.ungap('-')) >= min_length: + if len(newrecord.seq.replace('-', '')) >= min_length: list1.append(newrecord) for record in list1: