Commit 2d388d37 by Yasser Mohseni

Updates

parent 53cba40d
......@@ -137,7 +137,7 @@ Example
Each output represents interface of a conformation and contains a set of local environments (*e.g. atomic density map, structure classes (S,C,R), topology of the interface, ...*)
An atomic density map is a 4 dimensional tensor: a voxelized 3D grid with a size of ```24*24*24```. Each voxel encodes some characteristics of the protein atoms. Namely, the first 167 dimensions correspond to the
atom types that can be found in amino acids (without the hydrogen). This dimension can be reduced to 4 element symbols (C,N,O,S) by running ```python generate_cubes_reduce_channels_multiproc.py``` (ATTENTION: This code overwrites the existing files).
atom types that can be found in amino acids (without the hydrogen). This dimension can be reduced to 4 element symbols (C,N,O,S) by running ```python generate_cubes_reduce_channels_multiproc.py``` (ATTENTION: This code overwrites the existing files). Dimension reduction must be applied in order to use models of BM5 as well as the general model.
### Deep learning framework
......@@ -169,7 +169,7 @@ One can associate the Residues' numbers, regions, scores, and partner to evaluat
#### Extraction of the embeddings
From directory 'Test' run ```python extract_embeddings.py```
It extracts embeddings and the topology for each given interface and write them in a an output file with the same name. Each row in a file belongs to a residue and includes the its coordinates, its region, and its embedding vector. These files can be used for aggregation of embeddings based on graph-learning.
It extracts embeddings and the topology for given interfaces and write them in directory 'Examples/intermediate'. For each conformation it produces an output file with the same name. Each row in a file belongs to a residue and includes the its coordinates, its region, and its embedding vector. These files can be used for aggregation of embeddings based on graph-learning.
#### Acknowledgement
We would like to thank Dr. Sergei Grudinin and his team for helping us with the initial source code of ```maps_generator``` and ```load_data.py```. See [Ornate](https://academic.oup.com/bioinformatics/article/35/18/3313/5341430?login=true).
......
......@@ -95,7 +95,8 @@ if path.isdir(intermediate_dir):
shutil.rmtree(intermediate_dir)
mkdir(intermediate_dir)
model = load_model(path.join('../Examples', 'MODELS', 'Dockground', '0_model'))
#model = load_model(path.join('../Models', 'Dockground', '0_model'))
model = load_model(path.join('../Models', 'BM5', '0_model'))
def load_map(sample_path):
check_call(
......@@ -138,7 +139,7 @@ for test_interface in batch_samples_test:
intermediate_prediction = intermediate_model.predict([X_test, X_aux], batch_size=X_test.shape[0])
_ = gc.collect()
with open(test_interface.replace(map_dir, intermediate_dir).replace('.pkl','.graph'),'w') as f_handler_graph:
with open(test_interface.replace(map_dir, intermediate_dir).replace('.pkl.lz4','.graph'),'w') as f_handler_graph:
for i in range(len(X_test)):
f_handler_graph.write(','.join(list(map(lambda x: str(x), res_pos[i]))) + ',' +
reg_type[i] + ',' +
......
......@@ -81,8 +81,8 @@ map_dir = '../Examples/map_dir'
samples_test = listdir(map_dir)
#model = load_model(path.join('../Examples', 'MODELS', 'Dockground', '0_model'))
model = load_model(path.join('../Examples', 'MODELS', 'BM5', '0_model'))
#model = load_model(path.join('../Models', 'Dockground', '0_model'))
model = load_model(path.join('../Models', 'BM5', '0_model'))
predictions_file = open('../Examples/predictions_SCR', 'w')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment