{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-12-05T10:33:10.271017Z","iopub.execute_input":"2022-12-05T10:33:10.271527Z","iopub.status.idle":"2022-12-05T10:33:10.310947Z","shell.execute_reply.started":"2022-12-05T10:33:10.271425Z","shell.execute_reply":"2022-12-05T10:33:10.309863Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd36_importances = pd.read_csv('/kaggle/input/research-project-01-around-multimodal-singlecell/CD36importances.csv')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:33:10.313212Z","iopub.execute_input":"2022-12-05T10:33:10.313900Z","iopub.status.idle":"2022-12-05T10:33:10.351145Z","shell.execute_reply.started":"2022-12-05T10:33:10.313861Z","shell.execute_reply":"2022-12-05T10:33:10.350294Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd36_importances.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:33:10.352535Z","iopub.execute_input":"2022-12-05T10:33:10.353106Z","iopub.status.idle":"2022-12-05T10:33:10.392770Z","shell.execute_reply.started":"2022-12-05T10:33:10.353073Z","shell.execute_reply":"2022-12-05T10:33:10.391161Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd36_importances_new = cd36_importances.loc[1:, :]\ncd36_importances_new.columns = cd36_importances.loc[0, :]","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:33:10.395001Z","iopub.execute_input":"2022-12-05T10:33:10.395588Z","iopub.status.idle":"2022-12-05T10:33:10.403048Z","shell.execute_reply.started":"2022-12-05T10:33:10.395550Z","shell.execute_reply":"2022-12-05T10:33:10.401918Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd36_importances_new.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:33:10.404812Z","iopub.execute_input":"2022-12-05T10:33:10.405725Z","iopub.status.idle":"2022-12-05T10:33:10.429492Z","shell.execute_reply.started":"2022-12-05T10:33:10.405689Z","shell.execute_reply":"2022-12-05T10:33:10.428325Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_cite_input_df = pd.read_hdf(\"/kaggle/input/open-problems-multimodal/train_cite_inputs.h5\")\ntrain_cite_target_df = pd.read_hdf(\"/kaggle/input/open-problems-multimodal/train_cite_targets.h5\")","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:33:10.431028Z","iopub.execute_input":"2022-12-05T10:33:10.431566Z","iopub.status.idle":"2022-12-05T10:34:03.274893Z","shell.execute_reply.started":"2022-12-05T10:33:10.431533Z","shell.execute_reply":"2022-12-05T10:34:03.274040Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_cite_input_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:03.276501Z","iopub.execute_input":"2022-12-05T10:34:03.276837Z","iopub.status.idle":"2022-12-05T10:34:03.313123Z","shell.execute_reply.started":"2022-12-05T10:34:03.276805Z","shell.execute_reply":"2022-12-05T10:34:03.311993Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_cite_target_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:03.314432Z","iopub.execute_input":"2022-12-05T10:34:03.314856Z","iopub.status.idle":"2022-12-05T10:34:03.340938Z","shell.execute_reply.started":"2022-12-05T10:34:03.314825Z","shell.execute_reply":"2022-12-05T10:34:03.339699Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfc = train_cite_input_df.rename(columns=lambda x: x.split('_')[0])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:03.342379Z","iopub.execute_input":"2022-12-05T10:34:03.342740Z","iopub.status.idle":"2022-12-05T10:34:05.679221Z","shell.execute_reply.started":"2022-12-05T10:34:03.342707Z","shell.execute_reply":"2022-12-05T10:34:05.678025Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfc.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:05.685076Z","iopub.execute_input":"2022-12-05T10:34:05.685472Z","iopub.status.idle":"2022-12-05T10:34:05.720669Z","shell.execute_reply.started":"2022-12-05T10:34:05.685435Z","shell.execute_reply":"2022-12-05T10:34:05.719744Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd36_importances_new.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:05.721991Z","iopub.execute_input":"2022-12-05T10:34:05.722642Z","iopub.status.idle":"2022-12-05T10:34:05.737493Z","shell.execute_reply.started":"2022-12-05T10:34:05.722606Z","shell.execute_reply":"2022-12-05T10:34:05.736415Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### SIM CD36 Correlation","metadata":{}},{"cell_type":"code","source":"sim_cd_list = cd36_importances_new['SEMANTIC'].tolist()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:05.739256Z","iopub.execute_input":"2022-12-05T10:34:05.739652Z","iopub.status.idle":"2022-12-05T10:34:05.751071Z","shell.execute_reply.started":"2022-12-05T10:34:05.739620Z","shell.execute_reply":"2022-12-05T10:34:05.749261Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%capture\n!pip install mygene","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:05.753735Z","iopub.execute_input":"2022-12-05T10:34:05.754145Z","iopub.status.idle":"2022-12-05T10:34:19.618200Z","shell.execute_reply.started":"2022-12-05T10:34:05.754104Z","shell.execute_reply":"2022-12-05T10:34:19.616597Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import mygene\nmg = mygene.MyGeneInfo()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:19.620540Z","iopub.execute_input":"2022-12-05T10:34:19.621307Z","iopub.status.idle":"2022-12-05T10:34:19.643524Z","shell.execute_reply.started":"2022-12-05T10:34:19.621239Z","shell.execute_reply":"2022-12-05T10:34:19.642356Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_cd_list_out = mg.querymany(sim_cd_list, scopes='symbol', fields='ensembl.gene', species='human')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:19.645378Z","iopub.execute_input":"2022-12-05T10:34:19.646044Z","iopub.status.idle":"2022-12-05T10:34:21.165432Z","shell.execute_reply.started":"2022-12-05T10:34:19.645991Z","shell.execute_reply":"2022-12-05T10:34:21.164472Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_cd_list_out = pd.DataFrame(sim_cd_list_out, columns=['query', '_id', '_score', 'ensembl'])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.167029Z","iopub.execute_input":"2022-12-05T10:34:21.167359Z","iopub.status.idle":"2022-12-05T10:34:21.174359Z","shell.execute_reply.started":"2022-12-05T10:34:21.167330Z","shell.execute_reply":"2022-12-05T10:34:21.173192Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_cd_list_out['sym_ensembl'] = df_sim_cd_list_out.ensembl.astype(str).str.extract(r\"{'gene': '(.*?)'}\")","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.175781Z","iopub.execute_input":"2022-12-05T10:34:21.176120Z","iopub.status.idle":"2022-12-05T10:34:21.189521Z","shell.execute_reply.started":"2022-12-05T10:34:21.176089Z","shell.execute_reply":"2022-12-05T10:34:21.188401Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_cd_list_out.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.191179Z","iopub.execute_input":"2022-12-05T10:34:21.191984Z","iopub.status.idle":"2022-12-05T10:34:21.214898Z","shell.execute_reply.started":"2022-12-05T10:34:21.191945Z","shell.execute_reply":"2022-12-05T10:34:21.213835Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_cd_ens_list = list(df_sim_cd_list_out['sym_ensembl'])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.216082Z","iopub.execute_input":"2022-12-05T10:34:21.216921Z","iopub.status.idle":"2022-12-05T10:34:21.222462Z","shell.execute_reply.started":"2022-12-05T10:34:21.216884Z","shell.execute_reply":"2022-12-05T10:34:21.221196Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfc_sim = dfc[dfc.columns.intersection(sim_cd_ens_list)]","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.224259Z","iopub.execute_input":"2022-12-05T10:34:21.225111Z","iopub.status.idle":"2022-12-05T10:34:21.257936Z","shell.execute_reply.started":"2022-12-05T10:34:21.225067Z","shell.execute_reply":"2022-12-05T10:34:21.256675Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfc_sim.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.259354Z","iopub.execute_input":"2022-12-05T10:34:21.260250Z","iopub.status.idle":"2022-12-05T10:34:21.291111Z","shell.execute_reply.started":"2022-12-05T10:34:21.260210Z","shell.execute_reply":"2022-12-05T10:34:21.289828Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_cd36 = train_cite_target_df[['CD36']]","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.292742Z","iopub.execute_input":"2022-12-05T10:34:21.293112Z","iopub.status.idle":"2022-12-05T10:34:21.304640Z","shell.execute_reply.started":"2022-12-05T10:34:21.293078Z","shell.execute_reply":"2022-12-05T10:34:21.302933Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_corr = df_cd36.apply(dfc_sim.corrwith)","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.306406Z","iopub.execute_input":"2022-12-05T10:34:21.306805Z","iopub.status.idle":"2022-12-05T10:34:21.965885Z","shell.execute_reply.started":"2022-12-05T10:34:21.306762Z","shell.execute_reply":"2022-12-05T10:34:21.964713Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_corr = df_sim_corr.reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.967365Z","iopub.execute_input":"2022-12-05T10:34:21.968246Z","iopub.status.idle":"2022-12-05T10:34:21.974681Z","shell.execute_reply.started":"2022-12-05T10:34:21.968210Z","shell.execute_reply":"2022-12-05T10:34:21.973373Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_cd_list = df_sim_corr['gene_id'].tolist()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.976480Z","iopub.execute_input":"2022-12-05T10:34:21.976921Z","iopub.status.idle":"2022-12-05T10:34:21.986062Z","shell.execute_reply.started":"2022-12-05T10:34:21.976878Z","shell.execute_reply":"2022-12-05T10:34:21.985028Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_cd_list_out = mg.querymany(sim_cd_list, scopes='ensembl.gene', fields='symbol', species='human')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:21.987615Z","iopub.execute_input":"2022-12-05T10:34:21.988057Z","iopub.status.idle":"2022-12-05T10:34:23.472164Z","shell.execute_reply.started":"2022-12-05T10:34:21.988013Z","shell.execute_reply":"2022-12-05T10:34:23.471007Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_cd_list_out = pd.DataFrame(sim_cd_list_out, columns=['query', '_id', '_score', 'symbol'])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:23.473392Z","iopub.execute_input":"2022-12-05T10:34:23.473686Z","iopub.status.idle":"2022-12-05T10:34:23.480520Z","shell.execute_reply.started":"2022-12-05T10:34:23.473658Z","shell.execute_reply":"2022-12-05T10:34:23.479334Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_sim_cd_list_out.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:23.489699Z","iopub.execute_input":"2022-12-05T10:34:23.490113Z","iopub.status.idle":"2022-12-05T10:34:23.502523Z","shell.execute_reply.started":"2022-12-05T10:34:23.490076Z","shell.execute_reply":"2022-12-05T10:34:23.501456Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_df_merge = pd.merge(df_sim_corr, df_sim_cd_list_out, left_on='gene_id', right_on='query')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:23.504342Z","iopub.execute_input":"2022-12-05T10:34:23.504796Z","iopub.status.idle":"2022-12-05T10:34:23.520825Z","shell.execute_reply.started":"2022-12-05T10:34:23.504755Z","shell.execute_reply":"2022-12-05T10:34:23.519532Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_df_merge.head()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:23.522475Z","iopub.execute_input":"2022-12-05T10:34:23.523157Z","iopub.status.idle":"2022-12-05T10:34:23.540118Z","shell.execute_reply.started":"2022-12-05T10:34:23.523114Z","shell.execute_reply":"2022-12-05T10:34:23.539296Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nfrom matplotlib.pyplot import figure\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:23.541819Z","iopub.execute_input":"2022-12-05T10:34:23.542119Z","iopub.status.idle":"2022-12-05T10:34:24.214490Z","shell.execute_reply.started":"2022-12-05T10:34:23.542090Z","shell.execute_reply":"2022-12-05T10:34:24.213470Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_df_merge_filter = sim_df_merge[sim_df_merge['symbol'] != 'CD36']","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.215808Z","iopub.execute_input":"2022-12-05T10:34:24.216145Z","iopub.status.idle":"2022-12-05T10:34:24.222576Z","shell.execute_reply.started":"2022-12-05T10:34:24.216115Z","shell.execute_reply":"2022-12-05T10:34:24.221744Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sim_df_merge_filter.to_csv('./sim_df_merge_filter.csv')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.224151Z","iopub.execute_input":"2022-12-05T10:34:24.224746Z","iopub.status.idle":"2022-12-05T10:34:24.337123Z","shell.execute_reply.started":"2022-12-05T10:34:24.224713Z","shell.execute_reply":"2022-12-05T10:34:24.335883Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"figure(num=None, figsize=(10,20), dpi=80, facecolor='w', edgecolor='r')\nsns.barplot(x=\"CD36\", y = \"symbol\" , data = sim_df_merge_filter)\nplt.xticks(rotation=90)\nplt.title(\"Similarity 100 neighbors CD36 correlation\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.338185Z","iopub.status.idle":"2022-12-05T10:34:24.338624Z","shell.execute_reply.started":"2022-12-05T10:34:24.338422Z","shell.execute_reply":"2022-12-05T10:34:24.338443Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### PPI CD36 Correlation","metadata":{}},{"cell_type":"code","source":"ppi_cd_list = cd36_importances_new['PPI'].tolist()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.340995Z","iopub.status.idle":"2022-12-05T10:34:24.341451Z","shell.execute_reply.started":"2022-12-05T10:34:24.341216Z","shell.execute_reply":"2022-12-05T10:34:24.341235Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_cd_list_out = mg.querymany(ppi_cd_list, scopes='symbol', fields='ensembl.gene', species='human')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.343373Z","iopub.status.idle":"2022-12-05T10:34:24.343864Z","shell.execute_reply.started":"2022-12-05T10:34:24.343592Z","shell.execute_reply":"2022-12-05T10:34:24.343667Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_ppi_cd_list_out = pd.DataFrame(ppi_cd_list_out, columns=['query', '_id', '_score', 'ensembl'])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.345636Z","iopub.status.idle":"2022-12-05T10:34:24.346466Z","shell.execute_reply.started":"2022-12-05T10:34:24.346175Z","shell.execute_reply":"2022-12-05T10:34:24.346212Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_ppi_cd_list_out['ppi_ensembl'] = df_ppi_cd_list_out.ensembl.astype(str).str.extract(r\"{'gene': '(.*?)'}\")","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.348095Z","iopub.status.idle":"2022-12-05T10:34:24.348521Z","shell.execute_reply.started":"2022-12-05T10:34:24.348313Z","shell.execute_reply":"2022-12-05T10:34:24.348333Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_cd_ens_list = list(df_ppi_cd_list_out['ppi_ensembl'])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.350531Z","iopub.status.idle":"2022-12-05T10:34:24.350987Z","shell.execute_reply.started":"2022-12-05T10:34:24.350771Z","shell.execute_reply":"2022-12-05T10:34:24.350793Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfc_ppi = dfc[dfc.columns.intersection(ppi_cd_ens_list)]","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.352700Z","iopub.status.idle":"2022-12-05T10:34:24.353352Z","shell.execute_reply.started":"2022-12-05T10:34:24.353110Z","shell.execute_reply":"2022-12-05T10:34:24.353132Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_ppi_corr = df_cd36.apply(dfc_ppi.corrwith)","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.355032Z","iopub.status.idle":"2022-12-05T10:34:24.355901Z","shell.execute_reply.started":"2022-12-05T10:34:24.355660Z","shell.execute_reply":"2022-12-05T10:34:24.355712Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_ppi_corr = df_ppi_corr.reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.357248Z","iopub.status.idle":"2022-12-05T10:34:24.357708Z","shell.execute_reply.started":"2022-12-05T10:34:24.357466Z","shell.execute_reply":"2022-12-05T10:34:24.357486Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_cd_list = df_ppi_corr['gene_id'].tolist()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.359298Z","iopub.status.idle":"2022-12-05T10:34:24.359690Z","shell.execute_reply.started":"2022-12-05T10:34:24.359503Z","shell.execute_reply":"2022-12-05T10:34:24.359522Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_cd_list_out = mg.querymany(ppi_cd_list, scopes='ensembl.gene', fields='symbol', species='human')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.361386Z","iopub.status.idle":"2022-12-05T10:34:24.361771Z","shell.execute_reply.started":"2022-12-05T10:34:24.361586Z","shell.execute_reply":"2022-12-05T10:34:24.361604Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_ppi_cd_list_out = pd.DataFrame(ppi_cd_list_out, columns=['query', '_id', '_score', 'symbol'])","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.362959Z","iopub.status.idle":"2022-12-05T10:34:24.363379Z","shell.execute_reply.started":"2022-12-05T10:34:24.363159Z","shell.execute_reply":"2022-12-05T10:34:24.363178Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_df_merge = pd.merge(df_ppi_corr, df_ppi_cd_list_out, left_on='gene_id', right_on='query')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.365319Z","iopub.status.idle":"2022-12-05T10:34:24.365703Z","shell.execute_reply.started":"2022-12-05T10:34:24.365518Z","shell.execute_reply":"2022-12-05T10:34:24.365537Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_df_merge_filter = ppi_df_merge[ppi_df_merge['symbol'] != 'CD36']","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.367386Z","iopub.status.idle":"2022-12-05T10:34:24.367763Z","shell.execute_reply.started":"2022-12-05T10:34:24.367579Z","shell.execute_reply":"2022-12-05T10:34:24.367598Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"figure(num=None, figsize=(10,20), dpi=80, facecolor='w', edgecolor='r')\nsns.barplot(x=\"CD36\", y = \"symbol\" , data = ppi_df_merge_filter)\nplt.xticks(rotation=90)\nplt.title(\"PPI 100 neighbors CD36 correlation\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.369762Z","iopub.status.idle":"2022-12-05T10:34:24.370607Z","shell.execute_reply.started":"2022-12-05T10:34:24.370387Z","shell.execute_reply":"2022-12-05T10:34:24.370410Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ppi_df_merge_filter.to_csv('./ppi_df_merge_filter.csv')","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.372536Z","iopub.status.idle":"2022-12-05T10:34:24.372913Z","shell.execute_reply.started":"2022-12-05T10:34:24.372731Z","shell.execute_reply":"2022-12-05T10:34:24.372749Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Сorrelation coefficients mean values","metadata":{}},{"cell_type":"code","source":"abs(sim_df_merge_filter.CD36).mean()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.374600Z","iopub.status.idle":"2022-12-05T10:34:24.374988Z","shell.execute_reply.started":"2022-12-05T10:34:24.374802Z","shell.execute_reply":"2022-12-05T10:34:24.374821Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"abs(ppi_df_merge_filter.CD36).mean()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.376204Z","iopub.status.idle":"2022-12-05T10:34:24.376599Z","shell.execute_reply.started":"2022-12-05T10:34:24.376414Z","shell.execute_reply":"2022-12-05T10:34:24.376432Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Сorrelation coefficients distribution","metadata":{}},{"cell_type":"code","source":"import time","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.377905Z","iopub.status.idle":"2022-12-05T10:34:24.378368Z","shell.execute_reply.started":"2022-12-05T10:34:24.378101Z","shell.execute_reply":"2022-12-05T10:34:24.378120Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(14,8))\nplt.hist(sim_df_merge_filter.CD36, bins = 50)\nplt.title('Sim correlation coefficients distribution')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.380353Z","iopub.status.idle":"2022-12-05T10:34:24.380914Z","shell.execute_reply.started":"2022-12-05T10:34:24.380694Z","shell.execute_reply":"2022-12-05T10:34:24.380717Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(14,8))\nplt.hist(ppi_df_merge_filter.CD36, bins = 50)\nplt.title('PPI correlation coefficients distribution')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-12-05T10:34:24.382285Z","iopub.status.idle":"2022-12-05T10:34:24.382702Z","shell.execute_reply.started":"2022-12-05T10:34:24.382517Z","shell.execute_reply":"2022-12-05T10:34:24.382536Z"},"trusted":true},"execution_count":null,"outputs":[]}]}