Tumor Distance#

[1]:
%load_ext autoreload
%autoreload 2
#
from astropathdb import AstroDB
from astropathdb import plotting as pl
from astropathdb import analysis as al

[2]:
db = AstroDB()
[3]:
hist = al.get_distance_histogram(
    astrodb = db,
    ptype = {'phenotype': 'CD8'}
)
[4]:
hist.head()
[4]:
dist density norm_density
0 -2000 152.957443 0.003599
1 -1975 151.754943 0.003571
2 -1950 152.849413 0.003597
3 -1925 168.205729 0.003958
4 -1900 153.530286 0.003613
[5]:
hist.plot(x = 'dist', y = 'density')
[5]:
<Axes: xlabel='dist'>
../../_images/pkg_examples_tutorials_metrics_tumor_distance_5_1.png