Skip to content

Commit

Permalink
py3 update
Browse files Browse the repository at this point in the history
  • Loading branch information
crosenth committed Aug 29, 2024
1 parent 8ca49a9 commit 255d433
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deenurp/subcommands/fill_lonely.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import argparse
import copy
import csv
import io
import logging
import shutil
import sys
Expand Down Expand Up @@ -64,7 +65,7 @@ def fill_lonely_worker(
util.ntf(suffix='.fast.tre') as tree_fp:
wrap.esl_sfetch(full_fasta, other_sequence_ids, tf, fa_idx)
tf.seek(0)
sequences = SeqIO.parse(tf, 'fasta')
sequences = SeqIO.parse(io.TextIOWrapper(tf, encoding='utf8'), 'fasta')

# Align
sys.stderr.write(
Expand All @@ -75,7 +76,7 @@ def fill_lonely_worker(
# Run FastTree
sys.stderr.write('Node {0}: FastTree {1} sequences\r'.format(
node_id, len(other_sequence_ids)))
wrap.fasttree(aligned, tree_fp, gtr=True)
wrap.fasttree(aligned, tree_fp.name, gtr=True)
tree_fp.close()

# Select reps
Expand Down

0 comments on commit 255d433

Please sign in to comment.