-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_selection.sh
More file actions
executable file
·44 lines (41 loc) · 1.4 KB
/
run_selection.sh
File metadata and controls
executable file
·44 lines (41 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Usage:
# ./run_selection.sh /path/to/protein_dir
# batch mode (all proteins in dir)
# ./run_selection.sh 5FTX # single protein
# ./run_selection.sh 1Y57 2H3H 2V8N
# multiple proteins
# /proj/wallner-b/users/x_yogka/AFsample3/af3-dev/notebooks/casestudy/5FTX
# /proj/wallner-b/users/x_yogka/AFsample3/af3-dev/notebooks/representatives_hits_files/5FTX.txt
# conda activate /proj/wallner-b/users/x_yogka/mambaforge/envs/barebones
run_cluster() {
PROTEIN="$1"
BASEPATH=/proj/wallner-b/users/x_yogka/AFsample3/af3-dev/notebooks
printf "\n> Processing $PROTEIN...\n"
python src/main.py \
--ensemble_dir "${BASEPATH}/casestudy/${PROTEIN}" \
--output_dir "${BASEPATH}/selection_out_test/${PROTEIN}" \
--protein_type multimer \
--cluster_method kmeans \
--n_clusters 10 \
--n_pca_components 10 \
--transformer tmscore \
--alpha 1 \
--n_processes 32 \
--ref_list_txt "${BASEPATH}/representatives_hits_files/${PROTEIN}.txt"
}
if [ $# -eq 0 ]; then
echo "Usage: $0 <protein_name(s)> or <protein_dir>"
exit 1
fi
if [ $# -eq 1 ] && [ -d "$1" ]; then
# Batch mode: directory input
for PROTEIN in $(ls "$1"); do
run_cluster "$PROTEIN"
done
else
# Single or multiple protein names
for PROTEIN in "$@"; do
run_cluster "$PROTEIN"
done
fi