Skip to content

Commit

Permalink
Add new line after seq for writing .fa reference file
Browse files Browse the repository at this point in the history
  • Loading branch information
choang committed Oct 6, 2023
1 parent 9c86b95 commit 5cc2a08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gget/gget_diamond.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_input_file(sequences):
# print(f"sequences for input file{sequences}")
with open(f"tmp_{RANDOM_ID}.fa", "w") as f:
for idx, seq in enumerate(sequences):
f.write(f">Seq {idx}\n{seq}")
f.write(f">Seq {idx}\n{seq}\n")

return f"tmp_{RANDOM_ID}.fa"
# check if correct sequences are written to file
Expand Down Expand Up @@ -137,9 +137,10 @@ def diamond(
# Exit system if the subprocess returned wstdout = sys.stdout

if process_2.wait() != 0:
#TODO: change error message
logging.error(
"""
DIAMOND failed. Please check that you have a diamond executable file for Windows or Linux in the bin folder.
DIAMOND failed.
"""
)
return
Expand Down

0 comments on commit 5cc2a08

Please sign in to comment.