{ "cells": [ { "cell_type": "markdown", "id": "2f04eee0-5928-4e74-a754-6dc2e528810c", "metadata": {}, "source": [ "# DNAmFitAgeGripF" ] }, { "cell_type": "markdown", "id": "a3f514a3-772c-4a14-afdf-5a8376851ff4", "metadata": {}, "source": [ "## Index\n", "1. [Instantiate model class](#Instantiate-model-class)\n", "2. [Define clock metadata](#Define-clock-metadata)\n", "3. [Download clock dependencies](#Download-clock-dependencies)\n", "5. [Load features](#Load-features)\n", "6. [Load weights into base model](#Load-weights-into-base-model)\n", "7. [Load reference values](#Load-reference-values)\n", "8. [Load preprocess and postprocess objects](#Load-preprocess-and-postprocess-objects)\n", "10. [Check all clock parameters](#Check-all-clock-parameters)\n", "10. [Basic test](#Basic-test)\n", "11. [Save torch model](#Save-torch-model)\n", "12. [Clear directory](#Clear-directory)" ] }, { "cell_type": "markdown", "id": "d95fafdc-643a-40ea-a689-200bd132e90c", "metadata": {}, "source": [ "Let's first import some packages:" ] }, { "cell_type": "code", "execution_count": 18, "id": "4adfb4de-cd79-4913-a1af-9e23e9e236c9", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:23.621657Z", "iopub.status.busy": "2025-04-07T17:50:23.621346Z", "iopub.status.idle": "2025-04-07T17:50:25.088787Z", "shell.execute_reply": "2025-04-07T17:50:25.088401Z" } }, "outputs": [], "source": [ "import os\n", "import inspect\n", "import shutil\n", "import json\n", "import torch\n", "import pandas as pd\n", "import numpy as np\n", "import pyaging as pya" ] }, { "cell_type": "markdown", "id": "145082e5-ced4-47ae-88c0-cb69773e3c5a", "metadata": {}, "source": [ "## Instantiate model class" ] }, { "cell_type": "code", "execution_count": 19, "id": "8aa77372-7ed3-4da7-abc9-d30372106139", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.090492Z", "iopub.status.busy": "2025-04-07T17:50:25.090265Z", "iopub.status.idle": "2025-04-07T17:50:25.101917Z", "shell.execute_reply": "2025-04-07T17:50:25.101643Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "class DNAmFitAgeGripF(pyagingModel):\n", " def __init__(self):\n", " super().__init__()\n", "\n", " def preprocess(self, x):\n", " return x\n", " \n", " def postprocess(self, x):\n", " return x\n", "\n" ] } ], "source": [ "def print_entire_class(cls):\n", " source = inspect.getsource(cls)\n", " print(source)\n", "\n", "print_entire_class(pya.models.DNAmFitAgeGripF)" ] }, { "cell_type": "code", "execution_count": 20, "id": "914a94cf-bf6c-4b9d-862a-a2787842e07e", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.103160Z", "iopub.status.busy": "2025-04-07T17:50:25.103071Z", "iopub.status.idle": "2025-04-07T17:50:25.104710Z", "shell.execute_reply": "2025-04-07T17:50:25.104466Z" } }, "outputs": [], "source": [ "model = pya.models.DNAmFitAgeGripF()" ] }, { "cell_type": "markdown", "id": "51f8615e-01fa-4aa5-b196-3ee2b35d261c", "metadata": {}, "source": [ "## Define clock metadata" ] }, { "cell_type": "code", "execution_count": 21, "id": "6609d6dc-c0a0-4137-bdf5-9fb31ea85281", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.105997Z", "iopub.status.busy": "2025-04-07T17:50:25.105908Z", "iopub.status.idle": "2025-04-07T17:50:25.107874Z", "shell.execute_reply": "2025-04-07T17:50:25.107633Z" } }, "outputs": [], "source": [ "model.metadata[\"clock_name\"] = \"dnamfitagegripf\"\n", "model.metadata[\"data_type\"] = \"DNA methylation\" # Paper: Blood DNA methylation was used to develop the fitness biomarkers.\n", "model.metadata[\"species\"] = \"Homo sapiens\" # Paper: The development cohorts were human adult studies (FHS, BLSA, and Budapest).\n", "model.metadata[\"year\"] = 2023\n", "model.metadata[\"approved_by_author\"] = \"⌛\"\n", "model.metadata[\"citation\"] = \"McGreevy, K. M., et al. “DNAmFitAge: biological age indicator incorporating physical fitness.” Aging 15(10): 3904–3938 (2023).\"\n", "model.metadata[\"doi\"] = \"https://doi.org/10.18632/aging.204538\"\n", "model.metadata[\"notes\"] = \"Female-specific blood DNAm maximum-handgrip-strength estimator without chronological age as an input.\"\n", "model.metadata[\"research_only\"] = None\n", "model.metadata[\"tissue\"] = [\"whole blood\"] # Paper: The biomarkers were developed from blood DNAm data.\n", "model.metadata[\"predicts\"] = [\"grip strength\"] # Paper: The algorithms generate DNAmGaitspeed, DNAmGripmax, or DNAmVO2max estimates in the corresponding physical-fitness scale.\n", "model.metadata[\"training_target\"] = [\"grip strength\"] # Paper: The directly measured fitness parameter was the dependent variable in LASSO regression.\n", "model.metadata[\"unit\"] = [\"kilograms\"] # Paper: Gait speed is measured in m/s, grip force in kg, and VO2max in mL/kg/min.\n", "model.metadata[\"model_type\"] = \"LASSO regression\" # Paper: Each fitness DNAm biomarker was developed using LASSO penalized regression with ten-fold cross-validation.\n", "model.metadata[\"platform\"] = [\"Illumina 450K\"] # Paper: The reported fitness CpG background and fitted loci were on the 450K array.\n", "model.metadata[\"population\"] = \"adult women\" # Paper: The female grip-strength model was fit separately in adult women from the FHS, BLSA, and Budapest development cohorts.\n", "model.metadata[\"journal\"] = \"Aging\"\n", "model.metadata[\"last_author\"] = \"Steve Horvath\"\n", "model.metadata[\"n_features\"] = 91\n", "model.metadata[\"citations\"] = 99\n", "model.metadata[\"citations_date\"] = \"2026-07-05\"\n" ] }, { "cell_type": "markdown", "id": "74492239-5aae-4026-9d90-6bc9c574c110", "metadata": {}, "source": [ "## Download clock dependencies" ] }, { "cell_type": "markdown", "id": "7bec474f-80ce-4884-9472-30c193327117", "metadata": {}, "source": [ "#### Download GitHub repository" ] }, { "cell_type": "code", "execution_count": 22, "id": "aa4a1b59-dda3-4ea8-8f34-b3c53ecbc310", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.109229Z", "iopub.status.busy": "2025-04-07T17:50:25.109147Z", "iopub.status.idle": "2025-04-07T17:50:25.651487Z", "shell.execute_reply": "2025-04-07T17:50:25.650965Z" } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "github_url = \"https://github.com/kristenmcgreevy/DNAmFitAge.git\"\n", "github_folder_name = github_url.split('/')[-1].split('.')[0]\n", "os.system(f\"git clone {github_url}\")" ] }, { "cell_type": "markdown", "id": "6bd15521-363f-4029-99ff-9f0b2ae0ed2e", "metadata": {}, "source": [ "#### Download from R package" ] }, { "cell_type": "code", "execution_count": 23, "id": "f1f9bbe4-cfc8-494c-b910-c96da88afb2b", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.653928Z", "iopub.status.busy": "2025-04-07T17:50:25.653723Z", "iopub.status.idle": "2025-04-07T17:50:25.657586Z", "shell.execute_reply": "2025-04-07T17:50:25.657192Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Writing download.r\n" ] } ], "source": [ "%%writefile download.r\n", "\n", "options(repos = c(CRAN = \"https://cloud.r-project.org/\"))\n", "library(jsonlite)\n", "\n", "DNAmFitnessModels <- readRDS(\"DNAmFitAge/DNAmFitnessModelsandFitAge_Oct2022.rds\")\n", "\n", "AllCpGs <- DNAmFitnessModels$AllCpGs\n", "write_json(AllCpGs, \"AllCpGs.json\")\n", "\n", "MaleMedians <- DNAmFitnessModels$Male_Medians_All\n", "write.csv(MaleMedians, \"MaleMedians.csv\")\n", "FemaleMedians <- DNAmFitnessModels$Female_Medians_All\n", "write.csv(FemaleMedians, \"FemaleMedians.csv\")\n", "\n", "Gait_noAge_Females <- DNAmFitnessModels$Gait_noAge_Females\n", "Gait_noAge_Males <- DNAmFitnessModels$Gait_noAge_Males\n", "Grip_noAge_Females <- DNAmFitnessModels$Grip_noAge_Females\n", "Grip_noAge_Males <- DNAmFitnessModels$Grip_noAge_Males\n", "VO2maxModel <- DNAmFitnessModels$VO2maxModel\n", "write.csv(Gait_noAge_Females, \"Gait_noAge_Females.csv\")\n", "write.csv(Gait_noAge_Males, \"Gait_noAge_Males.csv\")\n", "write.csv(Grip_noAge_Females, \"Grip_noAge_Females.csv\")\n", "write.csv(Grip_noAge_Males, \"Grip_noAge_Males.csv\")\n", "write.csv(VO2maxModel, \"VO2maxModel.csv\")" ] }, { "cell_type": "code", "execution_count": 24, "id": "f1965587-a6ac-47ce-bd7a-bb98ca1d91b5", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.659496Z", "iopub.status.busy": "2025-04-07T17:50:25.659322Z", "iopub.status.idle": "2025-04-07T17:50:27.279878Z", "shell.execute_reply": "2025-04-07T17:50:27.279562Z" } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "os.system(\"Rscript download.r\")" ] }, { "cell_type": "markdown", "id": "5035b180-3d1b-4432-8ebe-b9c92bd93a7f", "metadata": {}, "source": [ "## Load features" ] }, { "cell_type": "markdown", "id": "d8025ed7-0013-419b-8cb5-1a2db98f9eba", "metadata": {}, "source": [ "#### From JSON file" ] }, { "cell_type": "code", "execution_count": 25, "id": "c0b63afa", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
termstepestimatelambdadev.ratiofeaturecoefficient
1(Intercept)153.8206470.30.395663(Intercept)53.820647
2cg000945181-2.3457670.30.395663cg00094518-2.345767
3cg018547761-2.9414670.30.395663cg01854776-2.941467
4cg0200141012.8132120.30.395663cg020014102.813212
5cg020362611-0.9427760.30.395663cg02036261-0.942776
\n", "
" ], "text/plain": [ " term step estimate lambda dev.ratio feature coefficient\n", "1 (Intercept) 1 53.820647 0.3 0.395663 (Intercept) 53.820647\n", "2 cg00094518 1 -2.345767 0.3 0.395663 cg00094518 -2.345767\n", "3 cg01854776 1 -2.941467 0.3 0.395663 cg01854776 -2.941467\n", "4 cg02001410 1 2.813212 0.3 0.395663 cg02001410 2.813212\n", "5 cg02036261 1 -0.942776 0.3 0.395663 cg02036261 -0.942776" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.read_csv('Grip_noAge_Females.csv', index_col=0)\n", "df['feature'] = df['term']\n", "df['coefficient'] = df['estimate']\n", "model.features = df['feature'][1:].tolist()\n", "df.head()" ] }, { "cell_type": "markdown", "id": "ee6d8fa0-4767-4c45-9717-eb1c95e2ddc0", "metadata": {}, "source": [ "## Load weights into base model" ] }, { "cell_type": "code", "execution_count": 27, "id": "8d58875d", "metadata": {}, "outputs": [], "source": [ "weights = torch.tensor(df['coefficient'][1:].tolist()).unsqueeze(0)\n", "intercept = torch.tensor([df['coefficient'].iloc[0]])" ] }, { "cell_type": "markdown", "id": "69901c2b-9584-4de3-a642-ddb6b43d923a", "metadata": {}, "source": [ "#### Linear model" ] }, { "cell_type": "code", "execution_count": 28, "id": "5fb10110-a89a-4caa-a62a-59899ebccd23", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.292804Z", "iopub.status.busy": "2025-04-07T17:50:27.292717Z", "iopub.status.idle": "2025-04-07T17:50:27.302996Z", "shell.execute_reply": "2025-04-07T17:50:27.302732Z" } }, "outputs": [], "source": [ "base_model = pya.models.LinearModel(input_dim=len(model.features))\n", "\n", "base_model.linear.weight.data = weights.float()\n", "base_model.linear.bias.data = intercept.float()\n", "\n", "model.base_model = base_model" ] }, { "cell_type": "markdown", "id": "ad8b4c1d-9d57-48b7-9a30-bcfea7b747b1", "metadata": {}, "source": [ "## Load reference values" ] }, { "cell_type": "markdown", "id": "f7fdae64-096a-4640-ade7-6a17b78a01d5", "metadata": {}, "source": [ "#### From CSV file" ] }, { "cell_type": "code", "execution_count": 29, "id": "e1dc004f-06b7-4e24-a937-00736e93765f", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.308644Z", "iopub.status.busy": "2025-04-07T17:50:27.308553Z", "iopub.status.idle": "2025-04-07T17:50:27.323332Z", "shell.execute_reply": "2025-04-07T17:50:27.323061Z" } }, "outputs": [], "source": [ "reference_df = pd.read_csv('FemaleMedians.csv', index_col=0)\n", "model.reference_values = list(reference_df.loc[1, model.features])" ] }, { "cell_type": "markdown", "id": "af3bcf7b-74a8-4d21-9ccb-4de0c2b0516b", "metadata": {}, "source": [ "## Load preprocess and postprocess objects" ] }, { "cell_type": "code", "execution_count": 30, "id": "79a1b3a2-00f1-42b1-9fcd-f919343391d7", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.324794Z", "iopub.status.busy": "2025-04-07T17:50:27.324706Z", "iopub.status.idle": "2025-04-07T17:50:27.326219Z", "shell.execute_reply": "2025-04-07T17:50:27.325910Z" } }, "outputs": [], "source": [ "model.preprocess_name = None\n", "model.preprocess_dependencies = None" ] }, { "cell_type": "code", "execution_count": 31, "id": "ff4a21cb-cf41-44dc-9ed1-95cf8aa15772", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.327714Z", "iopub.status.busy": "2025-04-07T17:50:27.327614Z", "iopub.status.idle": "2025-04-07T17:50:27.329350Z", "shell.execute_reply": "2025-04-07T17:50:27.329050Z" } }, "outputs": [], "source": [ "model.postprocess_name = None\n", "model.postprocess_dependencies = None" ] }, { "cell_type": "markdown", "id": "86e3d6b1-e67e-4f3d-bd39-0ebec5726c3c", "metadata": {}, "source": [ "## Check all clock parameters" ] }, { "cell_type": "code", "execution_count": 32, "id": "2168355c-47d9-475d-b816-49f65e74887c", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.330820Z", "iopub.status.busy": "2025-04-07T17:50:27.330730Z", "iopub.status.idle": "2025-04-07T17:50:27.336089Z", "shell.execute_reply": "2025-04-07T17:50:27.335809Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "%==================================== Model Details ====================================%\n", "Model Attributes:\n", "\n", "training: True\n", "metadata: {'approved_by_author': '⌛',\n", " 'citation': 'McGreevy, Kristen M., et al. \"DNAmFitAge: biological age '\n", " 'indicator incorporating physical fitness.\" Aging (Albany NY) '\n", " '15.10 (2023): 3904.',\n", " 'clock_name': 'dnamfitagegripf',\n", " 'data_type': 'methylation',\n", " 'doi': 'https://doi.org/10.18632/aging.204538',\n", " 'notes': 'Reference values is mean between male and female training medians',\n", " 'research_only': None,\n", " 'species': 'Homo sapiens',\n", " 'version': None,\n", " 'year': 2023}\n", "reference_values: [0.115253497078786, 0.968105961834816, 0.0760619502414265, 0.0812081375780079, 0.674801040131638, 0.935404314255487, 0.868111085215553, 0.102187464459387, 0.875784927493447, 0.0721027662094031, 0.0794203726419054, 0.823996698486295, 0.417058282950929, 0.121432191141366, 0.59993557322113, 0.26732361189343, 0.631057715233057, 0.857492364335729, 0.920994690876469, 0.582338569224998, 0.20134054797388, 0.165165742573594, 0.257681226127591, 0.519308399081033, 0.914445786977054, 0.257597673788159, 0.255236501437818, 0.902457177412228, 0.0336179175661541, 0.692395670285827]... [Total elements: 91]\n", "preprocess_name: None\n", "preprocess_dependencies: None\n", "postprocess_name: None\n", "postprocess_dependencies: None\n", "features: ['cg00094518', 'cg01854776', 'cg02001410', 'cg02036261', 'cg02047661', 'cg02382878', 'cg02581163', 'cg02683759', 'cg03068431', 'cg03607117', 'cg04194073', 'cg04640528', 'cg04651240', 'cg05376617', 'cg05719140', 'cg05967403', 'cg06043048', 'cg06082596', 'cg06133771', 'cg06185146', 'cg06291867', 'cg06434732', 'cg06447424', 'cg06557644', 'cg06559864', 'cg06821999', 'cg06966811', 'cg07404352', 'cg08047907', 'cg08619515']... [Total elements: 91]\n", "base_model_features: None\n", "\n", "%==================================== Model Details ====================================%\n", "Model Structure:\n", "\n", "base_model: LinearModel(\n", " (linear): Linear(in_features=91, out_features=1, bias=True)\n", ")\n", "\n", "%==================================== Model Details ====================================%\n", "Model Parameters and Weights:\n", "\n", "base_model.linear.weight: [-2.3457672595977783, -2.94146728515625, 2.8132119178771973, -0.9427763223648071, 3.2280826568603516, -0.5796002745628357, -5.075088977813721, -1.3516250848770142, 3.539742946624756, -6.468724727630615, -3.5424692630767822, -6.332897663116455, 4.4002580642700195, 10.170988082885742, -0.5222252011299133, -2.993544101715088, -0.7089398503303528, -3.3968186378479004, 0.9145923852920532, 1.0081183910369873, -2.5558736324310303, -1.6970638036727905, 2.0081098079681396, 0.2233070731163025, -3.5272421836853027, -4.740792274475098, -2.4629898071289062, 0.7111413478851318, -11.599475860595703, 3.976231575012207]... [Tensor of shape torch.Size([1, 91])]\n", "base_model.linear.bias: tensor([53.8206])\n", "\n", "%==================================== Model Details ====================================%\n", "\n" ] } ], "source": [ "pya.utils.print_model_details(model)" ] }, { "cell_type": "markdown", "id": "986d0262-e0c7-4036-b687-dee53ba392fb", "metadata": {}, "source": [ "## Basic test" ] }, { "cell_type": "code", "execution_count": 33, "id": "352cffb0-c5a8-4c82-8f61-fce35baf5a22", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.337690Z", "iopub.status.busy": "2025-04-07T17:50:27.337490Z", "iopub.status.idle": "2025-04-07T17:50:27.346106Z", "shell.execute_reply": "2025-04-07T17:50:27.345820Z" } }, "outputs": [ { "data": { "text/plain": [ "tensor([[ 43.5148],\n", " [ 46.6872],\n", " [114.4924],\n", " [-12.2853],\n", " [ 45.3849],\n", " [ 9.3484],\n", " [ 25.7228],\n", " [ 44.3546],\n", " [ 36.3137],\n", " [ -6.2013]], dtype=torch.float64, grad_fn=)" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "torch.manual_seed(42)\n", "input = torch.randn(10, len(model.features), dtype=float)\n", "model.eval()\n", "model.to(float)\n", "pred = model(input)\n", "pred" ] }, { "cell_type": "markdown", "id": "fe8299d7-9285-4e22-82fd-b664434b4369", "metadata": {}, "source": [ "## Save torch model" ] }, { "cell_type": "code", "execution_count": 34, "id": "0c3a2d80-1b5f-458a-926c-cbc0aa9416e1", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.347459Z", "iopub.status.busy": "2025-04-07T17:50:27.347364Z", "iopub.status.idle": "2025-04-07T17:50:27.350847Z", "shell.execute_reply": "2025-04-07T17:50:27.350573Z" } }, "outputs": [], "source": [ "torch.save(model, f\"../weights/{model.metadata['clock_name']}.pt\")" ] }, { "cell_type": "markdown", "id": "bac6257b-8d08-4a90-8d0b-7f745dc11ac1", "metadata": {}, "source": [ "## Clear directory\n", "" ] }, { "cell_type": "code", "execution_count": 35, "id": "11aeaa70-44c0-42f9-86d7-740e3849a7a6", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.352136Z", "iopub.status.busy": "2025-04-07T17:50:27.352040Z", "iopub.status.idle": "2025-04-07T17:50:27.360420Z", "shell.execute_reply": "2025-04-07T17:50:27.360132Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Deleted file: Grip_noAge_Females.csv\n", "Deleted file: Grip_noAge_Males.csv\n", "Deleted file: Gait_noAge_Females.csv\n", "Deleted file: VO2maxModel.csv\n", "Deleted file: AllCpGs.json\n", "Deleted file: Gait_noAge_Males.csv\n", "Deleted folder: DNAmFitAge\n", "Deleted file: download.r\n", "Deleted file: FemaleMedians.csv\n", "Deleted file: MaleMedians.csv\n" ] } ], "source": [ "# Function to remove a folder and all its contents\n", "def remove_folder(path):\n", " try:\n", " shutil.rmtree(path)\n", " print(f\"Deleted folder: {path}\")\n", " except Exception as e:\n", " print(f\"Error deleting folder {path}: {e}\")\n", "\n", "# Get a list of all files and folders in the current directory\n", "all_items = os.listdir('.')\n", "\n", "# Loop through the items\n", "for item in all_items:\n", " # Check if it's a file and does not end with .ipynb\n", " if os.path.isfile(item) and not item.endswith('.ipynb'):\n", " os.remove(item)\n", " print(f\"Deleted file: {item}\")\n", " # Check if it's a folder\n", " elif os.path.isdir(item):\n", " remove_folder(item)" ] } ], "metadata": { "kernelspec": { "display_name": "research", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }