{ "cells": [ { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext", "vscode": { "languageId": "raw" } }, "source": [ ".. _tumor_distance_example:\n", "\n", "======================\n", "Tumor Distance\n", "======================" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "#\n", "from astropathdb import AstroDB\n", "from astropathdb import plotting as pl\n", "from astropathdb import analysis as al\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "db = AstroDB()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "hist = al.get_distance_histogram(\n", " astrodb = db,\n", " ptype = {'phenotype': 'CD8'}\n", ")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | dist | \n", "density | \n", "norm_density | \n", "
|---|---|---|---|
| 0 | \n", "-2000 | \n", "152.957443 | \n", "0.003599 | \n", "
| 1 | \n", "-1975 | \n", "151.754943 | \n", "0.003571 | \n", "
| 2 | \n", "-1950 | \n", "152.849413 | \n", "0.003597 | \n", "
| 3 | \n", "-1925 | \n", "168.205729 | \n", "0.003958 | \n", "
| 4 | \n", "-1900 | \n", "153.530286 | \n", "0.003613 | \n", "