{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Generate Upsetplots" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this notebook we will be generating two upsetplots: the first will plot counts of cells based on if they have an entry for the associated annotations, and the second will plot counts of cells based on their values for the associated annotations." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "import logging\n", "import pandas as pd\n", "import numpy as np\n", "from itertools import chain, combinations\n", "from upsetplot import plot\n", "from matplotlib import pyplot as plt\n", "from pkg.platy import _get_folder, load_connectome_normal_lcc_annotations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We import the folder to save our upsetplots and the table of annotations which will help us make our upsetplots" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | skids | \n", "side | \n", "class | \n", "segment | \n", "type | \n", "group | \n", "
---|---|---|---|---|---|---|
0 | \n", "2015233 | \n", "l | \n", "s | \n", "head | \n", "100.0 | \n", "N/A | \n", "
1 | \n", "1548290 | \n", "l | \n", "N/A | \n", "1 | \n", "N/A | \n", "N/A | \n", "
2 | \n", "1318919 | \n", "l | \n", "s | \n", "head | \n", "88.0 | \n", "15.0 | \n", "
3 | \n", "2015241 | \n", "l | \n", "s | \n", "head | \n", "100.0 | \n", "N/A | \n", "
4 | \n", "1646603 | \n", "r | \n", "N/A | \n", "3 | \n", "N/A | \n", "N/A | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
2696 | \n", "1302513 | \n", "l | \n", "s | \n", "head | \n", "N/A | \n", "N/A | \n", "
2697 | \n", "1630186 | \n", "l | \n", "N/A | \n", "2 | \n", "N/A | \n", "N/A | \n", "
2698 | \n", "1441779 | \n", "r | \n", "N/A | \n", "head | \n", "N/A | \n", "N/A | \n", "
2699 | \n", "1671147 | \n", "r | \n", "m | \n", "1 | \n", "165.0 | \n", "N/A | \n", "
2700 | \n", "1048573 | \n", "l | \n", "i | \n", "3 | \n", "N/A | \n", "N/A | \n", "
2701 rows × 6 columns
\n", "