Skip to content

Commit

Permalink
Update for Biopython 1.80
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand authored Dec 20, 2022
1 parent 0be81eb commit b5a474c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions biorun/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,9 @@ def run(open_=11, extend=1, matrix='', local_=False, global_=False, match=1, mis
for aln in alns:

# Unpack a BioPython pairwise result.
seq1, trace, seq2 = format(aln).splitlines()

if par.mode == LOCAL_ALIGN:
# Local alignment have traces with white space padding
start = len(trace) - len(trace.lstrip())
end = start + len(trace.strip())
seq1 = seq1[start:end]
seq2 = seq2[start:end]

seq1 = Seq(seq1)
seq2 = Seq(seq2)
seq1, seq2 = Seq(aln[0]), Seq(aln[1])

# Wrap the resulting alignment into a sequence.

query_aln = SeqRecord(id=query.id, name=query.name, description='', seq=seq1)
target_aln = SeqRecord(id=target.id, name=target.name, description='', seq=seq2)

Expand Down

0 comments on commit b5a474c

Please sign in to comment.