Last active
July 26, 2021 14:01
-
-
Save universvm/f9f6f6d4506e4bbec54004bf4cd1d4e3 to your computer and use it in GitHub Desktop.
Convert TIMED-style benchmark predictions to json file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Written by Rokas Petrenas (https://github.com/rokaske199) | |
from benchmark import get_cath | |
from pathlib import Path | |
import json | |
PATH_TO_PDB=Path('/scratch/datasets/pdb/') | |
cath_location = "cath-domain-description-file.txt" | |
cath_df = get_cath.read_data(cath_location) | |
#select only monomers | |
new_df=get_cath.filter_with_user_list(cath_df,"/home/s1706179/project/sequence-recovery-benchmark/monomers_af2.txt") | |
#choose your model | |
path_to_file=Path("/home/s1706179/project/sequence-recovery-benchmark/publication_data/default.csv") | |
predictions = get_cath.load_prediction_matrix(new_df, path_to_file.with_suffix('.txt'), path_to_file) | |
sequences={} | |
for x in predictions: | |
sequences[x]=get_cath.most_likely_sequence(predictions[x]) | |
with open('monomers_af.json', 'w') as f: | |
json.dump(sequences, f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
monomers_af2.txt: https://gist.github.com/universvm/449a72b1f7f3cd033fe3381c695b4b49