Skip to content

Commit

Permalink
fix bug of .gz
Browse files Browse the repository at this point in the history
  • Loading branch information
psj1997 committed Jun 17, 2020
1 parent b3c629e commit 427434c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gmgc_mapper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ def gene_prediction(fasta_input, output, tmpdirname):

if os.path.splitext(fasta_input)[1] == '.bz2':
with bz2.BZ2File(fasta_input) as ifile:
open(tmpdirname + '/input.fasta', "wb+").write(output_file.read())
open(tmpdirname + '/input.fasta', "wb+").write(ifile.read())
fasta_input = tmpdirname + '/input.fasta'

if os.path.splitext(fasta_input)[1] == '.gz':
with bz2.BZ2File(fasta_input) as ifile:
open(tmpdirname + '/input.fasta', "wb+").write(ifile.read())
fasta_input = tmpdirname + '/input.fasta'

subprocess.check_call(
['prodigal',
Expand Down

0 comments on commit 427434c

Please sign in to comment.