Skip to content

Commit

Permalink
Replace deprecated seq.ungap()
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Dec 22, 2023
1 parent fd6f5dc commit 2bc4ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/cut.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2bc4ada

Please sign in to comment.