-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_inference.py
More file actions
28 lines (26 loc) · 831 Bytes
/
run_inference.py
File metadata and controls
28 lines (26 loc) · 831 Bytes
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
#!/home/kmm5/.conda/envs/bio/bin/python3.8
import os
import sys
import data.system_object
# Single DCA run
sysid = sys.argv[1].strip(".fa")
aln_dir = sys.argv[2]
# sysid = "1cc8A"
# aln_dir = "aln"
root = os.getcwd()
out = "/scratch/kmm5/single/"
# out = "tests/single/"
if not os.path.exists(out):
os.makedirs(out)
matlab_dir = os.path.join(root, "mf_plm_reweight")
print(f"System ID: {sysid}\nRoot folder: {root}\noutput folder: {out}")
s = data.system_object.System()
s.set_sysid(sysid)
s.set_align_dir(os.path.join(root, aln_dir))
s.make_new_dirs(root, out, replicates=False)
s.check_dir()
# for a range of pct_gaps [0.05, 0.1, 0.15, 0.2]
gap_list = [0.05, 0.1, 0.15, 0.2]
s.filter(run=True, pct_gaps=gap_list[1])
neff = s.run_inference(_len_list=None, _nreplicates=1, _dir_dca=matlab_dir, passthrough=False)
print(neff)