From e62c21ec714782fcc6ac444828ed957a4b033311 Mon Sep 17 00:00:00 2001 From: alephreish Date: Tue, 22 Oct 2024 12:28:56 +0300 Subject: [PATCH] Fix arguments and paths for make_msa.sh --- make_msa.sh | 13 ++++++++++--- rf2aa/data/preprocessing.py | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/make_msa.sh b/make_msa.sh index 4a3c98c..2ab1a9f 100755 --- a/make_msa.sh +++ b/make_msa.sh @@ -8,16 +8,23 @@ out_dir="$2" CPU="$3" MEM="$4" +# directory with the databases +SEARCH_BASE="$5" + # template database -DB_TEMPL="$5" +DB_TEMPL="$6" # current script directory (i.e., pipe directory) SCRIPT=`realpath -s $0` export PIPE_DIR=`dirname $SCRIPT` +if [ -z "$SEARCH_BASE" ]; then + SEARCH_BASE=$PIPE_DIR +fi + # sequence databases -DB_UR30="$PIPE_DIR/UniRef30_2020_06/UniRef30_2020_06" -DB_BFD="$PIPE_DIR/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt" +DB_UR30="$SEARCH_BASE/UniRef30_2020_06/UniRef30_2020_06" +DB_BFD="$SEARCH_BASE/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt" # Running signalP 6.0 mkdir -p $out_dir/signalp diff --git a/rf2aa/data/preprocessing.py b/rf2aa/data/preprocessing.py index 8624d55..9a363fc 100644 --- a/rf2aa/data/preprocessing.py +++ b/rf2aa/data/preprocessing.py @@ -28,8 +28,8 @@ def make_msa( if out_a3m.exists() and out_atab.exists() and out_hhr.exists(): return out_a3m, out_hhr, out_atab - search_command = f"./{command} {fasta_file} {out_dir} {num_cpus} {ram_gb} {search_base} {template_database}" + search_command = list(map(str, [ command, fasta_file, out_dir, num_cpus, ram_gb, search_base, template_database ])) print(search_command) - _ = subprocess.run(search_command, shell=True) + _ = subprocess.run(search_command) return out_a3m, out_hhr, out_atab