From 5cc2a080fee78befcc80351b016d7f193a3fde3c Mon Sep 17 00:00:00 2001 From: choang Date: Fri, 6 Oct 2023 08:37:31 -0700 Subject: [PATCH] Add new line after seq for writing .fa reference file --- gget/gget_diamond.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gget/gget_diamond.py b/gget/gget_diamond.py index 9f369a47..94dc76ab 100644 --- a/gget/gget_diamond.py +++ b/gget/gget_diamond.py @@ -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 @@ -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