From 3bbd4da5a8e0fa3fee2e4a741519c2befbeacdf9 Mon Sep 17 00:00:00 2001 From: Tessa Green Date: Fri, 15 Sep 2023 09:36:29 -0400 Subject: [PATCH] Update PBMC_comparison_batches.ipynb --- .../notebooks/PBMC_comparison_batches.ipynb | 877 +++++++++++++++++- 1 file changed, 869 insertions(+), 8 deletions(-) diff --git a/revision/notebooks/PBMC_comparison_batches.ipynb b/revision/notebooks/PBMC_comparison_batches.ipynb index e6d0619..f1d5e31 100644 --- a/revision/notebooks/PBMC_comparison_batches.ipynb +++ b/revision/notebooks/PBMC_comparison_batches.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "2529f26a", "metadata": {}, "outputs": [ @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "id": "0bf5291a", "metadata": {}, "outputs": [], @@ -82,7 +82,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "id": "e50e6a70", "metadata": {}, "outputs": [], @@ -96,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "id": "38fa2b9f", "metadata": {}, "outputs": [], @@ -191,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 6, "id": "41c7f51c", "metadata": {}, "outputs": [], @@ -201,7 +201,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 7, "id": "97790cf4", "metadata": {}, "outputs": [], @@ -215,7 +215,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 8, "id": "ea51ac1d", "metadata": {}, "outputs": [], @@ -1914,10 +1914,871 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "1a24b82a", "metadata": {}, "outputs": [], + "source": [ + "## GRAB TWO BATCHES AND COMPARE THEM AND CHECK " + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "3461ead6", + "metadata": {}, + "outputs": [], + "source": [ + "# subsample the adata object rna to just have two donors\n", + "donors = rna.obs['donor'].unique()\n", + "donor1 = \"P3\"\n", + "donor2 = \"P7\"\n", + "adata = rna[(rna.obs['donor'] == donor1) | (rna.obs['donor'] == donor2),:].copy()\n", + "# keep 90% of the cells of the cells from donor 1 and 10% of the cells from donor 2\n" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "3129450a", + "metadata": {}, + "outputs": [], + "source": [ + "adata = equal_subsampling(adata, obs_key=\"celltype.l2\", N_min=91)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "75613218", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "AnnData object with n_obs × n_vars = 2093 × 20729\n", + " obs: 'orig.ident', 'nCount_RNA', 'nFeature_RNA', 'nCount_ADT', 'nFeature_ADT', 'lane', 'donor', 'time', 'celltype.l1', 'celltype.l2', 'celltype.l3', 'Phase', 'nCount_SCT', 'nFeature_SCT'\n", + " var: 'features'" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "33b1d512", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/tessa/miniforge3/envs/pertpy-mf/lib/python3.9/site-packages/scperturb/edistance.py:38: UserWarning: PCA embedding not found, computing...\n", + " warn('PCA embedding not found, computing...')\n", + "100%|██████████| 23/23 [00:00<00:00, 198.21it/s]\n" + ] + } + ], + "source": [ + "estats_unever = edist(adata, obs_key='celltype.l2', obsm_key='X_pca', dist='sqeuclidean')" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "fa9d81d3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
celltype.l2CD14 MonoNKCD4 NaiveCD4 TCMCD8 TEMB naiveCD8 NaiveCD16 MonoCD4 TEMB memory...PlateletCD4 CTLgdTTregCD8 TCMpDCNK_CD56brightDoubletPlasmablastNK Proliferating
celltype.l2
CD14 Mono0.000000e+001.698524e+052.679647e+052.123444e+052.224211e+052.120458e+053.088116e+051.020919e+051.825849e+053.082481e+05...4.169134e+052.743369e+052.412087e+052.151158e+052.189353e+052.636176e+051.625582e+053.767516e+045.818803e+061.630970e+05
NK1.698524e+050.000000e+001.254196e+058.864721e+043.578593e+041.114347e+051.594030e+051.061685e+056.651006e+041.595045e+05...4.659361e+057.351414e+047.812420e+047.932519e+048.895189e+041.135449e+054.680649e+049.495110e+045.701943e+064.501397e+04
CD4 Naive2.679647e+051.254196e+050.000000e+001.172302e+046.670553e+044.108493e+046.927809e+032.105098e+053.216107e+044.081254e+04...6.889830e+058.135077e+041.982591e+046.878672e+039.401757e+034.957444e+041.128830e+052.006451e+055.778199e+062.154345e+05
CD4 TCM2.123444e+058.864721e+041.172302e+040.000000e+006.324001e+042.989976e+043.028201e+041.730422e+054.854817e+036.607023e+04...5.451636e+059.050607e+042.838797e+043.658779e+036.283131e+026.481145e+046.013626e+041.432068e+055.740474e+061.411331e+05
CD8 TEM2.224211e+053.578593e+046.670553e+046.324001e+040.000000e+008.685512e+047.519571e+041.267741e+056.476089e+046.600109e+04...6.532749e+056.720035e+031.731919e+044.793074e+045.395539e+045.138439e+041.063709e+051.518232e+055.720420e+061.427739e+05
B naive2.120458e+051.114347e+054.108493e+042.989976e+048.685512e+040.000000e+005.207434e+041.782814e+053.221790e+044.765179e+04...5.652229e+051.169553e+054.995679e+043.426606e+042.619545e+048.214070e+047.357617e+041.518486e+055.481184e+061.547972e+05
CD8 Naive3.088116e+051.594030e+056.927809e+033.028201e+047.519571e+045.207434e+040.000000e+002.406714e+055.799863e+042.495600e+04...7.809466e+057.889800e+042.087892e+042.623261e+042.136037e+045.370290e+041.508066e+052.458617e+055.797959e+062.667328e+05
CD16 Mono1.020919e+051.061685e+052.105098e+051.730422e+051.267741e+051.782814e+052.406714e+050.000000e+001.527103e+052.228768e+05...4.726958e+051.582510e+051.600432e+051.624160e+051.738275e+051.704700e+051.582495e+053.148773e+045.776238e+061.482286e+05
CD4 TEM1.825849e+056.651006e+043.216107e+044.854817e+036.476089e+043.221790e+045.799863e+041.527103e+050.000000e+009.162771e+04...4.685991e+051.014327e+054.183635e+041.263606e+048.411762e+038.390088e+043.374413e+041.126131e+055.717712e+069.820955e+04
B memory3.082481e+051.595045e+054.081254e+046.607023e+046.600109e+044.765179e+042.495600e+042.228768e+059.162771e+040.000000e+00...8.337599e+056.242751e+042.807912e+045.666766e+045.143133e+044.816774e+041.797375e+052.515474e+055.545989e+062.805253e+05
B intermediate2.973901e+051.430236e+054.736894e+047.164591e+045.425881e+044.962056e+043.472154e+042.036866e+059.443380e+042.082772e+03...8.293354e+055.152038e+042.669609e+045.782791e+045.722785e+044.041154e+041.779544e+052.383603e+055.531375e+062.684733e+05
cDC21.111136e+051.460401e+051.504178e+051.169779e+051.499146e+059.063103e+041.661584e+051.219822e+051.078329e+051.516113e+05...4.674523e+051.835848e+051.382985e+051.268806e+051.168959e+051.505077e+051.193689e+059.322844e+045.777656e+061.586087e+05
MAIT1.530104e+054.102277e+046.735344e+042.831972e+045.816363e+044.485781e+049.549814e+041.255544e+059.787557e+031.165170e+05...4.257013e+051.006780e+055.449957e+043.498795e+043.011394e+041.020587e+052.161516e+048.665788e+045.690409e+066.010363e+04
Platelet4.169134e+054.659361e+056.889830e+055.451636e+056.532749e+055.652229e+057.809466e+054.726958e+054.685991e+058.337599e+05...0.000000e+007.626773e+056.903591e+055.875025e+055.737157e+057.647253e+053.618851e+053.298005e+056.149058e+062.887899e+05
CD4 CTL2.743369e+057.351414e+048.135077e+049.050607e+046.720035e+031.169553e+057.889800e+041.582510e+051.014327e+056.242751e+04...7.626773e+050.000000e+002.335867e+047.188394e+047.713971e+045.473255e+041.646173e+052.043215e+055.759835e+062.091024e+05
gdT2.412087e+057.812420e+041.982591e+042.838797e+041.731919e+044.995679e+042.087892e+041.600432e+054.183635e+042.807912e+04...6.903591e+052.335867e+040.000000e+001.870926e+041.923114e+043.364876e+041.094691e+051.755219e+055.739718e+061.842993e+05
Treg2.151158e+057.932519e+046.878672e+033.658779e+034.793074e+043.426606e+042.623261e+041.624160e+051.263606e+045.666766e+04...5.875025e+057.188394e+041.870926e+040.000000e+004.565635e+034.817889e+047.370639e+041.444212e+055.738067e+061.494014e+05
CD8 TCM2.189353e+058.895189e+049.401757e+036.283131e+025.395539e+042.619545e+042.136037e+041.738275e+058.411762e+035.143133e+04...5.737157e+057.713971e+041.923114e+044.565635e+030.000000e+005.885777e+046.648865e+041.515294e+055.738379e+061.508149e+05
pDC2.636176e+051.135449e+054.957444e+046.481145e+045.138439e+048.214070e+045.370290e+041.704700e+058.390088e+044.816774e+04...7.647253e+055.473255e+043.364876e+044.817889e+045.885777e+040.000000e+001.562326e+051.981032e+055.677738e+062.304294e+05
NK_CD56bright1.625582e+054.680649e+041.128830e+056.013626e+041.063709e+057.357617e+041.508066e+051.582495e+053.374413e+041.797375e+05...3.618851e+051.646173e+051.094691e+057.370639e+046.648865e+041.562326e+050.000000e+009.580880e+045.714391e+063.542029e+04
Doublet3.767516e+049.495110e+042.006451e+051.432068e+051.518232e+051.518486e+052.458617e+053.148773e+041.126131e+052.515474e+05...3.298005e+052.043215e+051.755219e+051.444212e+051.515294e+051.981032e+059.580880e+040.000000e+005.757203e+068.798352e+04
Plasmablast5.818803e+065.701943e+065.778199e+065.740474e+065.720420e+065.481184e+065.797959e+065.776238e+065.717712e+065.545989e+06...6.149058e+065.759835e+065.739718e+065.738067e+065.738379e+065.677738e+065.714391e+065.757203e+060.000000e+005.724480e+06
NK Proliferating1.630970e+054.501397e+042.154345e+051.411331e+051.427739e+051.547972e+052.667328e+051.482286e+059.820955e+042.805253e+05...2.887899e+052.091024e+051.842993e+051.494014e+051.508149e+052.304294e+053.542029e+048.798352e+045.724480e+060.000000e+00
\n", + "

23 rows × 23 columns

\n", + "
" + ], + "text/plain": [ + "celltype.l2 CD14 Mono NK CD4 Naive CD4 TCM \\\n", + "celltype.l2 \n", + "CD14 Mono 0.000000e+00 1.698524e+05 2.679647e+05 2.123444e+05 \n", + "NK 1.698524e+05 0.000000e+00 1.254196e+05 8.864721e+04 \n", + "CD4 Naive 2.679647e+05 1.254196e+05 0.000000e+00 1.172302e+04 \n", + "CD4 TCM 2.123444e+05 8.864721e+04 1.172302e+04 0.000000e+00 \n", + "CD8 TEM 2.224211e+05 3.578593e+04 6.670553e+04 6.324001e+04 \n", + "B naive 2.120458e+05 1.114347e+05 4.108493e+04 2.989976e+04 \n", + "CD8 Naive 3.088116e+05 1.594030e+05 6.927809e+03 3.028201e+04 \n", + "CD16 Mono 1.020919e+05 1.061685e+05 2.105098e+05 1.730422e+05 \n", + "CD4 TEM 1.825849e+05 6.651006e+04 3.216107e+04 4.854817e+03 \n", + "B memory 3.082481e+05 1.595045e+05 4.081254e+04 6.607023e+04 \n", + "B intermediate 2.973901e+05 1.430236e+05 4.736894e+04 7.164591e+04 \n", + "cDC2 1.111136e+05 1.460401e+05 1.504178e+05 1.169779e+05 \n", + "MAIT 1.530104e+05 4.102277e+04 6.735344e+04 2.831972e+04 \n", + "Platelet 4.169134e+05 4.659361e+05 6.889830e+05 5.451636e+05 \n", + "CD4 CTL 2.743369e+05 7.351414e+04 8.135077e+04 9.050607e+04 \n", + "gdT 2.412087e+05 7.812420e+04 1.982591e+04 2.838797e+04 \n", + "Treg 2.151158e+05 7.932519e+04 6.878672e+03 3.658779e+03 \n", + "CD8 TCM 2.189353e+05 8.895189e+04 9.401757e+03 6.283131e+02 \n", + "pDC 2.636176e+05 1.135449e+05 4.957444e+04 6.481145e+04 \n", + "NK_CD56bright 1.625582e+05 4.680649e+04 1.128830e+05 6.013626e+04 \n", + "Doublet 3.767516e+04 9.495110e+04 2.006451e+05 1.432068e+05 \n", + "Plasmablast 5.818803e+06 5.701943e+06 5.778199e+06 5.740474e+06 \n", + "NK Proliferating 1.630970e+05 4.501397e+04 2.154345e+05 1.411331e+05 \n", + "\n", + "celltype.l2 CD8 TEM B naive CD8 Naive CD16 Mono \\\n", + "celltype.l2 \n", + "CD14 Mono 2.224211e+05 2.120458e+05 3.088116e+05 1.020919e+05 \n", + "NK 3.578593e+04 1.114347e+05 1.594030e+05 1.061685e+05 \n", + "CD4 Naive 6.670553e+04 4.108493e+04 6.927809e+03 2.105098e+05 \n", + "CD4 TCM 6.324001e+04 2.989976e+04 3.028201e+04 1.730422e+05 \n", + "CD8 TEM 0.000000e+00 8.685512e+04 7.519571e+04 1.267741e+05 \n", + "B naive 8.685512e+04 0.000000e+00 5.207434e+04 1.782814e+05 \n", + "CD8 Naive 7.519571e+04 5.207434e+04 0.000000e+00 2.406714e+05 \n", + "CD16 Mono 1.267741e+05 1.782814e+05 2.406714e+05 0.000000e+00 \n", + "CD4 TEM 6.476089e+04 3.221790e+04 5.799863e+04 1.527103e+05 \n", + "B memory 6.600109e+04 4.765179e+04 2.495600e+04 2.228768e+05 \n", + "B intermediate 5.425881e+04 4.962056e+04 3.472154e+04 2.036866e+05 \n", + "cDC2 1.499146e+05 9.063103e+04 1.661584e+05 1.219822e+05 \n", + "MAIT 5.816363e+04 4.485781e+04 9.549814e+04 1.255544e+05 \n", + "Platelet 6.532749e+05 5.652229e+05 7.809466e+05 4.726958e+05 \n", + "CD4 CTL 6.720035e+03 1.169553e+05 7.889800e+04 1.582510e+05 \n", + "gdT 1.731919e+04 4.995679e+04 2.087892e+04 1.600432e+05 \n", + "Treg 4.793074e+04 3.426606e+04 2.623261e+04 1.624160e+05 \n", + "CD8 TCM 5.395539e+04 2.619545e+04 2.136037e+04 1.738275e+05 \n", + "pDC 5.138439e+04 8.214070e+04 5.370290e+04 1.704700e+05 \n", + "NK_CD56bright 1.063709e+05 7.357617e+04 1.508066e+05 1.582495e+05 \n", + "Doublet 1.518232e+05 1.518486e+05 2.458617e+05 3.148773e+04 \n", + "Plasmablast 5.720420e+06 5.481184e+06 5.797959e+06 5.776238e+06 \n", + "NK Proliferating 1.427739e+05 1.547972e+05 2.667328e+05 1.482286e+05 \n", + "\n", + "celltype.l2 CD4 TEM B memory ... Platelet CD4 CTL \\\n", + "celltype.l2 ... \n", + "CD14 Mono 1.825849e+05 3.082481e+05 ... 4.169134e+05 2.743369e+05 \n", + "NK 6.651006e+04 1.595045e+05 ... 4.659361e+05 7.351414e+04 \n", + "CD4 Naive 3.216107e+04 4.081254e+04 ... 6.889830e+05 8.135077e+04 \n", + "CD4 TCM 4.854817e+03 6.607023e+04 ... 5.451636e+05 9.050607e+04 \n", + "CD8 TEM 6.476089e+04 6.600109e+04 ... 6.532749e+05 6.720035e+03 \n", + "B naive 3.221790e+04 4.765179e+04 ... 5.652229e+05 1.169553e+05 \n", + "CD8 Naive 5.799863e+04 2.495600e+04 ... 7.809466e+05 7.889800e+04 \n", + "CD16 Mono 1.527103e+05 2.228768e+05 ... 4.726958e+05 1.582510e+05 \n", + "CD4 TEM 0.000000e+00 9.162771e+04 ... 4.685991e+05 1.014327e+05 \n", + "B memory 9.162771e+04 0.000000e+00 ... 8.337599e+05 6.242751e+04 \n", + "B intermediate 9.443380e+04 2.082772e+03 ... 8.293354e+05 5.152038e+04 \n", + "cDC2 1.078329e+05 1.516113e+05 ... 4.674523e+05 1.835848e+05 \n", + "MAIT 9.787557e+03 1.165170e+05 ... 4.257013e+05 1.006780e+05 \n", + "Platelet 4.685991e+05 8.337599e+05 ... 0.000000e+00 7.626773e+05 \n", + "CD4 CTL 1.014327e+05 6.242751e+04 ... 7.626773e+05 0.000000e+00 \n", + "gdT 4.183635e+04 2.807912e+04 ... 6.903591e+05 2.335867e+04 \n", + "Treg 1.263606e+04 5.666766e+04 ... 5.875025e+05 7.188394e+04 \n", + "CD8 TCM 8.411762e+03 5.143133e+04 ... 5.737157e+05 7.713971e+04 \n", + "pDC 8.390088e+04 4.816774e+04 ... 7.647253e+05 5.473255e+04 \n", + "NK_CD56bright 3.374413e+04 1.797375e+05 ... 3.618851e+05 1.646173e+05 \n", + "Doublet 1.126131e+05 2.515474e+05 ... 3.298005e+05 2.043215e+05 \n", + "Plasmablast 5.717712e+06 5.545989e+06 ... 6.149058e+06 5.759835e+06 \n", + "NK Proliferating 9.820955e+04 2.805253e+05 ... 2.887899e+05 2.091024e+05 \n", + "\n", + "celltype.l2 gdT Treg CD8 TCM pDC \\\n", + "celltype.l2 \n", + "CD14 Mono 2.412087e+05 2.151158e+05 2.189353e+05 2.636176e+05 \n", + "NK 7.812420e+04 7.932519e+04 8.895189e+04 1.135449e+05 \n", + "CD4 Naive 1.982591e+04 6.878672e+03 9.401757e+03 4.957444e+04 \n", + "CD4 TCM 2.838797e+04 3.658779e+03 6.283131e+02 6.481145e+04 \n", + "CD8 TEM 1.731919e+04 4.793074e+04 5.395539e+04 5.138439e+04 \n", + "B naive 4.995679e+04 3.426606e+04 2.619545e+04 8.214070e+04 \n", + "CD8 Naive 2.087892e+04 2.623261e+04 2.136037e+04 5.370290e+04 \n", + "CD16 Mono 1.600432e+05 1.624160e+05 1.738275e+05 1.704700e+05 \n", + "CD4 TEM 4.183635e+04 1.263606e+04 8.411762e+03 8.390088e+04 \n", + "B memory 2.807912e+04 5.666766e+04 5.143133e+04 4.816774e+04 \n", + "B intermediate 2.669609e+04 5.782791e+04 5.722785e+04 4.041154e+04 \n", + "cDC2 1.382985e+05 1.268806e+05 1.168959e+05 1.505077e+05 \n", + "MAIT 5.449957e+04 3.498795e+04 3.011394e+04 1.020587e+05 \n", + "Platelet 6.903591e+05 5.875025e+05 5.737157e+05 7.647253e+05 \n", + "CD4 CTL 2.335867e+04 7.188394e+04 7.713971e+04 5.473255e+04 \n", + "gdT 0.000000e+00 1.870926e+04 1.923114e+04 3.364876e+04 \n", + "Treg 1.870926e+04 0.000000e+00 4.565635e+03 4.817889e+04 \n", + "CD8 TCM 1.923114e+04 4.565635e+03 0.000000e+00 5.885777e+04 \n", + "pDC 3.364876e+04 4.817889e+04 5.885777e+04 0.000000e+00 \n", + "NK_CD56bright 1.094691e+05 7.370639e+04 6.648865e+04 1.562326e+05 \n", + "Doublet 1.755219e+05 1.444212e+05 1.515294e+05 1.981032e+05 \n", + "Plasmablast 5.739718e+06 5.738067e+06 5.738379e+06 5.677738e+06 \n", + "NK Proliferating 1.842993e+05 1.494014e+05 1.508149e+05 2.304294e+05 \n", + "\n", + "celltype.l2 NK_CD56bright Doublet Plasmablast NK Proliferating \n", + "celltype.l2 \n", + "CD14 Mono 1.625582e+05 3.767516e+04 5.818803e+06 1.630970e+05 \n", + "NK 4.680649e+04 9.495110e+04 5.701943e+06 4.501397e+04 \n", + "CD4 Naive 1.128830e+05 2.006451e+05 5.778199e+06 2.154345e+05 \n", + "CD4 TCM 6.013626e+04 1.432068e+05 5.740474e+06 1.411331e+05 \n", + "CD8 TEM 1.063709e+05 1.518232e+05 5.720420e+06 1.427739e+05 \n", + "B naive 7.357617e+04 1.518486e+05 5.481184e+06 1.547972e+05 \n", + "CD8 Naive 1.508066e+05 2.458617e+05 5.797959e+06 2.667328e+05 \n", + "CD16 Mono 1.582495e+05 3.148773e+04 5.776238e+06 1.482286e+05 \n", + "CD4 TEM 3.374413e+04 1.126131e+05 5.717712e+06 9.820955e+04 \n", + "B memory 1.797375e+05 2.515474e+05 5.545989e+06 2.805253e+05 \n", + "B intermediate 1.779544e+05 2.383603e+05 5.531375e+06 2.684733e+05 \n", + "cDC2 1.193689e+05 9.322844e+04 5.777656e+06 1.586087e+05 \n", + "MAIT 2.161516e+04 8.665788e+04 5.690409e+06 6.010363e+04 \n", + "Platelet 3.618851e+05 3.298005e+05 6.149058e+06 2.887899e+05 \n", + "CD4 CTL 1.646173e+05 2.043215e+05 5.759835e+06 2.091024e+05 \n", + "gdT 1.094691e+05 1.755219e+05 5.739718e+06 1.842993e+05 \n", + "Treg 7.370639e+04 1.444212e+05 5.738067e+06 1.494014e+05 \n", + "CD8 TCM 6.648865e+04 1.515294e+05 5.738379e+06 1.508149e+05 \n", + "pDC 1.562326e+05 1.981032e+05 5.677738e+06 2.304294e+05 \n", + "NK_CD56bright 0.000000e+00 9.580880e+04 5.714391e+06 3.542029e+04 \n", + "Doublet 9.580880e+04 0.000000e+00 5.757203e+06 8.798352e+04 \n", + "Plasmablast 5.714391e+06 5.757203e+06 0.000000e+00 5.724480e+06 \n", + "NK Proliferating 3.542029e+04 8.798352e+04 5.724480e+06 0.000000e+00 \n", + "\n", + "[23 rows x 23 columns]" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "estats_unever" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c680d2e4", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "48072bbe", + "metadata": {}, + "outputs": [], "source": [] } ],