{"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)\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport plotly.express as px\nimport plotly.graph_objs as go\n\nimport plotly\nplotly.offline.init_notebook_mode(connected=True)\n\nimport matplotlib.ticker as ticker\n\npd.set_option('display.max_columns', 120)\n\n#Ignore warnings\nimport warnings\nwarnings.filterwarnings('ignore')\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","_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:28:18.192181Z","iopub.execute_input":"2022-08-22T15:28:18.192739Z","iopub.status.idle":"2022-08-22T15:28:20.732878Z","shell.execute_reply.started":"2022-08-22T15:28:18.192687Z","shell.execute_reply":"2022-08-22T15:28:20.731546Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Multimodal Single-Cell Integration\n\n\"The goal of this competition is to predict how DNA, RNA, and protein measurements co-vary in single cells as bone marrow stem cells develop into more mature blood cells. You will develop a model trained on a subset of 300,000-cell time course dataset of CD34+ hematopoietic stem and progenitor cells (HSPC) from four human donors at five time points generated for this competition by Cellarity, a cell-centric drug creation company.\"\n\nhttps://www.kaggle.com/competitions/open-problems-multimodal/overview/description","metadata":{}},{"cell_type":"markdown","source":"![](https://openproblems.bio/media/sharing.jpg)https://openproblems.bio/","metadata":{}},{"cell_type":"markdown","source":"#In this competition HDF5 (h5) file is being used too. I'm going to make an effort to learn a little bit.\n\n\n#Back on a time machine: Six years ago we have kagglegym API influenced by OpenAI's Gym API. Not working anymore.","metadata":{}},{"cell_type":"code","source":"!pip install gym","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:18:32.830462Z","iopub.execute_input":"2022-08-22T15:18:32.831134Z","iopub.status.idle":"2022-08-22T15:18:48.977241Z","shell.execute_reply.started":"2022-08-22T15:18:32.831075Z","shell.execute_reply":"2022-08-22T15:18:48.975191Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Install Tables to avoid error that didn't exist 6 years ago.\n\nImportError: Missing optional dependency 'tables'.  Use pip or conda to install tables.","metadata":{}},{"cell_type":"code","source":"!pip install tables","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:18:57.456794Z","iopub.execute_input":"2022-08-22T15:18:57.457696Z","iopub.status.idle":"2022-08-22T15:19:12.279501Z","shell.execute_reply.started":"2022-08-22T15:18:57.457638Z","shell.execute_reply":"2022-08-22T15:19:12.277340Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#We have more than one h5 file. Below, let's check train_cite_targets.h5","metadata":{}},{"cell_type":"markdown","source":"![](https://i.ytimg.com/vi/GUWiQ5u1_I8/mqdefault.jpg)youtube.com","metadata":{}},{"cell_type":"code","source":"#Code by Jeff Moser https://www.kaggle.com/code/jeffmoser/kagglegym-api-overview\n#SRK https://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\nwith pd.HDFStore(\"../input/open-problems-multimodal/train_cite_targets.h5\", \"r\") as train:\n    # Note that the \"train\" dataframe is the only dataframe in the file\n    df = train.get(\"train_cite_targets\")","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:19:15.760712Z","iopub.execute_input":"2022-08-22T15:19:15.761964Z","iopub.status.idle":"2022-08-22T15:19:16.597586Z","shell.execute_reply.started":"2022-08-22T15:19:15.761893Z","shell.execute_reply":"2022-08-22T15:19:16.595767Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Let's see how many rows are in full training set\nlen(df)","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:19:22.970714Z","iopub.execute_input":"2022-08-22T15:19:22.971218Z","iopub.status.idle":"2022-08-22T15:19:22.982034Z","shell.execute_reply.started":"2022-08-22T15:19:22.971177Z","shell.execute_reply":"2022-08-22T15:19:22.980660Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:19:28.676006Z","iopub.execute_input":"2022-08-22T15:19:28.676555Z","iopub.status.idle":"2022-08-22T15:19:28.794844Z","shell.execute_reply.started":"2022-08-22T15:19:28.676496Z","shell.execute_reply":"2022-08-22T15:19:28.793142Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Gym\n\n@misc{1606.01540,\n  Author = {Greg Brockman and Vicki Cheung and Ludwig Pettersson and Jonas Schneider and John Schulman and Jie Tang and Wojciech Zaremba},\n  Title = {OpenAI Gym},\n  Year = {2016},\n  Eprint = {arXiv:1606.01540},\n}\n\nhttps://github.com/openai/gym","metadata":{}},{"cell_type":"markdown","source":"#Since kagglegym doesn't work anymore let's try The Gym that is still \"open\" to work out.\n\nHowever, we need an environment to make the observations. The only that I found was CartPole-v1 because it was written on their GitHub page.\n\nhttps://github.com/openai/gym","metadata":{}},{"cell_type":"code","source":"import gym","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:19:36.633535Z","iopub.execute_input":"2022-08-22T15:19:36.634187Z","iopub.status.idle":"2022-08-22T15:19:37.084941Z","shell.execute_reply.started":"2022-08-22T15:19:36.634124Z","shell.execute_reply":"2022-08-22T15:19:37.083522Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#The Environment\n\n\"Now, we need to create an \"environment\". This will be our primary interface to the API. The kagglegym API had the concept of a default environment name for a competition, so just calling make() will create the appropriate one for this competition.\"\n\nhttps://www.kaggle.com/code/jeffmoser/kagglegym-api-overview\n\nNowadays, calling make ()  doesn't make anything without the environment!","metadata":{}},{"cell_type":"code","source":"#https://github.com/openai/gym\n\n#https://github.com/openai/gym/blob/master/gym/envs/classic_control/cartpole.py\n#All environments end in a suffix like \"_v0\n\n# Create environment\nenv = gym.make(\"CartPole-v1\")\nobservation, info = env.reset(seed=42, return_info=True)\n\nfor _ in range(1000):\n    action = env.action_space.sample()\n    observation, reward, done, info = env.step(action)\n\n    if done:\n        observation, info = env.reset(return_info=True)\nenv.close()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:19:50.100811Z","iopub.execute_input":"2022-08-22T15:19:50.101321Z","iopub.status.idle":"2022-08-22T15:19:50.143156Z","shell.execute_reply.started":"2022-08-22T15:19:50.101280Z","shell.execute_reply":"2022-08-22T15:19:50.141748Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"WARN: Initializing environment in old step API which returns one bool instead of two. It is recommended to set `new_step_api=True` to use new step API. This will be the default behaviour in future.\n\nRun the snippet above again and the warn doesn't show. Nice! ","metadata":{}},{"cell_type":"markdown","source":"\"To properly initialize things, we need to \"reset\" the environment. This will also give us our first \"observation\"\n\nhttps://www.kaggle.com/code/jeffmoser/kagglegym-api-overview","metadata":{}},{"cell_type":"code","source":"#https://www.kaggle.com/code/jeffmoser/kagglegym-api-overview\n\n# Get first observation\nobservation = env.reset()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:19:56.755051Z","iopub.execute_input":"2022-08-22T15:19:56.755564Z","iopub.status.idle":"2022-08-22T15:19:56.761453Z","shell.execute_reply.started":"2022-08-22T15:19:56.755520Z","shell.execute_reply":"2022-08-22T15:19:56.760090Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"\"Observations are the means by which our code \"observes\" the world. The very first observation has a special property called \"train\" which is a dataframe which we can use to train our model:\"\n\nhttps://www.kaggle.com/code/jeffmoser/kagglegym-api-overview\n\n\nBelow, I got \"AttributeError: 'numpy.ndarray' object has no attribute 'train' I changed train to train_cite_targets and didn't work too.  Therefore, I decided to stop with the Gym since I've no clue how to go further. ","metadata":{}},{"cell_type":"code","source":"# Look at first few rows of the train dataframe\nobservation.train.head()","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-21T22:11:21.154408Z","iopub.execute_input":"2022-08-21T22:11:21.154890Z","iopub.status.idle":"2022-08-21T22:11:21.183938Z","shell.execute_reply.started":"2022-08-21T22:11:21.154851Z","shell.execute_reply":"2022-08-21T22:11:21.182560Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"\"Perhaps most interesting is the \"reward\" variable. This tells you how well you're doing. The goal in reinforcement contexts is that you want to maximize the reward. In this competition, we're using the R value that ranges from -1 to 1 (higher is better). Note that we submitted all 0's, so we got a score that's below 0. If we had correctly predicted the true mean value, we would have gotten all zeros. If we had made extreme predictions (e.g. all -1000's) then our score would have been capped to -1.\"\n\nhttps://www.kaggle.com/code/jeffmoser/kagglegym-api-overview","metadata":{}},{"cell_type":"code","source":"# Print reward\nreward","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:20:32.156260Z","iopub.execute_input":"2022-08-22T15:20:32.156773Z","iopub.status.idle":"2022-08-22T15:20:32.165360Z","shell.execute_reply.started":"2022-08-22T15:20:32.156731Z","shell.execute_reply":"2022-08-22T15:20:32.163982Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Print done ... still more remaining\ndone","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:20:37.341442Z","iopub.execute_input":"2022-08-22T15:20:37.341943Z","iopub.status.idle":"2022-08-22T15:20:37.350020Z","shell.execute_reply.started":"2022-08-22T15:20:37.341902Z","shell.execute_reply":"2022-08-22T15:20:37.348678Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Let's move forward without any Gym.","metadata":{}},{"cell_type":"code","source":"df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:20:42.711059Z","iopub.execute_input":"2022-08-22T15:20:42.711561Z","iopub.status.idle":"2022-08-22T15:20:43.649413Z","shell.execute_reply.started":"2022-08-22T15:20:42.711490Z","shell.execute_reply":"2022-08-22T15:20:43.647943Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by SRK https://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\nlabels = []\nvalues = []\nfor col in df.columns:\n    labels.append(col)\n    values.append(df[col].isnull().sum())\n    print(col, values[-1])","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:20:51.204927Z","iopub.execute_input":"2022-08-22T15:20:51.206083Z","iopub.status.idle":"2022-08-22T15:20:51.265040Z","shell.execute_reply.started":"2022-08-22T15:20:51.206026Z","shell.execute_reply":"2022-08-22T15:20:51.263638Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#No Missing??","metadata":{"_kg_hide-input":false}},{"cell_type":"code","source":"#Code by SRK https://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\n#Save for the next time if we have missing values\n\nind = np.arange(len(labels))\nwidth = 0.9\nfig, ax = plt.subplots(figsize=(12,50))\nrects = ax.barh(ind, np.array(values), color='y')\nax.set_yticks(ind+((width)/2.))\nax.set_yticklabels(labels, rotation='horizontal')\nax.set_xlabel(\"Count of missing values\")\nax.set_title(\"Number of missing values in each column\")\n#autolabel(rects)\nplt.show()","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:21:06.597222Z","iopub.execute_input":"2022-08-22T15:21:06.597790Z","iopub.status.idle":"2022-08-22T15:21:08.705840Z","shell.execute_reply.started":"2022-08-22T15:21:06.597741Z","shell.execute_reply":"2022-08-22T15:21:08.704387Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.columns.tolist()","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:21:28.625546Z","iopub.execute_input":"2022-08-22T15:21:28.626138Z","iopub.status.idle":"2022-08-22T15:21:28.637607Z","shell.execute_reply.started":"2022-08-22T15:21:28.626088Z","shell.execute_reply":"2022-08-22T15:21:28.636015Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#The Mighty Mouse. Rodents in Biomedical Research\n\nThe Mighty Mouse: The Impact of Rodents on Advances in Biomedical Research\n\nBryda EC. The Mighty Mouse: the impact of rodents on advances in biomedical research. Mo Med. 2013 May-Jun;110(3):207-11. PMID: 23829104; PMCID: PMC3987984.\n\n\"Mice and rats have long served as the preferred species for biomedical research animal models due to their anatomical, physiological, and genetic similarity to humans. Advantages of rodents include their small size, ease of maintenance, short life cycle, and abundant genetic resources. The Rat Resource and Research Center (RRRC) and the MU Mutant Mouse Regional Resource Center (MMRRC) serve as centralized repositories for the preservation and distribution of the ever increasing number of rodent models.\"\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC3987984/","metadata":{}},{"cell_type":"code","source":"# How many Mouse-IgG1 are in the full training set?\nlen(df[\"Mouse-IgG1\"].unique())","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:21:43.236947Z","iopub.execute_input":"2022-08-22T15:21:43.237456Z","iopub.status.idle":"2022-08-22T15:21:43.253881Z","shell.execute_reply.started":"2022-08-22T15:21:43.237394Z","shell.execute_reply":"2022-08-22T15:21:43.252613Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Checking Mouse and Rat IgG\n\nBryda EC. The Mighty Mouse: the impact of rodents on advances in biomedical research. Mo Med. 2013 May-Jun;110(3):207-11. PMID: 23829104; PMCID: PMC3987984.\n\n\"Laboratory rats and mice provide ideal animal models for biomedical research and comparative medicine studies because they have many similarities to humans in terms of anatomy and physiology. Likewise, rats, mice, and humans each have approximately 30,000 genes of which approximately 95% are shared by all three species.\"\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC3987984/\n\nSince I couldn't find kagglegym and I didn't make with simple gym, Let's plot of these 4 variables. ","metadata":{}},{"cell_type":"code","source":"#Code by SRK https://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\ncols_to_use = ['Mouse-IgG1', 'Mouse-IgG2a', 'Mouse-IgG2b', 'Rat-IgG2b']\nfig = plt.figure(figsize=(8, 20))\nplot_count = 0\nfor col in cols_to_use:\n    plot_count += 1\n    plt.subplot(4, 1, plot_count)\n    plt.scatter(range(df.shape[0]), df[col].values)\n    plt.title(\"Distribution of \"+col)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:21:50.393573Z","iopub.execute_input":"2022-08-22T15:21:50.394485Z","iopub.status.idle":"2022-08-22T15:21:51.766565Z","shell.execute_reply.started":"2022-08-22T15:21:50.394417Z","shell.execute_reply":"2022-08-22T15:21:51.764920Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Choosing the best species\n\nBryda EC. The Mighty Mouse: the impact of rodents on advances in biomedical research. Mo Med. 2013 May-Jun;110(3):207-11. PMID: 23829104; PMCID: PMC3987984.\n\n\"In the past, the use of the mouse often eclipsed that of the rat because of the availability of better molecular techniques to manipulate the mouse genome. Recent advances in genetic tools to create knockout rat models promise to eliminate these barriers and may lead to an increase in the use of rats for a wider variety of biomedical research.\"\n\n\"Ultimately, the choice of rodent model depends on which species more closely recapitulates the symptoms and disease process seen in humans. It is clear that rats are not simply huge mice and that each species has advantages and disadvantages that often depend on the particular process or gene being studied.\"\n\n\"From a translational medicine standpoint, it is particularly critical to choose the appropriate model because a tremendous amount of money is spent testing drugs and therapies that ultimately fail at various stages of pre-clinical and clinical trials. One reason for this is that results obtained in animal trials do not always accurately reflect outcomes in humans.\"\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC3987984/","metadata":{}},{"cell_type":"markdown","source":"#Plot of Podoplanin variable.\n\n\"Podoplanin (PDPN) is a 38–44 kDa O-glycosylated transmembrane glycoprotein that is selectively expressed by lymphatic endothelial cells. PDPN is also expressed by normal kidney podocytes, alveolar type I cells, basal epidermal keratinocytes, and mesothelial cells\"\n\nhttps://molecular-cancer.biomedcentral.com/articles/10.1186/1476-4598-12-168#:~:text=Podoplanin%20(PDPN)%20is%20a%2038,cells%20%5B18%2C%2019%5D.","metadata":{}},{"cell_type":"code","source":"#Code by Puru Behl https://www.kaggle.com/accountstatus/mt-cars-data-analysis\n\nsns.distplot(df['Podoplanin'])\nplt.axvline(df['Podoplanin'].values.mean(), color='red', linestyle='dashed', linewidth=1)\nplt.title('Podoplanin distribution');","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-08-22T15:22:01.663862Z","iopub.execute_input":"2022-08-22T15:22:01.664402Z","iopub.status.idle":"2022-08-22T15:22:02.435519Z","shell.execute_reply.started":"2022-08-22T15:22:01.664355Z","shell.execute_reply":"2022-08-22T15:22:02.434123Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by SRK https://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\nplt.figure(figsize=(8, 5))\nplt.scatter(range(df.shape[0]), df.Podoplanin.values)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:22:18.812218Z","iopub.execute_input":"2022-08-22T15:22:18.812750Z","iopub.status.idle":"2022-08-22T15:22:19.197284Z","shell.execute_reply.started":"2022-08-22T15:22:18.812707Z","shell.execute_reply":"2022-08-22T15:22:19.195312Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Competition Evaluation: Pearson correlation coefficient\n\n\"We use the Pearson correlation coefficient to rank submissions. For each observation in the Multiome data set, we compute the correlation between the ground-truth gene expressions and the predicted gene expressions. For each observation in the CITEseq data set, we compute the correlation between ground-truth surface protein levels and predicted surface protein levels. The overall score is the average of each sample's correlation score. If a sample's predictions are all the same, the correlation for that sample is scored as -1.0.\"\n\nhttps://www.kaggle.com/competitions/open-problems-multimodal/overview/evaluation","metadata":{}},{"cell_type":"code","source":"#Code by SRK  https://www.kaggle.com/code/sudalairajkumar/univariate-analysis-regression-lb-0-006\n\ncols_to_use = ['Mouse-IgG1', 'Mouse-IgG2a', 'Mouse-IgG2b', 'Rat-IgG2b']\n\ntemp_df = df[cols_to_use]\ncorrmat = temp_df.corr(method='pearson')\nf, ax = plt.subplots(figsize=(8, 8))\n\n# Draw the heatmap using seaborn\nsns.heatmap(corrmat, vmax=.8, square=True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:22:26.789313Z","iopub.execute_input":"2022-08-22T15:22:26.789995Z","iopub.status.idle":"2022-08-22T15:22:27.106896Z","shell.execute_reply.started":"2022-08-22T15:22:26.789934Z","shell.execute_reply":"2022-08-22T15:22:27.105122Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Future of Rodent Models in Biomedical Research\n\nBryda EC. The Mighty Mouse: the impact of rodents on advances in biomedical research. Mo Med. 2013 May-Jun;110(3):207-11. PMID: 23829104; PMCID: PMC3987984.\n\n\"Rats and mice will continue to play a central role in biomedical research. Increasingly sophisticated manipulations of rodent models, including the creation of so called “humanized” rodents that carry human genes, cells, tissues, or organs may lead to improved and refined models for developing therapeutics for human disease.\"\n\n\"The power of comparative medicine and the use of mice and rats will continue to provide a powerful tool for advancing the understanding of both normal and disease processes across species and facilitate the transition of research from “bench to bedside” to improve human health.\"\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC3987984/","metadata":{}},{"cell_type":"code","source":"#Code by SRK https://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\nwith pd.HDFStore(\"../input/open-problems-multimodal/train_cite_inputs.h5\", \"r\") as train:\n    # Note that the \"train\" dataframe is the only dataframe in the file\n    df1 = train.get(\"train_cite_inputs\")","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:22:45.427502Z","iopub.execute_input":"2022-08-22T15:22:45.428896Z","iopub.status.idle":"2022-08-22T15:24:24.350736Z","shell.execute_reply.started":"2022-08-22T15:22:45.428829Z","shell.execute_reply":"2022-08-22T15:24:24.348287Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1.head(2)","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:24:29.853583Z","iopub.execute_input":"2022-08-22T15:24:29.855606Z","iopub.status.idle":"2022-08-22T15:24:30.028020Z","shell.execute_reply.started":"2022-08-22T15:24:29.855537Z","shell.execute_reply":"2022-08-22T15:24:30.026616Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#I'm so screwed. Wow 22050 columns?? ","metadata":{}},{"cell_type":"code","source":"# Let's see how many rows are in full training set\nlen(df1)","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:24:37.180378Z","iopub.execute_input":"2022-08-22T15:24:37.180885Z","iopub.status.idle":"2022-08-22T15:24:37.188959Z","shell.execute_reply.started":"2022-08-22T15:24:37.180845Z","shell.execute_reply":"2022-08-22T15:24:37.187633Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1.isnull().sum()","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:24:42.815161Z","iopub.execute_input":"2022-08-22T15:24:42.815605Z","iopub.status.idle":"2022-08-22T15:24:46.031869Z","shell.execute_reply.started":"2022-08-22T15:24:42.815567Z","shell.execute_reply":"2022-08-22T15:24:46.030610Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1.columns.tolist()","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-08-22T15:24:59.671983Z","iopub.execute_input":"2022-08-22T15:24:59.672455Z","iopub.status.idle":"2022-08-22T15:24:59.698864Z","shell.execute_reply.started":"2022-08-22T15:24:59.672414Z","shell.execute_reply":"2022-08-22T15:24:59.697605Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Saving the charts below for next time, since I was not well succeeded here too. ","metadata":{}},{"cell_type":"code","source":"#Code by Paul Perry https://www.kaggle.com/code/paulperry/technical-16-friend-of-time\n\nt16 = df1.loc[(df1.ENSG00000175899_A2M == 288) & (df1.ENSG00000121410_A1BG != 0.0)  & (~df1.ENSG00000121410_A1BG.isnull()) ,['ENSG00000175899_A2M', 'ENSG00000121410_A1BG']]\nax = t16.plot(use_index=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:25:14.765726Z","iopub.execute_input":"2022-08-22T15:25:14.766161Z","iopub.status.idle":"2022-08-22T15:25:15.027385Z","shell.execute_reply.started":"2022-08-22T15:25:14.766127Z","shell.execute_reply":"2022-08-22T15:25:15.026031Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Paul Perry https://www.kaggle.com/code/paulperry/technical-16-friend-of-time\n\nax=t16.ENSG00000121410_A1BG.plot(use_index=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:25:40.779755Z","iopub.execute_input":"2022-08-22T15:25:40.780399Z","iopub.status.idle":"2022-08-22T15:25:40.980986Z","shell.execute_reply.started":"2022-08-22T15:25:40.780343Z","shell.execute_reply":"2022-08-22T15:25:40.979749Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Paul Perry https://www.kaggle.com/code/paulperry/technical-16-friend-of-time\n\nax = t16.plot(use_index=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:25:46.964414Z","iopub.execute_input":"2022-08-22T15:25:46.964879Z","iopub.status.idle":"2022-08-22T15:25:47.193732Z","shell.execute_reply.started":"2022-08-22T15:25:46.964845Z","shell.execute_reply":"2022-08-22T15:25:47.192257Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Pgorshenin https://www.kaggle.com/code/pgorshenin/technical-16-friend-of-time\n\ndata = pd.read_hdf('../input/open-problems-multimodal/test_cite_inputs.h5')","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:25:53.250272Z","iopub.execute_input":"2022-08-22T15:25:53.250718Z","iopub.status.idle":"2022-08-22T15:26:40.725721Z","shell.execute_reply.started":"2022-08-22T15:25:53.250683Z","shell.execute_reply":"2022-08-22T15:26:40.723879Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.set_option('display.max_columns', 150)\npd.set_option('display.max_rows', 100)","metadata":{"execution":{"iopub.status.busy":"2022-08-21T00:52:25.768557Z","iopub.execute_input":"2022-08-21T00:52:25.769002Z","iopub.status.idle":"2022-08-21T00:52:25.775201Z","shell.execute_reply.started":"2022-08-21T00:52:25.768968Z","shell.execute_reply":"2022-08-21T00:52:25.773753Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Your notebook tried to allocate more memory than is available. It has restarted.","metadata":{}},{"cell_type":"code","source":"def myticks(x,pos):\n\n    exponent = abs(int(np.log10(np.abs(x))))  \n    return exponent","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:26:58.809065Z","iopub.execute_input":"2022-08-22T15:26:58.810064Z","iopub.status.idle":"2022-08-22T15:26:58.818318Z","shell.execute_reply.started":"2022-08-22T15:26:58.809998Z","shell.execute_reply":"2022-08-22T15:26:58.816390Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Checking the csv files.","metadata":{}},{"cell_type":"code","source":"ids = pd.read_csv(\"/kaggle/input/open-problems-multimodal/evaluation_ids.csv\", low_memory=False, encoding ='utf8',sep=\",\")\npd.set_option('display.max_columns', None)\n\nids.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:28:37.716077Z","iopub.execute_input":"2022-08-22T15:28:37.716605Z","iopub.status.idle":"2022-08-22T15:29:38.969447Z","shell.execute_reply.started":"2022-08-22T15:28:37.716566Z","shell.execute_reply":"2022-08-22T15:29:38.967977Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"meta = pd.read_csv(\"/kaggle/input/open-problems-multimodal/metadata.csv\", low_memory=False, encoding ='utf8',sep=\",\")\npd.set_option('display.max_columns', None)\n\nmeta.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-22T15:29:46.760730Z","iopub.execute_input":"2022-08-22T15:29:46.761242Z","iopub.status.idle":"2022-08-22T15:29:47.243443Z","shell.execute_reply.started":"2022-08-22T15:29:46.761201Z","shell.execute_reply":"2022-08-22T15:29:47.242248Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#I've no idea what I've done here.\n\n![](https://memegenerator.net/img/instances/33144634.jpg)https://memegenerator.net/instance/33144634/i-dont-know-what-im-doing-dog-bioinformatics","metadata":{"execution":{"iopub.status.busy":"2022-08-21T22:29:24.762899Z","iopub.execute_input":"2022-08-21T22:29:24.763388Z","iopub.status.idle":"2022-08-21T22:29:24.776419Z","shell.execute_reply.started":"2022-08-21T22:29:24.763338Z","shell.execute_reply":"2022-08-21T22:29:24.774638Z"}}},{"cell_type":"markdown","source":"#Acknowledgements:\n\nBryda EC. The Mighty Mouse: the impact of rodents on advances in biomedical research. Mo Med. 2013 May-Jun;110(3):207-11. PMID: 23829104; PMCID: PMC3987984.\n\nJeff Moser https://www.kaggle.com/code/jeffmoser/kagglegym-api-overview\n\nSRK \n\nhttps://www.kaggle.com/code/sudalairajkumar/univariate-analysis-regression-lb-0-006\nhttps://www.kaggle.com/code/sudalairajkumar/simple-exploration-notebook-5/notebook\n\nPgorshenin https://www.kaggle.com/code/pgorshenin/technical-16-friend-of-time\n\nPaul Perry https://www.kaggle.com/code/paulperry/technical-16-friend-of-time\n\n","metadata":{}}]}