From f9c496d682cf50f6d0acbab3c61c3e50f6061dd1 Mon Sep 17 00:00:00 2001 From: choang Date: Fri, 6 Oct 2023 11:24:57 -0700 Subject: [PATCH] Add convert seq if one string is passed to one elem in list input --- gget/gget_diamond.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gget/gget_diamond.py b/gget/gget_diamond.py index e7a53461..5c99a4e8 100644 --- a/gget/gget_diamond.py +++ b/gget/gget_diamond.py @@ -59,6 +59,9 @@ def create_input_file(sequences): Returns: input file absolute path """ # print(f"sequences for input file{sequences}") + if type(sequences) == str: + sequences = [sequences] + with open(f"tmp_{RANDOM_ID}.fa", "w") as f: for idx, seq in enumerate(sequences): f.write(f">Seq {idx}\n{seq}\n")