<jupyter_start><jupyter_text>FATCAT - Structure SimilarityThis notebook shows how to run and parse FATCAT, a structural similarity calculator.<jupyter_code>import ssbio.protein.structure.properties.fatcat as fatcat
import os
import os.path as op
import tempfile

ROOT_DIR = tempfile.gettempdir()
OUT_DIR = op.join(ROOT_DIR, 'fatcat_testing')
if not op.exists(OUT_DIR):
    os.mkdir(OUT_DIR)
FATCAT_SH = 'fatcat'<jupyter_output><empty_output><jupyter_text>Pairwise<jupyter_code>fatcat_outfile = fatcat.run_fatcat(structure_path_1='../../ssbio/test/test_files/structures/12as-A_clean.pdb', 
                                   structure_path_2='../../ssbio/test/test_files/structures/1a9x-A_clean.pdb',
                                   outdir=OUT_DIR,
                                   fatcat_sh=FATCAT_SH, print_cmd=True, force_rerun=True)
print('Output file:', fatcat_outfile)
fatcat.parse_fatcat(fatcat_outfile)<jupyter_output><empty_output><jupyter_text>All-by-all<jupyter_code>structs = ['../../ssbio/test/test_files/structures/12as-A_clean.pdb', 
           '../../ssbio/test/test_files/structures/1af6-A_clean.pdb',
           '../../ssbio/test/test_files/structures/1a9x-A_clean.pdb']
tm_scores = fatcat.run_fatcat_all_by_all(structs, fatcat_sh=FATCAT_SH, outdir=OUT_DIR)
tm_scores
%matplotlib inline
import seaborn as sns
sns.heatmap(tm_scores)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12147505422993492, 'fraction_numerical': 0.008676789587852495, 'mean_word_length': 3.942857142857143, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '582772', 'license': 'MIT', 'n_tokens_mistral': 535, 'n_tokens_neox': 498, 'n_words': 62, 'path': 'docs/notebooks/FATCAT - Structure Similarity.ipynb', 'repo_name': 'JoshuaMeyers/ssbio', 'size': '1383'}