Skip to content

Commit

Permalink
Merge pull request #474 from groutr/str_replace
Browse files Browse the repository at this point in the history
Use str.replace in make_gaps_ambiguous
  • Loading branch information
huddlej authored Mar 25, 2020
2 parents d47c9d7 + abdc038 commit d2398eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions augur/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ def make_gaps_ambiguous(aln):
Biopython Alignment
'''
for seq in aln:
seq_array = np.array(seq)
gaps = seq_array=='-'
seq_array[gaps]='N'
seq.seq = Seq.Seq("".join(seq_array))
_seq = str(seq.seq)
_seq = _seq.replace('-', 'N')
seq.seq = Seq.Seq(_seq, alphabet=seq.seq.alphabet)


def check_duplicates(*values):
names = set()
Expand Down

0 comments on commit d2398eb

Please sign in to comment.