{ "cells": [ { "cell_type": "markdown", "id": "94554902", "metadata": {}, "source": [ "# Upset Plot" ] }, { "cell_type": "markdown", "id": "fa46a168", "metadata": {}, "source": [ "## Summary and Format" ] }, { "cell_type": "markdown", "id": "a98f60f9", "metadata": {}, "source": [ "Generating the data for upset plots is a one step process." ] }, { "cell_type": "markdown", "id": "f42bce2e", "metadata": {}, "source": [ "Making a post request to " ] }, { "cell_type": "markdown", "id": "df39e069", "metadata": {}, "source": [ "```\n", "http://bindiscover.metabolomics.us:4999/venntableresource/\n", "```" ] }, { "cell_type": "markdown", "id": "1d0caa35", "metadata": {}, "source": [ "With the format" ] }, { "cell_type": "markdown", "id": "5992cf6d", "metadata": {}, "source": [ "```\n", "{\n", " \"dropdown_triplet_selection_value\": [\"homo sapiens - Serum - No Disease\",\"homo sapiens - Plasma - No Disease\"], #any triplet from our data\n", " \"slider_percent_present_value\": 80, #any integer from 0 to 100. what percent-obvserved \n", " #for a triplet constitutes present\n", " \"toggle_average_true_value\": \"True\", #valid values only True\n", " \"radio_items_filter_value\":\"no_filter\" #valid values \"no_filter\" and \"common\"\n", " #if no filter, do nothing unusual\n", " #if common, return only compounds present in all\n", " #triplets\n", "}\n", "```" ] }, { "cell_type": "markdown", "id": "ab7ddf8b", "metadata": {}, "source": [ "will yield the core information for the sunburst diagram, eg" ] }, { "cell_type": "markdown", "id": "ca9784e0", "metadata": {}, "source": [ "```\n", "\"[\n", " {\\\"bin\\\": 2, \\\"compound\\\": \\\"alanine\\\", \\\"homo sapiens - Serum - No Disease\\\": 69575947.69588457, \\\"homo sapiens - Plasma - No Disease\\\": 81540624.82164448, \\\"compound_identifier\\\": 2, \\\"bin_type\\\": \\\"known\\\", \\\"english_name\\\": \\\"alanine\\\", \\\"identifier\\\": \\\"QNAYBMKLOCPYGJ-REOHCLBHSA-N\\\"}, \n", " {\\\"bin\\\": 3, \\\"compound\\\": \\\"valine\\\", \\\"homo sapiens - Serum - No Disease\\\": 37329254.94725463, \\\"homo sapiens - Plasma - No Disease\\\": 37080214.40829862, \\\"compound_identifier\\\": 3, \\\"bin_type\\\": \\\"known\\\", \\\"english_name\\\": \\\"valine\\\", \\\"identifier\\\": \\\"KZSNJWFQEVHDMF-BYPYZUCNSA-N\\\"},\n", " ...\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 }