From 9afd28628ed64fc0c83d7561a99f816d792f8f02 Mon Sep 17 00:00:00 2001 From: Keith Cheveralls Date: Wed, 17 Jan 2024 10:14:48 -0800 Subject: [PATCH] Fix bug in blast_utils #98 --- ProteinCartography/blast_utils.py | 38 ++++++++++++++++--------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/ProteinCartography/blast_utils.py b/ProteinCartography/blast_utils.py index 7f95306..543b3f0 100644 --- a/ProteinCartography/blast_utils.py +++ b/ProteinCartography/blast_utils.py @@ -27,24 +27,26 @@ def run_blast( """ database = "nr" result = subprocess.run( - [ - "blastp", - "-remote", - "-db", - database, - "-query", - query, - "-out", - out, - "-max_target_seqs", - str(max_target_seqs), - "-outfmt", - outfmt, - "-word_size", - str(word_size), - "-evalue", - str(evalue), - ], + " ".join( + [ + "blastp", + "-remote", + "-db", + database, + "-query", + query, + "-out", + out, + "-max_target_seqs", + str(max_target_seqs), + "-outfmt", + f"'{outfmt}'", + "-word_size", + str(word_size), + "-evalue", + str(evalue), + ] + ), capture_output=True, shell=True, )