-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_SSAlign.py
More file actions
64 lines (49 loc) · 1.57 KB
/
run_SSAlign.py
File metadata and controls
64 lines (49 loc) · 1.57 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import subprocess
from pathlib import Path
import argparse
DB_TO_SCRIPT = {
"afdb50": "./AFDB50/AFDB50_SSAlign.py",
"scope40": "./SCOPe40/SCOPe40_SSAlign.py",
"swissprot": "./SwissProt/SwissProt_SSAlign.py",
}
def main():
parser = argparse.ArgumentParser(
description="Unified SSAlign runner via --db (pass-through all other args)."
)
parser.add_argument(
"--db",
required=True,
choices=sorted(DB_TO_SCRIPT.keys()),
help="Which database runner to use: afdb50 | scope40 | swissprot",
)
# 只解析 --db,其它参数全部透传给子脚本
args, rest = parser.parse_known_args()
here = Path(__file__).resolve().parent
rel = DB_TO_SCRIPT[args.db]
script_path = (here / rel).resolve()
if not script_path.exists():
print(f"[ERROR] script not found: {script_path}", file=sys.stderr)
sys.exit(2)
cmd = [sys.executable, str(script_path)] + rest
print(f"[RUN] db={args.db} -> {script_path}")
print("[CMD] " + " ".join(cmd))
r = subprocess.run(cmd)
sys.exit(r.returncode)
if __name__ == "__main__":
main()
"""
python run_SSAlign.py \
--db afdb50 \
--querypdbs "../pdbData/pdb/SwissProt/AF-A0BLX0-F1-model_v4.cif,../pdbData/pdb/SwissProt/AF-Q6ME97-F1-model_v4.cif" \
--dim 512 \
--prefilter_target 2000 \
--prefilter_threshold 0.3 \
--max_target 1000 \
--mode 1 \
--prefilter_mode cpu \
--out_dir "./results" \
--n_proc 64
"""