{ "cells": [ { "cell_type": "markdown", "id": "d4caf19c", "metadata": {}, "source": [ "# Ontological Differential Analysis" ] }, { "cell_type": "markdown", "id": "0b2a6bf8", "metadata": {}, "source": [ "## Summary" ] }, { "cell_type": "markdown", "id": "3bed637b", "metadata": {}, "source": [ "Doing OGDA programatically is a two-step process. In the first step, sets of metadata triplets are created. In the second step, those sets are used as input to the actual calculator." ] }, { "cell_type": "markdown", "id": "303d550e", "metadata": {}, "source": [ "## Step 1 - Triplets" ] }, { "cell_type": "markdown", "id": "847e2367", "metadata": {}, "source": [ "Making a post request to " ] }, { "cell_type": "markdown", "id": "0ac727a7", "metadata": {}, "source": [ "```\n", "http://bindiscover.metabolomics.us:4999/hgdametadataresource/\n", "```" ] }, { "cell_type": "markdown", "id": "cb3a44be", "metadata": {}, "source": [ "With the format " ] }, { "cell_type": "markdown", "id": "9d103ef0", "metadata": {}, "source": [ "```\n", "{\n", " \"from_species\":\"10114\", #any NCBI species or parent ID\n", " \"from_organ\":\"A03.620\", #any MeSH organ ID\n", " \"from_disease\":\"No Disease\", #any MeSH disease ID\n", " \"to_species\":\"314146\",\n", " \"to_organ\":\"A03.556.875.500\",\n", " \"to_disease\":\"No Disease\"\n", "}\n", "```" ] }, { "cell_type": "markdown", "id": "3275c5e5", "metadata": {}, "source": [ "Where values in this dictionary are nodes from the NCBI taxonomy and MeSH Hierarchies will yield a record-oriented metadata table, e.g." ] }, { "cell_type": "markdown", "id": "91c07de8", "metadata": {}, "source": [ "```\n", "\"[\n", " {\\\"from_or_to\\\":\\\"from\\\",\\\"triplet_id\\\":\\\"rattus rattus - Liver - No Disease\\\",\\\"sample_count\\\":221},\n", " {\\\"from_or_to\\\":\\\"to\\\",\\\"triplet_id\\\":\\\"mus musculus - Esophagus - No Disease\\\",\\\"sample_count\\\":24}\n", "]\"\n", "```" ] }, { "cell_type": "markdown", "id": "beb1cf89", "metadata": {}, "source": [ "## Step 2 - OGDA " ] }, { "cell_type": "markdown", "id": "79b87016", "metadata": {}, "source": [ "Making a post request to " ] }, { "cell_type": "markdown", "id": "3d0c0e3b", "metadata": {}, "source": [ "```\n", "http://bindiscover.metabolomics.us:4999/hgdaresource/\n", "```" ] }, { "cell_type": "markdown", "id": "2b5ffc72", "metadata": {}, "source": [ "with the format" ] }, { "cell_type": "markdown", "id": "89322be5", "metadata": {}, "source": [ "```\n", "{\n", " \"metadata_datatable\":\n", " [\n", " {\"from_or_to\": \"from\", \"triplet_id\": \"citrus reticulata - Plant Leaves - No Disease\", \"sample_count\": 43}, \n", " {\"from_or_to\": \"to\", \"triplet_id\": \"malus x domestica - Fruit - No Disease\", \"sample_count\": 17}\n", " ],\n", " \"bin_type\":\"known\" #values are 'known', 'unknown', and 'class' (compound classes)\n", "}\n", "```" ] }, { "cell_type": "markdown", "id": "3623d251", "metadata": {}, "source": [ "will yield the core information for the differential analysis, eg" ] }, { "cell_type": "markdown", "id": "eacd6c15", "metadata": {}, "source": [ "```\n", "\"[\n", " {\\\"compound_id\\\": 14717, \\\"identifier\\\": \\\"OOWQBDFWEXAXPB-UHFFFAOYSA-N\\\", \\\"english_name\\\": \\\"hexadecylglycerol\\\", \\\"bin_type_dict\\\": \\\"known\\\", \\\"significance_welch\\\": 0.6109507199, \\\"fold_change_average\\\": 0.007302779200000001},\n", " {\\\"compound_id\\\": 2214, \\\"identifier\\\": \\\"LOLKAJARZKDJTD-UHFFFAOYSA-N\\\", \\\"english_name\\\": \\\"ethylsuccinate\\\", \\\"bin_type_dict\\\": \\\"known\\\", \\\"significance_welch\\\": 0.1504452139, \\\"fold_change_average\\\": -0.031181263}...\n", "\"\n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.8" } }, "nbformat": 4, "nbformat_minor": 5 }