From 6d3dde8c113b98acbdade7d572d641249c36818b Mon Sep 17 00:00:00 2001 From: Guoyi Zhang Date: Wed, 3 Jul 2024 13:36:38 +1000 Subject: [PATCH] polish: try to make current masce multiple threads --- RGBEPP.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/RGBEPP.sh b/RGBEPP.sh index 310e7f9..cd0659a 100644 --- a/RGBEPP.sh +++ b/RGBEPP.sh @@ -250,12 +250,18 @@ if [ "$ARG_F" = "all" ] || [ "$ARG_F" = "align" ]; then exit 1 fi + current_thread=0 mkdir -p $DirAlign mkdir -p $DirAlign/AA && mkdir -p $DirAlign/NT cd $DirMerge for (( i=0; i<$length_gn; i++ )) do - java -jar $PathMacse -prog alignSequences -seq ${genes[$i]}.fasta -out_AA ../$DirAlign/AA/${genes[$i]}.fasta -out_NT ../$DirAlign/NT/${genes[$i]}.fasta + java -jar $PathMacse -prog alignSequences -seq ${genes[$i]}.fasta -out_AA ../$DirAlign/AA/${genes[$i]}.fasta -out_NT ../$DirAlign/NT/${genes[$i]}.fasta & + ((current_thread++)) + if [ $current_thread -eq $ARG_T ]; then + wait + current_thread=0 + fi done cd -