diff --git a/docs/tutorials/tutorial_3k_tcr.ipynb b/docs/tutorials/tutorial_3k_tcr.ipynb index 6db70d397..67a788cde 100644 --- a/docs/tutorials/tutorial_3k_tcr.ipynb +++ b/docs/tutorials/tutorial_3k_tcr.ipynb @@ -65,7 +65,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "6c87ca4d92a24be68298b074eb592bc8", + "model_id": "bf1766946df74770a839f63b23d25115", "version_major": 2, "version_minor": 0 }, @@ -88,10 +88,10 @@ " \n", " \n", " Python3.11.10 (main, Oct 16 2024, 04:38:48) [Clang 18.1.8 ]\n", - " OSLinux-6.13.8-arch1-1-x86_64-with-glibc2.41\n", + " OSLinux-6.15.9-arch1-1-x86_64-with-glibc2.42\n", " CPU16 logical CPU cores\n", - " GPUID: 0, NVIDIA T550 Laptop GPU, Driver: 570.133.07, Memory: 4096 MiB\n", - " Updated2025-04-05 20:03\n", + " GPUNo GPU found\n", + " Updated2025-10-27 07:21\n", " \n", " \n", "\n", @@ -103,98 +103,98 @@ " DependencyVersion\n", "\n", "\n", - " wrapt1.17.2\n", - " setuptools78.1.0\n", - " networkx3.4.2\n", - " cupy-cuda12x13.4.1\n", - " zarr2.18.3\n", - " h5py3.13.0\n", - " kiwisolver1.4.8\n", - " sphinxcontrib-jsmath1.0.1\n", - " fastrlock0.8.3\n", - " zipp3.21.0\n", - " adjustText1.3.0\n", - " patsy1.0.1\n", - " pandas2.2.3\n", - " seaborn0.13.2\n", - " pycairo1.27.0\n", - " sphinxcontrib-applehelp2.0.0\n", - " packaging24.2\n", + " jupyter_core5.7.2\n", + " traitlets5.14.3\n", " threadpoolctl3.6.0\n", - " sphinxcontrib-htmlhelp2.1.0\n", - " comm0.2.2\n", - " ipython9.0.2\n", - " PyYAML6.0.2\n", - " pynndescent0.5.13\n", - " legacy-api-wrap1.4.1\n", - " scipy1.15.2\n", - " asttokens3.0.0\n", - " pyzmq26.4.0\n", - " logomaker0.8.7\n", - " tqdm4.67.1\n", - " charset-normalizer3.4.1\n", - " pooch1.8.2 (v1.8.2)\n", - " session-info20.1.2\n", - " Deprecated1.2.18\n", - " pytz2025.2\n", - " typing_extensions4.13.1\n", - " igraph0.11.8\n", - " prompt_toolkit3.0.50\n", " sphinxcontrib-qthelp2.0.0\n", + " jaraco.context5.3.0\n", " six1.17.0\n", - " ipywidgets8.1.5\n", - " parso0.8.4\n", - " Levenshtein0.27.1\n", - " statsmodels0.14.4\n", - " iniconfig2.1.0\n", - " fsspec2025.3.2\n", - " sphinxcontrib-devhelp2.0.0\n", " decorator5.2.1\n", - " more-itertools10.3.0\n", - " defusedxml0.7.1\n", - " pyparsing3.2.3\n", - " pillow11.1.0\n", - " importlib_metadata8.6.1\n", + " fsspec2025.3.2\n", + " Pygments2.19.1\n", + " awkward_cpp45\n", + " statsmodels0.14.4\n", + " zipp3.21.0\n", + " seaborn0.13.2\n", + " session-info20.1.2\n", + " joblib1.4.2\n", " RapidFuzz3.13.0\n", - " ipykernel6.29.5\n", - " texttable1.7.0\n", - " jaraco.context5.3.0\n", - " platformdirs4.3.7\n", - " backports.tarfile1.2.0\n", - " setuptools-scm8.2.0\n", - " traitlets5.14.3\n", - " anndata0.11.4\n", - " pure_eval0.2.3\n", - " executing2.2.0\n", - " jupyter_client8.6.3\n", + " logomaker0.8.7\n", + " prompt_toolkit3.0.50\n", + " adjustText1.3.0\n", + " mudata0.3.1\n", + " coverage7.8.0\n", " debugpy1.8.13\n", - " awkward_cpp45\n", - " pluggy1.5.0\n", + " sphinxcontrib-htmlhelp2.1.0\n", + " kiwisolver1.4.8\n", + " pillow11.1.0\n", + " stack-data0.6.3\n", + " natsort8.4.0\n", " scikit-learn1.5.2\n", + " sphinxcontrib-serializinghtml2.0.0\n", " umap-learn0.5.7\n", - " python-dateutil2.9.0.post0\n", + " pycairo1.27.0\n", + " setuptools78.1.0\n", " asciitree0.3.3\n", + " importlib_metadata8.6.1\n", + " tqdm4.67.1\n", + " numcodecs0.15.1\n", + " executing2.2.0\n", + " anndata0.11.4\n", + " igraph0.11.8\n", + " defusedxml0.7.1\n", + " scipy1.15.2\n", + " parso0.8.4\n", + " cupy-cuda12x13.4.1\n", + " PyYAML6.0.2\n", + " jaraco.text3.12.1\n", + " typing_extensions4.13.1\n", + " sphinxcontrib-jsmath1.0.1\n", + " pytz2025.2\n", + " pandas2.2.3\n", + " awkward2.8.1\n", + " fastrlock0.8.3\n", + " sphinxcontrib-devhelp2.0.0\n", + " Deprecated1.2.18\n", + " setuptools-scm8.2.0\n", + " pluggy1.5.0\n", + " zarr2.18.3\n", + " jupyter_client8.6.3\n", + " pyzmq26.4.0\n", + " jedi0.19.2\n", + " comm0.2.2\n", " pytest8.3.5\n", - " joblib1.4.2\n", " tornado6.4.2\n", - " sphinxcontrib-serializinghtml2.0.0\n", + " asttokens3.0.0\n", " psutil7.0.0\n", - " natsort8.4.0\n", - " jaraco.text3.12.1\n", - " numcodecs0.15.1\n", - " Pygments2.19.1\n", - " stack-data0.6.3\n", - " jaraco.functools4.0.1\n", - " leidenalg0.10.2\n", + " pure_eval0.2.3\n", + " wrapt1.17.2\n", + " jaraco.collections5.1.0\n", + " charset-normalizer3.4.1\n", + " networkx3.4.2\n", + " patsy1.0.1\n", + " iniconfig2.1.0\n", + " ipywidgets8.1.5\n", + " backports.tarfile1.2.0\n", + " wcwidth0.2.13\n", + " platformdirs4.3.7\n", + " python-dateutil2.9.0.post0\n", + " packaging24.2\n", " llvmlite0.44.0\n", - " coverage7.8.0\n", + " ipykernel6.29.5\n", + " pyparsing3.2.3\n", + " h5py3.13.0\n", + " leidenalg0.10.2\n", + " legacy-api-wrap1.4.1\n", + " pynndescent0.5.13\n", + " sphinxcontrib-applehelp2.0.0\n", + " texttable1.7.0\n", + " pooch1.8.2 (v1.8.2)\n", + " ipython9.0.2\n", " sphinxcontrib-bibtex2.6.3\n", - " jedi0.19.2\n", - " mudata0.3.1\n", - " wcwidth0.2.13\n", - " jaraco.collections5.1.0\n", - " awkward2.8.1\n", - " jupyter_core5.7.2\n", + " more-itertools10.3.0\n", + " Levenshtein0.27.1\n", + " jaraco.functools4.0.1\n", "\n", " \n", "\n", @@ -213,106 +213,106 @@ "\n", "| Dependency | Version |\n", "| ----------------------------- | -------------- |\n", - "| wrapt | 1.17.2 |\n", - "| setuptools | 78.1.0 |\n", - "| networkx | 3.4.2 |\n", - "| cupy-cuda12x | 13.4.1 |\n", - "| zarr | 2.18.3 |\n", - "| h5py | 3.13.0 |\n", - "| kiwisolver | 1.4.8 |\n", - "| sphinxcontrib-jsmath | 1.0.1 |\n", - "| fastrlock | 0.8.3 |\n", - "| zipp | 3.21.0 |\n", - "| adjustText | 1.3.0 |\n", - "| patsy | 1.0.1 |\n", - "| pandas | 2.2.3 |\n", - "| seaborn | 0.13.2 |\n", - "| pycairo | 1.27.0 |\n", - "| sphinxcontrib-applehelp | 2.0.0 |\n", - "| packaging | 24.2 |\n", + "| jupyter_core | 5.7.2 |\n", + "| traitlets | 5.14.3 |\n", "| threadpoolctl | 3.6.0 |\n", - "| sphinxcontrib-htmlhelp | 2.1.0 |\n", - "| comm | 0.2.2 |\n", - "| ipython | 9.0.2 |\n", - "| PyYAML | 6.0.2 |\n", - "| pynndescent | 0.5.13 |\n", - "| legacy-api-wrap | 1.4.1 |\n", - "| scipy | 1.15.2 |\n", - "| asttokens | 3.0.0 |\n", - "| pyzmq | 26.4.0 |\n", - "| logomaker | 0.8.7 |\n", - "| tqdm | 4.67.1 |\n", - "| charset-normalizer | 3.4.1 |\n", - "| pooch | 1.8.2 (v1.8.2) |\n", - "| session-info2 | 0.1.2 |\n", - "| Deprecated | 1.2.18 |\n", - "| pytz | 2025.2 |\n", - "| typing_extensions | 4.13.1 |\n", - "| igraph | 0.11.8 |\n", - "| prompt_toolkit | 3.0.50 |\n", "| sphinxcontrib-qthelp | 2.0.0 |\n", + "| jaraco.context | 5.3.0 |\n", "| six | 1.17.0 |\n", - "| ipywidgets | 8.1.5 |\n", - "| parso | 0.8.4 |\n", - "| Levenshtein | 0.27.1 |\n", - "| statsmodels | 0.14.4 |\n", - "| iniconfig | 2.1.0 |\n", - "| fsspec | 2025.3.2 |\n", - "| sphinxcontrib-devhelp | 2.0.0 |\n", "| decorator | 5.2.1 |\n", - "| more-itertools | 10.3.0 |\n", - "| defusedxml | 0.7.1 |\n", - "| pyparsing | 3.2.3 |\n", - "| pillow | 11.1.0 |\n", - "| importlib_metadata | 8.6.1 |\n", + "| fsspec | 2025.3.2 |\n", + "| Pygments | 2.19.1 |\n", + "| awkward_cpp | 45 |\n", + "| statsmodels | 0.14.4 |\n", + "| zipp | 3.21.0 |\n", + "| seaborn | 0.13.2 |\n", + "| session-info2 | 0.1.2 |\n", + "| joblib | 1.4.2 |\n", "| RapidFuzz | 3.13.0 |\n", - "| ipykernel | 6.29.5 |\n", - "| texttable | 1.7.0 |\n", - "| jaraco.context | 5.3.0 |\n", - "| platformdirs | 4.3.7 |\n", - "| backports.tarfile | 1.2.0 |\n", - "| setuptools-scm | 8.2.0 |\n", - "| traitlets | 5.14.3 |\n", - "| anndata | 0.11.4 |\n", - "| pure_eval | 0.2.3 |\n", - "| executing | 2.2.0 |\n", - "| jupyter_client | 8.6.3 |\n", + "| logomaker | 0.8.7 |\n", + "| prompt_toolkit | 3.0.50 |\n", + "| adjustText | 1.3.0 |\n", + "| mudata | 0.3.1 |\n", + "| coverage | 7.8.0 |\n", "| debugpy | 1.8.13 |\n", - "| awkward_cpp | 45 |\n", - "| pluggy | 1.5.0 |\n", + "| sphinxcontrib-htmlhelp | 2.1.0 |\n", + "| kiwisolver | 1.4.8 |\n", + "| pillow | 11.1.0 |\n", + "| stack-data | 0.6.3 |\n", + "| natsort | 8.4.0 |\n", "| scikit-learn | 1.5.2 |\n", + "| sphinxcontrib-serializinghtml | 2.0.0 |\n", "| umap-learn | 0.5.7 |\n", - "| python-dateutil | 2.9.0.post0 |\n", + "| pycairo | 1.27.0 |\n", + "| setuptools | 78.1.0 |\n", "| asciitree | 0.3.3 |\n", + "| importlib_metadata | 8.6.1 |\n", + "| tqdm | 4.67.1 |\n", + "| numcodecs | 0.15.1 |\n", + "| executing | 2.2.0 |\n", + "| anndata | 0.11.4 |\n", + "| igraph | 0.11.8 |\n", + "| defusedxml | 0.7.1 |\n", + "| scipy | 1.15.2 |\n", + "| parso | 0.8.4 |\n", + "| cupy-cuda12x | 13.4.1 |\n", + "| PyYAML | 6.0.2 |\n", + "| jaraco.text | 3.12.1 |\n", + "| typing_extensions | 4.13.1 |\n", + "| sphinxcontrib-jsmath | 1.0.1 |\n", + "| pytz | 2025.2 |\n", + "| pandas | 2.2.3 |\n", + "| awkward | 2.8.1 |\n", + "| fastrlock | 0.8.3 |\n", + "| sphinxcontrib-devhelp | 2.0.0 |\n", + "| Deprecated | 1.2.18 |\n", + "| setuptools-scm | 8.2.0 |\n", + "| pluggy | 1.5.0 |\n", + "| zarr | 2.18.3 |\n", + "| jupyter_client | 8.6.3 |\n", + "| pyzmq | 26.4.0 |\n", + "| jedi | 0.19.2 |\n", + "| comm | 0.2.2 |\n", "| pytest | 8.3.5 |\n", - "| joblib | 1.4.2 |\n", "| tornado | 6.4.2 |\n", - "| sphinxcontrib-serializinghtml | 2.0.0 |\n", + "| asttokens | 3.0.0 |\n", "| psutil | 7.0.0 |\n", - "| natsort | 8.4.0 |\n", - "| jaraco.text | 3.12.1 |\n", - "| numcodecs | 0.15.1 |\n", - "| Pygments | 2.19.1 |\n", - "| stack-data | 0.6.3 |\n", - "| jaraco.functools | 4.0.1 |\n", - "| leidenalg | 0.10.2 |\n", + "| pure_eval | 0.2.3 |\n", + "| wrapt | 1.17.2 |\n", + "| jaraco.collections | 5.1.0 |\n", + "| charset-normalizer | 3.4.1 |\n", + "| networkx | 3.4.2 |\n", + "| patsy | 1.0.1 |\n", + "| iniconfig | 2.1.0 |\n", + "| ipywidgets | 8.1.5 |\n", + "| backports.tarfile | 1.2.0 |\n", + "| wcwidth | 0.2.13 |\n", + "| platformdirs | 4.3.7 |\n", + "| python-dateutil | 2.9.0.post0 |\n", + "| packaging | 24.2 |\n", "| llvmlite | 0.44.0 |\n", - "| coverage | 7.8.0 |\n", + "| ipykernel | 6.29.5 |\n", + "| pyparsing | 3.2.3 |\n", + "| h5py | 3.13.0 |\n", + "| leidenalg | 0.10.2 |\n", + "| legacy-api-wrap | 1.4.1 |\n", + "| pynndescent | 0.5.13 |\n", + "| sphinxcontrib-applehelp | 2.0.0 |\n", + "| texttable | 1.7.0 |\n", + "| pooch | 1.8.2 (v1.8.2) |\n", + "| ipython | 9.0.2 |\n", "| sphinxcontrib-bibtex | 2.6.3 |\n", - "| jedi | 0.19.2 |\n", - "| mudata | 0.3.1 |\n", - "| wcwidth | 0.2.13 |\n", - "| jaraco.collections | 5.1.0 |\n", - "| awkward | 2.8.1 |\n", - "| jupyter_core | 5.7.2 |\n", + "| more-itertools | 10.3.0 |\n", + "| Levenshtein | 0.27.1 |\n", + "| jaraco.functools | 4.0.1 |\n", "\n", - "| Component | Info |\n", - "| --------- | ------------------------------------------------------------------- |\n", - "| Python | 3.11.10 (main, Oct 16 2024, 04:38:48) [Clang 18.1.8 ] |\n", - "| OS | Linux-6.13.8-arch1-1-x86_64-with-glibc2.41 |\n", - "| CPU | 16 logical CPU cores |\n", - "| GPU | ID: 0, NVIDIA T550 Laptop GPU, Driver: 570.133.07, Memory: 4096 MiB |\n", - "| Updated | 2025-04-05 20:03 |\n", + "| Component | Info |\n", + "| --------- | ----------------------------------------------------- |\n", + "| Python | 3.11.10 (main, Oct 16 2024, 04:38:48) [Clang 18.1.8 ] |\n", + "| OS | Linux-6.15.9-arch1-1-x86_64-with-glibc2.42 |\n", + "| CPU | 16 logical CPU cores |\n", + "| GPU | No GPU found |\n", + "| Updated | 2025-10-27 07:21 |\n", " " ], "text/markdown": [ @@ -328,106 +328,106 @@ "\n", "| Dependency | Version |\n", "| ----------------------------- | -------------- |\n", - "| wrapt | 1.17.2 |\n", - "| setuptools | 78.1.0 |\n", - "| networkx | 3.4.2 |\n", - "| cupy-cuda12x | 13.4.1 |\n", - "| zarr | 2.18.3 |\n", - "| h5py | 3.13.0 |\n", - "| kiwisolver | 1.4.8 |\n", - "| sphinxcontrib-jsmath | 1.0.1 |\n", - "| fastrlock | 0.8.3 |\n", - "| zipp | 3.21.0 |\n", - "| adjustText | 1.3.0 |\n", - "| patsy | 1.0.1 |\n", - "| pandas | 2.2.3 |\n", - "| seaborn | 0.13.2 |\n", - "| pycairo | 1.27.0 |\n", - "| sphinxcontrib-applehelp | 2.0.0 |\n", - "| packaging | 24.2 |\n", + "| jupyter_core | 5.7.2 |\n", + "| traitlets | 5.14.3 |\n", "| threadpoolctl | 3.6.0 |\n", - "| sphinxcontrib-htmlhelp | 2.1.0 |\n", - "| comm | 0.2.2 |\n", - "| ipython | 9.0.2 |\n", - "| PyYAML | 6.0.2 |\n", - "| pynndescent | 0.5.13 |\n", - "| legacy-api-wrap | 1.4.1 |\n", - "| scipy | 1.15.2 |\n", - "| asttokens | 3.0.0 |\n", - "| pyzmq | 26.4.0 |\n", - "| logomaker | 0.8.7 |\n", - "| tqdm | 4.67.1 |\n", - "| charset-normalizer | 3.4.1 |\n", - "| pooch | 1.8.2 (v1.8.2) |\n", - "| session-info2 | 0.1.2 |\n", - "| Deprecated | 1.2.18 |\n", - "| pytz | 2025.2 |\n", - "| typing_extensions | 4.13.1 |\n", - "| igraph | 0.11.8 |\n", - "| prompt_toolkit | 3.0.50 |\n", "| sphinxcontrib-qthelp | 2.0.0 |\n", + "| jaraco.context | 5.3.0 |\n", "| six | 1.17.0 |\n", - "| ipywidgets | 8.1.5 |\n", - "| parso | 0.8.4 |\n", - "| Levenshtein | 0.27.1 |\n", - "| statsmodels | 0.14.4 |\n", - "| iniconfig | 2.1.0 |\n", - "| fsspec | 2025.3.2 |\n", - "| sphinxcontrib-devhelp | 2.0.0 |\n", "| decorator | 5.2.1 |\n", - "| more-itertools | 10.3.0 |\n", - "| defusedxml | 0.7.1 |\n", - "| pyparsing | 3.2.3 |\n", - "| pillow | 11.1.0 |\n", - "| importlib_metadata | 8.6.1 |\n", + "| fsspec | 2025.3.2 |\n", + "| Pygments | 2.19.1 |\n", + "| awkward_cpp | 45 |\n", + "| statsmodels | 0.14.4 |\n", + "| zipp | 3.21.0 |\n", + "| seaborn | 0.13.2 |\n", + "| session-info2 | 0.1.2 |\n", + "| joblib | 1.4.2 |\n", "| RapidFuzz | 3.13.0 |\n", - "| ipykernel | 6.29.5 |\n", - "| texttable | 1.7.0 |\n", - "| jaraco.context | 5.3.0 |\n", - "| platformdirs | 4.3.7 |\n", - "| backports.tarfile | 1.2.0 |\n", - "| setuptools-scm | 8.2.0 |\n", - "| traitlets | 5.14.3 |\n", - "| anndata | 0.11.4 |\n", - "| pure_eval | 0.2.3 |\n", - "| executing | 2.2.0 |\n", - "| jupyter_client | 8.6.3 |\n", + "| logomaker | 0.8.7 |\n", + "| prompt_toolkit | 3.0.50 |\n", + "| adjustText | 1.3.0 |\n", + "| mudata | 0.3.1 |\n", + "| coverage | 7.8.0 |\n", "| debugpy | 1.8.13 |\n", - "| awkward_cpp | 45 |\n", - "| pluggy | 1.5.0 |\n", + "| sphinxcontrib-htmlhelp | 2.1.0 |\n", + "| kiwisolver | 1.4.8 |\n", + "| pillow | 11.1.0 |\n", + "| stack-data | 0.6.3 |\n", + "| natsort | 8.4.0 |\n", "| scikit-learn | 1.5.2 |\n", + "| sphinxcontrib-serializinghtml | 2.0.0 |\n", "| umap-learn | 0.5.7 |\n", - "| python-dateutil | 2.9.0.post0 |\n", + "| pycairo | 1.27.0 |\n", + "| setuptools | 78.1.0 |\n", "| asciitree | 0.3.3 |\n", + "| importlib_metadata | 8.6.1 |\n", + "| tqdm | 4.67.1 |\n", + "| numcodecs | 0.15.1 |\n", + "| executing | 2.2.0 |\n", + "| anndata | 0.11.4 |\n", + "| igraph | 0.11.8 |\n", + "| defusedxml | 0.7.1 |\n", + "| scipy | 1.15.2 |\n", + "| parso | 0.8.4 |\n", + "| cupy-cuda12x | 13.4.1 |\n", + "| PyYAML | 6.0.2 |\n", + "| jaraco.text | 3.12.1 |\n", + "| typing_extensions | 4.13.1 |\n", + "| sphinxcontrib-jsmath | 1.0.1 |\n", + "| pytz | 2025.2 |\n", + "| pandas | 2.2.3 |\n", + "| awkward | 2.8.1 |\n", + "| fastrlock | 0.8.3 |\n", + "| sphinxcontrib-devhelp | 2.0.0 |\n", + "| Deprecated | 1.2.18 |\n", + "| setuptools-scm | 8.2.0 |\n", + "| pluggy | 1.5.0 |\n", + "| zarr | 2.18.3 |\n", + "| jupyter_client | 8.6.3 |\n", + "| pyzmq | 26.4.0 |\n", + "| jedi | 0.19.2 |\n", + "| comm | 0.2.2 |\n", "| pytest | 8.3.5 |\n", - "| joblib | 1.4.2 |\n", "| tornado | 6.4.2 |\n", - "| sphinxcontrib-serializinghtml | 2.0.0 |\n", + "| asttokens | 3.0.0 |\n", "| psutil | 7.0.0 |\n", - "| natsort | 8.4.0 |\n", - "| jaraco.text | 3.12.1 |\n", - "| numcodecs | 0.15.1 |\n", - "| Pygments | 2.19.1 |\n", - "| stack-data | 0.6.3 |\n", - "| jaraco.functools | 4.0.1 |\n", - "| leidenalg | 0.10.2 |\n", + "| pure_eval | 0.2.3 |\n", + "| wrapt | 1.17.2 |\n", + "| jaraco.collections | 5.1.0 |\n", + "| charset-normalizer | 3.4.1 |\n", + "| networkx | 3.4.2 |\n", + "| patsy | 1.0.1 |\n", + "| iniconfig | 2.1.0 |\n", + "| ipywidgets | 8.1.5 |\n", + "| backports.tarfile | 1.2.0 |\n", + "| wcwidth | 0.2.13 |\n", + "| platformdirs | 4.3.7 |\n", + "| python-dateutil | 2.9.0.post0 |\n", + "| packaging | 24.2 |\n", "| llvmlite | 0.44.0 |\n", - "| coverage | 7.8.0 |\n", + "| ipykernel | 6.29.5 |\n", + "| pyparsing | 3.2.3 |\n", + "| h5py | 3.13.0 |\n", + "| leidenalg | 0.10.2 |\n", + "| legacy-api-wrap | 1.4.1 |\n", + "| pynndescent | 0.5.13 |\n", + "| sphinxcontrib-applehelp | 2.0.0 |\n", + "| texttable | 1.7.0 |\n", + "| pooch | 1.8.2 (v1.8.2) |\n", + "| ipython | 9.0.2 |\n", "| sphinxcontrib-bibtex | 2.6.3 |\n", - "| jedi | 0.19.2 |\n", - "| mudata | 0.3.1 |\n", - "| wcwidth | 0.2.13 |\n", - "| jaraco.collections | 5.1.0 |\n", - "| awkward | 2.8.1 |\n", - "| jupyter_core | 5.7.2 |\n", + "| more-itertools | 10.3.0 |\n", + "| Levenshtein | 0.27.1 |\n", + "| jaraco.functools | 4.0.1 |\n", "\n", - "| Component | Info |\n", - "| --------- | ------------------------------------------------------------------- |\n", - "| Python | 3.11.10 (main, Oct 16 2024, 04:38:48) [Clang 18.1.8 ] |\n", - "| OS | Linux-6.13.8-arch1-1-x86_64-with-glibc2.41 |\n", - "| CPU | 16 logical CPU cores |\n", - "| GPU | ID: 0, NVIDIA T550 Laptop GPU, Driver: 570.133.07, Memory: 4096 MiB |\n", - "| Updated | 2025-04-05 20:03 |" + "| Component | Info |\n", + "| --------- | ----------------------------------------------------- |\n", + "| Python | 3.11.10 (main, Oct 16 2024, 04:38:48) [Clang 18.1.8 ] |\n", + "| OS | Linux-6.15.9-arch1-1-x86_64-with-glibc2.42 |\n", + "| CPU | 16 logical CPU cores |\n", + "| GPU | No GPU found |\n", + "| Updated | 2025-10-27 07:21 |" ], "text/plain": [ "numba\t0.61.0\n", @@ -436,106 +436,106 @@ "scanpy\t1.11.1\n", "cycler\t0.12.1\n", "matplotlib\t3.10.1\n", - "matplotlib-inline\t0.1.7\n", - "----\t----\n", - "wrapt\t1.17.2\n", - "setuptools\t78.1.0\n", - "networkx\t3.4.2\n", - "cupy-cuda12x\t13.4.1\n", - "zarr\t2.18.3\n", - "h5py\t3.13.0\n", - "kiwisolver\t1.4.8\n", - "sphinxcontrib-jsmath\t1.0.1\n", - "fastrlock\t0.8.3\n", - "zipp\t3.21.0\n", - "adjustText\t1.3.0\n", - "patsy\t1.0.1\n", - "pandas\t2.2.3\n", - "seaborn\t0.13.2\n", - "pycairo\t1.27.0\n", - "sphinxcontrib-applehelp\t2.0.0\n", - "packaging\t24.2\n", - "threadpoolctl\t3.6.0\n", - "sphinxcontrib-htmlhelp\t2.1.0\n", - "comm\t0.2.2\n", - "ipython\t9.0.2\n", - "PyYAML\t6.0.2\n", - "pynndescent\t0.5.13\n", - "legacy-api-wrap\t1.4.1\n", - "scipy\t1.15.2\n", - "asttokens\t3.0.0\n", - "pyzmq\t26.4.0\n", - "logomaker\t0.8.7\n", - "tqdm\t4.67.1\n", - "charset-normalizer\t3.4.1\n", - "pooch\t1.8.2 (v1.8.2)\n", - "session-info2\t0.1.2\n", - "Deprecated\t1.2.18\n", - "pytz\t2025.2\n", - "typing_extensions\t4.13.1\n", - "igraph\t0.11.8\n", - "prompt_toolkit\t3.0.50\n", + "matplotlib-inline\t0.1.7\n", + "----\t----\n", + "jupyter_core\t5.7.2\n", + "traitlets\t5.14.3\n", + "threadpoolctl\t3.6.0\n", "sphinxcontrib-qthelp\t2.0.0\n", + "jaraco.context\t5.3.0\n", "six\t1.17.0\n", - "ipywidgets\t8.1.5\n", - "parso\t0.8.4\n", - "Levenshtein\t0.27.1\n", - "statsmodels\t0.14.4\n", - "iniconfig\t2.1.0\n", - "fsspec\t2025.3.2\n", - "sphinxcontrib-devhelp\t2.0.0\n", "decorator\t5.2.1\n", - "more-itertools\t10.3.0\n", - "defusedxml\t0.7.1\n", - "pyparsing\t3.2.3\n", - "pillow\t11.1.0\n", - "importlib_metadata\t8.6.1\n", + "fsspec\t2025.3.2\n", + "Pygments\t2.19.1\n", + "awkward_cpp\t45\n", + "statsmodels\t0.14.4\n", + "zipp\t3.21.0\n", + "seaborn\t0.13.2\n", + "session-info2\t0.1.2\n", + "joblib\t1.4.2\n", "RapidFuzz\t3.13.0\n", - "ipykernel\t6.29.5\n", - "texttable\t1.7.0\n", - "jaraco.context\t5.3.0\n", - "platformdirs\t4.3.7\n", - "backports.tarfile\t1.2.0\n", - "setuptools-scm\t8.2.0\n", - "traitlets\t5.14.3\n", - "anndata\t0.11.4\n", - "pure_eval\t0.2.3\n", - "executing\t2.2.0\n", - "jupyter_client\t8.6.3\n", + "logomaker\t0.8.7\n", + "prompt_toolkit\t3.0.50\n", + "adjustText\t1.3.0\n", + "mudata\t0.3.1\n", + "coverage\t7.8.0\n", "debugpy\t1.8.13\n", - "awkward_cpp\t45\n", - "pluggy\t1.5.0\n", + "sphinxcontrib-htmlhelp\t2.1.0\n", + "kiwisolver\t1.4.8\n", + "pillow\t11.1.0\n", + "stack-data\t0.6.3\n", + "natsort\t8.4.0\n", "scikit-learn\t1.5.2\n", + "sphinxcontrib-serializinghtml\t2.0.0\n", "umap-learn\t0.5.7\n", - "python-dateutil\t2.9.0.post0\n", + "pycairo\t1.27.0\n", + "setuptools\t78.1.0\n", "asciitree\t0.3.3\n", + "importlib_metadata\t8.6.1\n", + "tqdm\t4.67.1\n", + "numcodecs\t0.15.1\n", + "executing\t2.2.0\n", + "anndata\t0.11.4\n", + "igraph\t0.11.8\n", + "defusedxml\t0.7.1\n", + "scipy\t1.15.2\n", + "parso\t0.8.4\n", + "cupy-cuda12x\t13.4.1\n", + "PyYAML\t6.0.2\n", + "jaraco.text\t3.12.1\n", + "typing_extensions\t4.13.1\n", + "sphinxcontrib-jsmath\t1.0.1\n", + "pytz\t2025.2\n", + "pandas\t2.2.3\n", + "awkward\t2.8.1\n", + "fastrlock\t0.8.3\n", + "sphinxcontrib-devhelp\t2.0.0\n", + "Deprecated\t1.2.18\n", + "setuptools-scm\t8.2.0\n", + "pluggy\t1.5.0\n", + "zarr\t2.18.3\n", + "jupyter_client\t8.6.3\n", + "pyzmq\t26.4.0\n", + "jedi\t0.19.2\n", + "comm\t0.2.2\n", "pytest\t8.3.5\n", - "joblib\t1.4.2\n", "tornado\t6.4.2\n", - "sphinxcontrib-serializinghtml\t2.0.0\n", + "asttokens\t3.0.0\n", "psutil\t7.0.0\n", - "natsort\t8.4.0\n", - "jaraco.text\t3.12.1\n", - "numcodecs\t0.15.1\n", - "Pygments\t2.19.1\n", - "stack-data\t0.6.3\n", - "jaraco.functools\t4.0.1\n", - "leidenalg\t0.10.2\n", + "pure_eval\t0.2.3\n", + "wrapt\t1.17.2\n", + "jaraco.collections\t5.1.0\n", + "charset-normalizer\t3.4.1\n", + "networkx\t3.4.2\n", + "patsy\t1.0.1\n", + "iniconfig\t2.1.0\n", + "ipywidgets\t8.1.5\n", + "backports.tarfile\t1.2.0\n", + "wcwidth\t0.2.13\n", + "platformdirs\t4.3.7\n", + "python-dateutil\t2.9.0.post0\n", + "packaging\t24.2\n", "llvmlite\t0.44.0\n", - "coverage\t7.8.0\n", + "ipykernel\t6.29.5\n", + "pyparsing\t3.2.3\n", + "h5py\t3.13.0\n", + "leidenalg\t0.10.2\n", + "legacy-api-wrap\t1.4.1\n", + "pynndescent\t0.5.13\n", + "sphinxcontrib-applehelp\t2.0.0\n", + "texttable\t1.7.0\n", + "pooch\t1.8.2 (v1.8.2)\n", + "ipython\t9.0.2\n", "sphinxcontrib-bibtex\t2.6.3\n", - "jedi\t0.19.2\n", - "mudata\t0.3.1\n", - "wcwidth\t0.2.13\n", - "jaraco.collections\t5.1.0\n", - "awkward\t2.8.1\n", - "jupyter_core\t5.7.2\n", + "more-itertools\t10.3.0\n", + "Levenshtein\t0.27.1\n", + "jaraco.functools\t4.0.1\n", "----\t----\n", "Python\t3.11.10 (main, Oct 16 2024, 04:38:48) [Clang 18.1.8 ]\n", - "OS\tLinux-6.13.8-arch1-1-x86_64-with-glibc2.41\n", + "OS\tLinux-6.15.9-arch1-1-x86_64-with-glibc2.42\n", "CPU\t16 logical CPU cores\n", - "GPU\tID: 0, NVIDIA T550 Laptop GPU, Driver: 570.133.07, Memory: 4096 MiB\n", - "Updated\t2025-04-05 20:03" + "GPU\tNo GPU found\n", + "Updated\t2025-10-27 07:21" ] }, "execution_count": 3, @@ -932,13 +932,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Filtering chains...\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Filtering chains...\n", "Indexing VJ chains...\n", "Indexing VDJ chains...\n", "build result array\n" @@ -1498,7 +1492,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/sturm/projects/scverse/scirpy/src/scirpy/ir_dist/metrics.py:1324: NumbaTypeSafetyWarning: unsafe cast from uint64 to int64. Precision may be lost.\n", + "/home/sturm/projects/scverse/scirpy/src/scirpy/ir_dist/metrics.py:1356: NumbaTypeSafetyWarning: unsafe cast from uint64 to int64. Precision may be lost.\n", " data_rows[row_index][0] = data_row_matrix[thread_id, 0:row_end_index].copy()\n" ] }, @@ -1801,7 +1795,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/tmp/ipykernel_178512/127966610.py:2: DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.\n", + "/tmp/ipykernel_457828/127966610.py:2: DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.\n", " ct_different_v = mdata.obs.groupby(\"airr:cc_aa_tcrdist\").apply(lambda x: x[\"airr:cc_aa_tcrdist_same_v\"].nunique() > 1)\n" ] }, @@ -3176,7 +3170,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "074b38e79f48473d9a80ae79502bfe30", + "model_id": "ea2808632aca4db28deda81c3d23ccce", "version_major": 2, "version_minor": 0 }, @@ -3197,7 +3191,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "58432b177e1848c6aa567622ee0ad4ae", + "model_id": "ee0abb711dfc418d9ed2fe32713139e7", "version_major": 2, "version_minor": 0 }, @@ -3744,13 +3738,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Initializing lookup tables. \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Initializing lookup tables. \n", "Computing clonotype x clonotype distances.\n", "Stored IR distance matrix in `adata.uns[\"ir_query_VDJDB_aa_identity\"]`.\n" ] @@ -3888,7 +3876,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e545677922434900b62bf29f848b534c", + "model_id": "2ca4cd151af043a384f576f605e1ed54", "version_major": 2, "version_minor": 0 }, @@ -3945,6 +3933,159 @@ "source": [ "mu.pl.embedding(mdata, \"gex:umap\", color=\"airr:antigen.species\")" ] + }, + { + "cell_type": "code", + "execution_count": 75, + "id": "86c80f64", + "metadata": {}, + "outputs": [], + "source": [ + "iggytop = ir.datasets.iggytop()" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "id": "760223ac", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Computing sequence x sequence distance matrix for VJ sequences.\n", + "Computing sequence x sequence distance matrix for VDJ sequences.\n" + ] + } + ], + "source": [ + "ir.pp.ir_dist(mdata, iggytop, metric=\"identity\", sequence=\"aa\")" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "id": "66c69c14", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "AnnData object with n_obs × n_vars = 352753 × 0\n", + " obs: 'MHC_class', 'MHC_gene_1', 'MHC_gene_2', 'PMID', 'antigen_name', 'antigen_species', 'data_source', 'epitope_sequence', 'iedb_iri', 'is_paired'\n", + " uns: 'scirpy_version', 'DB', 'chain_indices'\n", + " obsm: 'airr', 'chain_indices'" + ] + }, + "execution_count": 78, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "iggytop" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "id": "37b83cef", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Initializing lookup tables. \n", + "Computing clonotype x clonotype distances.\n", + "Stored IR distance matrix in `adata.uns[\"ir_query_iggytop (full)_aa_identity\"]`.\n" + ] + } + ], + "source": [ + "ir.tl.ir_query(\n", + " mdata,\n", + " iggytop,\n", + " metric=\"identity\",\n", + " sequence=\"aa\",\n", + " receptor_arms=\"any\",\n", + " dual_ir=\"any\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "id": "ad90f2bb", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "c5c2021a76484477bdfbba9f754007fb", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/427 [00:00" + ] + }, + "metadata": { + "image/png": { + "height": 296, + "width": 869 + } + }, + "output_type": "display_data" + } + ], + "source": [ + "mu.pl.embedding(mdata, \"gex:umap\", color=\"airr:antigen_species\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7d70f3f0", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -3954,7 +4095,7 @@ "notebook_metadata_filter": "-kernelspec" }, "kernelspec": { - "display_name": ".venv", + "display_name": "scirpy", "language": "python", "name": "python3" }, diff --git a/src/scirpy/datasets/__init__.py b/src/scirpy/datasets/__init__.py index 732a18fa7..1d9b05e95 100644 --- a/src/scirpy/datasets/__init__.py +++ b/src/scirpy/datasets/__init__.py @@ -1,3 +1,5 @@ +import gzip +import json import os import os.path import tempfile @@ -39,6 +41,16 @@ "stephenson2021_5k.h5mu": "md5:6ea26f9d95525371ff9028f8e99ed474", }, ) +_IGGYTOP = pooch.create( + path=pooch.os_cache("scirpy"), + base_url="doi:10.5281/zenodo.15754598", + version=version("scirpy"), + version_dev="main", + env="SCIRPY_DATA_DIR", + registry=None, +) + + _POOCH_INFO = dedent( """\ .. note:: @@ -54,6 +66,35 @@ ) +def iggytop(database=None) -> AnnData: + if not _IGGYTOP.registry: + _IGGYTOP.load_registry_from_doi() + + logging.info("Downloading database") + fname = cast(PathLike, _IGGYTOP.fetch("iggytop_15072025.json.gz", progressbar=True)) + with gzip.open(fname) as f: + iggytop = json.load(f) + + def _get_airr_cells(): + for cell_data in iggytop: + airr_cell = AirrCell(cell_data["cell_id"]) + for k, v in cell_data.get("cell_attributes", {}).items(): + if k == "cell_id": + continue + airr_cell[k] = v + + for chain in cell_data.get("chains", []): + airr_cell.add_chain(chain) + yield airr_cell + + logging.info("Building AnnData") + adata = from_airr_cells(list(_get_airr_cells())) + + adata.uns["DB"] = {"name": "iggytop-full", "date_downloaded": datetime.now().isoformat()} + + return adata + + @_doc_params( processing_code=indent(_read_to_str(HERE / "_processing_scripts/wu2020.py"), " " * 8), pooch_info=_POOCH_INFO,