<jupyter_start><jupyter_text>Kinase profiling dataShow here how to load different profiling datasets.<jupyter_code>from pathlib import Path

import json
import pandas as pd
HERE = Path(_dh[-1])  # noqa: F821<jupyter_output><empty_output><jupyter_text>Karaman dataset<jupyter_code>karaman_path = HERE / "Karaman/Karaman_profiling.js"
with open(karaman_path, "r") as f:
    json_string = f.read()
json_string_cleaned = json_string.replace("=", ": ").replace(";", ", ").replace("\n", "")
json_string_cleaned = json_string_cleaned.replace("karaman_compounds", "\"karaman_compounds\"")
json_string_cleaned = json_string_cleaned.replace("karaman_profiling", "\"karaman_profiling\"")
json_string_cleaned = json_string_cleaned[:-3] + "}"
karaman_dict = json.loads(json_string_cleaned)

karaman_df = {}
for ligand, measures in karaman_dict["karaman_profiling"].items():
    karaman_df[ligand] = {measure["xName"]: measure["Kd(nM)"] for measure in measures}
karaman_df = pd.DataFrame(karaman_df)
print(karaman_df.shape)
karaman_df.head()<jupyter_output>(268, 30)<jupyter_text>PKIS2 dataset<jupyter_code>pkis2_path = HERE / "PKIS2/pone.0181585.s004.xlsx"
pkis2_df = pd.read_excel(pkis2_path)
pkis2_df = pkis2_df.set_index("Compound").iloc[:-1, 6:]
print(pkis2_df.shape)
pkis2_df.head()<jupyter_output>(645, 406)
{'fraction_non_alphanumeric': 0.14692307692307693, 'fraction_numerical': 0.02846153846153846, 'mean_word_length': 8.097902097902098, 'pattern_counts': {'":': 1, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '627605', 'license': 'MIT', 'n_tokens_mistral': 554, 'n_tokens_neox': 505, 'n_words': 76, 'path': 'data/external/profiling/kinase_profiling_data.ipynb', 'repo_name': 'volkamerlab/kissim_app', 'size': '1300'}