From 8ec85180488ac3d4e61c010b9d1340e225c33258 Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Thu, 20 Jul 2023 14:31:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20repository=20to=20`lami?= =?UTF-8?q?n-usecases`=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- .pre-commit-config.yaml | 2 +- README.md | 4 +- docs/biology/lineage.ipynb | 651 ------ docs/index.md | 2 +- docs/usecases/analyses.ipynb | 1875 +++++++++++++++++ docs/{biology => usecases}/celltypist.ipynb | 4 +- docs/{biology => usecases}/enrichr.ipynb | 8 +- docs/usecases/index.md | 8 + .../index.md => usecases/registries.md} | 3 +- lamin-project.yaml | 8 +- .../__init__.py | 2 +- .../_datasets.py | 0 pyproject.toml | 6 +- 14 files changed, 1903 insertions(+), 672 deletions(-) delete mode 100644 docs/biology/lineage.ipynb create mode 100644 docs/usecases/analyses.ipynb rename docs/{biology => usecases}/celltypist.ipynb (99%) rename docs/{biology => usecases}/enrichr.ipynb (98%) create mode 100644 docs/usecases/index.md rename docs/{biology/index.md => usecases/registries.md} (62%) rename {lamin_examples => lamin_usecases}/__init__.py (86%) rename {lamin_examples => lamin_usecases}/_datasets.py (100%) diff --git a/.gitignore b/.gitignore index 881873d..8fc7ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -102,7 +102,7 @@ ENV/ # Lamin _build -docs/lamin_examples.* +docs/lamin_usecases.* lamin_sphinx docs/conf.py _docs_tmp* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b8e83c5..1330b70 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: - id: nbstripout exclude: | (?x)( - docs/examples/| + docs/usecases/| docs/notes/ ) - repo: https://github.com/Lucas-C/pre-commit-hooks diff --git a/README.md b/README.md index 52294b2..4c56bcd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# lamin-examples: Examples built on Lamin +# Lamin use cases -Read the [docs](https://lamin-examples-ddcd.netlify.app/docs/lamin-examples/). +Read the [docs](https://lamin-examples-ddcd.netlify.app). diff --git a/docs/biology/lineage.ipynb b/docs/biology/lineage.ipynb deleted file mode 100644 index 733b5e9..0000000 --- a/docs/biology/lineage.ipynb +++ /dev/null @@ -1,651 +0,0 @@ -{ - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data lineage of an AnnData object" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Background" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Data lineage tracking in the context of biological data refers to the process of capturing and documenting the origin, transformations, and flow of biological data throughout its lifecycle." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Data lineage tracking is of utmost importance and practical value as it empowers to maintain the traceability and reliability of biological data, verify experimental outcomes, meet stringent regulatory standards, and foster the reproducibility and transparency of scientific research and discoveries." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In this example use-case we will track an AnnData object throughout its lifecycle." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Setup" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "```{warning}\n", - "\n", - "Please ensure that you have created or loaded a LaminDB instance before running the remaining part of this notebook!\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "tags": [ - "hide-cell" - ] - }, - "outputs": [], - "source": [ - "# A lamindb instance containing Bionty schema (skip if you already loaded your instance)\n", - "!lamin init --storage ./bio-lineage --schema bionty" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Import `lamindb` and `lnschema_bt` which enables us to connect [Bionty](https://github.com/laminlabs/bionty) with [LaminDB](https://github.com/laminlabs/lamindb). This enables us to map AnnData metadata annotations against ontologies and create SQL records within LaminDB to eventually make them queryable." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import lamindb as ln\n", - "import lnschema_bionty as lb\n", - "\n", - "ln.settings.verbosity = 3 # show hints" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Track cell types, tissues and diseases" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's enable tracking of the current notebook as the transform of this file using {func}`docs:lamindb.track`:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ln.track()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We fetch an example dataset from LaminDB that has a few cell type, tissue and disease annotations:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "adata = ln.dev.datasets.anndata_with_obs()\n", - "adata" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "adata.obs[[\"tissue\", \"cell_type\"]].value_counts()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Register biological metadata and link to the dataset" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As a first step, we register the Anndata object with LaminDB using {func}`docs:lamindb.File` and {func}`docs:lamindb.save`:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file = ln.File(adata, key=\"mini_anndata_with_obs.h5ad\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ln.save(file)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Using {func}`docs:lamindb.parse` we can associate the cell types and tissues with the Ontology metadata:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cell_types = lb.CellType.from_values(adata.obs.cell_type, lb.CellType.name)\n", - "tissues = lb.Tissue.from_values(adata.obs.tissue, lb.Tissue.name)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Register the cell types and tissues with LaminDB:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ln.save(cell_types)\n", - "ln.save(tissues);" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Associate the cell types and tissues with the {func}`docs:lamindb.File` object." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file.cell_types.set(cell_types)\n", - "file.tissues.set(tissues)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [] - }, - "source": [ - "### Your vocabulary store" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Examine the currently available cell types and tissues:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "lb.CellType.select().df()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "lb.Tissue.select().df()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": { - "tags": [] - }, - "source": [ - "## Processing of the dataset" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In the following we will modify the AnnData object to demonstrate data lineage tracking with LaminDB." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To track our data transformation we create a new {func}`docs:lamindb.Transform` of type \"pipeline\":" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "transform = ln.Transform(\n", - " type=\"pipeline\", name=\"subset_to_T_cells_and_liver_lymphoma\", version=\"0.1.0\"\n", - ")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Set the current tracking to the new transform using {func}`docs:lamindb.track`:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ln.track(transform)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Get a cloud-backed AnnData object" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file = ln.File.select(key=\"mini_anndata_with_obs.h5ad\").one()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "adata = file.backed(is_run_input=True)\n", - "adata" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "adata.obs[[\"cell_type\", \"disease\"]].value_counts()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Subset dataset to specific cell types and diseases" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Create the subset:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "subset_obs = adata.obs.cell_type.isin([\"T cell\", \"hematopoietic stem cell\"]) & (\n", - " adata.obs.disease.isin([\"liver lymphoma\", \"chronic kidney disease\"])\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "adata_subset = adata[subset_obs]\n", - "adata_subset" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "adata_subset.obs[[\"cell_type\", \"disease\"]].value_counts()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Add the subset `AnnData` to LaminDB" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This subset can now be registered with LaminDB." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file_subset = ln.File(adata_subset.to_memory(), key=\"subset/mini_anndata_with_obs.h5ad\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file_subset.save()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Link the subsetted file to cell types:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cell_types = lb.CellType.from_values(adata_subset.obs.cell_type, lb.CellType.name)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file_subset.cell_types.set(cell_types)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Examining data lineage" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Common questions that might arise are:\n", - "\n", - "- Which h5ad file is in the `subset` subfolder?\n", - "- Which notebook ingested this file?\n", - "- By whom?\n", - "- And which file is its parent?\n", - "\n", - "Let's answer this using LaminDB:" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Query a subsetted `.h5ad` file containing \"hematopoietic stem cell\" and \"T cell\" to learn which h5ad file is in the `subset` subfolder:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cell_types_bt_lookup = lb.CellType.lookup()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "le_subset = ln.File.select(\n", - " suffix=\".h5ad\",\n", - " key__startswith=\"subset\",\n", - " cell_types__in=[\n", - " cell_types_bt_lookup.hematopoietic_stem_cell,\n", - " cell_types_bt_lookup.t_cell,\n", - " ],\n", - ").first()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "le_subset" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Which notebook ingested this file?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file_subset.transform" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Who ingested this file?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file_subset.created_by" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "What are the parent files?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "file_subset.run.inputs.all()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Conclusion" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Data lineage tracking can be easily achieved with Lamin through {func}`docs:lamindb.Transform` together with {func}`docs:lamindb.track`." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Try it yourself" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This notebook is available at [https://github.com/laminlabs/lamin-examples](https://github.com/laminlabs/lamin-examples)." - ] - } - ], - "metadata": { - "citation-manager": { - "items": {} - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.16" - }, - "nbproject": { - "id": "eNef4Arw8nNM", - "parent": null, - "pypackage": null, - "time_init": "2023-06-05T13:33:30.647656+00:00", - "user_handle": "sunnyosun", - "user_id": "kmvZDIX9", - "user_name": "Sunny Sun", - "version": "0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/docs/index.md b/docs/index.md index 3068e22..60747c4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,6 +7,6 @@ :maxdepth: 1 :hidden: -biology/index +usecases/index changelog ``` diff --git a/docs/usecases/analyses.ipynb b/docs/usecases/analyses.ipynb new file mode 100644 index 0000000..3a1a092 --- /dev/null +++ b/docs/usecases/analyses.ipynb @@ -0,0 +1,1875 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Manage interactive analyses" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Capturing and documenting the origin and flow of biological data throughout its lifecycle is important as it enables the traceability and reliability of biological data & insights, verify experimental outcomes, meet stringent regulatory standards, and foster the reproducibility of scientific discoveries.\n", + "\n", + "While tracking data lineage is easier when it's governed by deterministic pipelines, it becomes hard when interactive human-driven analyses become relevant.\n", + "\n", + "This use case walks through how LaminDB helps with the latter by enabling to `ln.track()` data flow through notebooks & teams of analysts." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setup" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```{warning}\n", + "\n", + "Please ensure that you have created or loaded a LaminDB instance before running the remaining part of this notebook!\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "tags": [ + "hide-cell" + ] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ Closed instance: testuser1/docsbuild\n", + "💬 Creating schemas: core==0.39.0 bionty==0.27.1 \n", + "✅ Saved: User(id=DzTjkKse, handle=testuser1, email=testuser1@lamin.ai, name=Test User1, updated_at=2023-07-20 12:22:25)\n", + "✅ Saved: Storage(id=sCZDjqa4, root=/Users/falexwolf/repos/lamin-usecases/docs/usecases/analysis-usecase, type=local, updated_at=2023-07-20 12:22:25, created_by_id=DzTjkKse)\n", + "✅ Loaded instance: testuser1/analysis-usecase\n", + "💡 Did not register local instance on hub (if you want to, call `lamin register`)\n", + "\u001b[0m" + ] + } + ], + "source": [ + "# A lamindb instance containing Bionty schema (skip if you already loaded your instance)\n", + "!lamin init --storage ./analysis-usecase --schema bionty" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Import `lamindb` and `lnschema_bt` which enables us to connect [Bionty](https://github.com/laminlabs/bionty) with [LaminDB](https://github.com/laminlabs/lamindb). This enables us to map AnnData metadata annotations against ontologies and create SQL records within LaminDB to eventually make them queryable." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ Loaded instance: testuser1/analysis-usecase (lamindb 0.48a1)\n" + ] + } + ], + "source": [ + "import lamindb as ln\n", + "import lnschema_bionty as lb\n", + "\n", + "ln.settings.verbosity = 3 # show hints" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Track cell types, tissues and diseases" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's enable tracking of the current notebook as the transform of this file using {func}`docs:lamindb.track`:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💬 Notebook imports: lamindb==0.48a1 lnschema_bionty==0.26.1\n", + "✅ Saved: Transform(id=eNef4Arw8nNMQz, name=Manage interactive analyses, short_name=analyses, stem_id=eNef4Arw8nNM, version=0, type=notebook, updated_at=2023-07-20 12:22:34, created_by_id=DzTjkKse)\n", + "✅ Saved: Run(id=LK9kPTABS2XK7QTP9yxI, run_at=2023-07-20 12:22:34, transform_id=eNef4Arw8nNMQz, created_by_id=DzTjkKse)\n" + ] + } + ], + "source": [ + "ln.track()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We fetch an example dataset from LaminDB that has a few cell type, tissue and disease annotations:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "AnnData object with n_obs × n_vars = 40 × 100\n", + " obs: 'cell_type', 'cell_type_id', 'tissue', 'disease'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata = ln.dev.datasets.anndata_with_obs()\n", + "adata" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "tissue cell_type \n", + "brain my new cell type 10\n", + "heart hepatocyte 10\n", + "kidney T cell 10\n", + "liver hematopoietic stem cell 10\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata.obs[[\"tissue\", \"cell_type\"]].value_counts()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Register biological metadata and link to the dataset" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As a first step, we register the Anndata object with LaminDB using {func}`docs:lamindb.File` and {func}`docs:lamindb.save`:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💡 This is AnnDataLike, consider using File.from_anndata() to link var and obs.columns as features!\n", + "💡 File will be copied to storage upon `save()` using storage key = mini_anndata_with_obs.h5ad\n" + ] + } + ], + "source": [ + "file = ln.File(adata, key=\"mini_anndata_with_obs.h5ad\")" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💡 storing file NRV4p4OeEcqnMA0T3GC1 with key mini_anndata_with_obs.h5ad\n" + ] + } + ], + "source": [ + "file.save()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using {func}`docs:lamindb.parse` we can associate the cell types and tissues with the Ontology metadata:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💬 Created \u001b[1;95m3 CellType records from Bionty\u001b[0m that matched \u001b[1;95mname\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Created \u001b[1;93m1 CellType record\u001b[0m setting field \u001b[1;93mname\u001b[0m to: my new cell type\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "0536c6a46b3a42839c597bdfe0927754", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Output()" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n"
+      ],
+      "text/plain": []
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    },
+    {
+     "data": {
+      "text/html": [
+       "
\n",
+       "
\n" + ], + "text/plain": [ + "\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💬 Created \u001b[1;95m4 Tissue records from Bionty\u001b[0m that matched \u001b[1;95mname\u001b[0m field (bionty_source_id=gn26)\n" + ] + } + ], + "source": [ + "cell_types = lb.CellType.from_values(adata.obs.cell_type, lb.CellType.name)\n", + "tissues = lb.Tissue.from_values(adata.obs.tissue, lb.Tissue.name)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Register the cell types and tissues with LaminDB:" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "tags": [ + "hide-output" + ] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=J7hHC8SK, name=hepatocyte, ontology_id=CL:0000182, description=The Main Structural Component Of The Liver. They Are Specialized Epithelial Cells That Are Organized Into Interconnected Plates Called Lobules. Majority Of Cell Population Of Liver, Polygonal In Shape, Arranged In Plates Or Trabeculae Between Sinusoids; May Have Single Nucleus Or Binucleated., updated_at=2023-07-20 12:23:47, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m3 CellType records from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=P6E7yrc7, name=epithelial cell, ontology_id=CL:0000066, synonyms=epitheliocyte, description=A Cell That Is Usually Found In A Two-Dimensional Sheet With A Free Surface. The Cell Has A Cytoskeleton That Allows For Tight Cell To Cell Contact And For Cell Polarity Where Apical Part Is Directed Towards The Lumen And The Basal Part To The Basal Lamina., updated_at=2023-07-20 12:23:47, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=H0taCt24, name=animal cell, ontology_id=CL:0000548, synonyms=metazoan cell, description=A Native Cell That Is Part Of Some Metazoa., updated_at=2023-07-20 12:23:48, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "💬 Also saving parents of CellType(id=QMAH6IlS, name=somatic cell, ontology_id=CL:0002371, description=A Cell Of An Organism That Does Not Pass On Its Genetic Material To The Organism'S Offspring (I.E. A Non-Germ Line Cell)., updated_at=2023-07-20 12:23:47, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 CellType record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=VT73gpK2, name=native cell, ontology_id=CL:0000003, description=A Cell That Is Found In A Natural Setting, Which Includes Multicellular Organism Cells 'In Vivo' (I.E. Part Of An Organism), And Unicellular Organisms 'In Environment' (I.E. Part Of A Natural Environment)., updated_at=2023-07-20 12:23:49, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "💬 Also saving parents of CellType(id=AOy0Et6k, name=endopolyploid cell, ontology_id=CL:0000417, updated_at=2023-07-20 12:23:47, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=eqVIXZEb, name=polyploid cell, ontology_id=CL:0000412, description=A Cell Whose Nucleus, Or Nuclei, Each Contain More Than Two Haploid Genomes., updated_at=2023-07-20 12:23:50, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 CellType record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of CellType(id=BxNjby0x, name=T cell, ontology_id=CL:0000084, synonyms=T-cell|T lymphocyte|T-lymphocyte, description=A Type Of Lymphocyte Whose Defining Characteristic Is The Expression Of A T Cell Receptor Complex., updated_at=2023-07-20 12:23:47, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=g8slxY8X, name=lymphocyte, ontology_id=CL:0000542, description=A Lymphocyte Is A Leukocyte Commonly Found In The Blood And Lymph That Has The Characteristics Of A Large Nucleus, A Neutral Staining Cytoplasm, And Prominent Heterochromatin., updated_at=2023-07-20 12:23:51, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=MkrH0gsX, name=leukocyte, ontology_id=CL:0000738, synonyms=white blood cell|leucocyte, description=An Achromatic Cell Of The Myeloid Or Lymphoid Lineages Capable Of Ameboid Movement, Found In Blood Or Other Tissue., updated_at=2023-07-20 12:23:52, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=Q0aQr5JB, name=hematopoietic cell, ontology_id=CL:0000988, synonyms=hemopoietic cell|haemopoietic cell|haematopoietic cell, description=A Cell Of A Hematopoietic Lineage., updated_at=2023-07-20 12:23:52, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m2 CellType records\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of CellType(id=m91LZBDZ, name=hematopoietic stem cell, ontology_id=CL:0000037, synonyms=hemopoietic stem cell|HSC|blood forming stem cell, description=A Stem Cell From Which All Cells Of The Lymphoid And Myeloid Lineages Develop, Including Blood Cells And Cells Of The Immune System. Hematopoietic Stem Cells Lack Cell Markers Of Effector Cells (Lin-Negative). Lin-Negative Is Defined By Lacking One Or More Of The Following Cell Surface Markers: Cd2, Cd3 Epsilon, Cd4, Cd5 ,Cd8 Alpha Chain, Cd11B, Cd14, Cd19, Cd20, Cd56, Ly6G, Ter119., updated_at=2023-07-20 12:23:47, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 CellType record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Created \u001b[1;95m1 CellType record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=DWJA)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of CellType(id=0d3ym06W, name=hematopoietic precursor cell, ontology_id=CL:0008001, description=Any Hematopoietic Cell That Is A Precursor Of Some Other Hematopoietic Cell Type., updated_at=2023-07-20 12:23:53, bionty_source_id=DWJA, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 CellType record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=sm45H0wI, name=heart, ontology_id=UBERON:0000948, synonyms=chambered heart|vertebrate heart, description=A Myogenic Muscular Circulatory Organ Found In The Vertebrate Cardiovascular System Composed Of Chambers Of Cardiac Muscle. It Is The Primary Circulatory Organ., updated_at=2023-07-20 12:23:53, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m4 Tissue records from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=LB1DWmLh, name=structure with developmental contribution from neural crest, ontology_id=UBERON:0010314, description=An Anatomical Structure That Has Some Part That Develops From The Neural Crest., updated_at=2023-07-20 12:23:54, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=eEntTihh, name=anatomical structure, ontology_id=UBERON:0000061, synonyms=connected biological structure|biological structure, description=Material Anatomical Entity That Is A Single Connected Structure With Inherent 3D Shape Generated By Coordinated Expression Of The Organism'S Own Genome., updated_at=2023-07-20 12:23:54, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=OHTKq1WO, name=material anatomical entity, ontology_id=UBERON:0000465, description=Anatomical Entity That Has Mass., updated_at=2023-07-20 12:23:55, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "💬 Also saving parents of Tissue(id=w6ZLPLvC, name=mesoderm-derived structure, ontology_id=UBERON:0004120, synonyms=mesodermal derivative, description=An Anatomical Structure That Develops (Entirely Or Partially) From The Mesoderm., updated_at=2023-07-20 12:23:54, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=J3XUWZki, name=primary circulatory organ, ontology_id=UBERON:0007100, description=A Hollow, Muscular Organ, Which, By Contracting Rhythmically, Keeps Up The Circulation Of The Blood Or Analogs[Go,Modified]., updated_at=2023-07-20 12:23:54, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=zOsbXujj, name=circulatory organ, ontology_id=UBERON:0015228, synonyms=heart or heart like organ|cardiac pump, description=A Hollow, Muscular Organ, Which, By Contracting Rhythmically, Contributes To The Circulation Of Lymph, Blood Or Analogs. Examples: A Chambered Vertebrate Heart; The Tubular Peristaltic Heart Of Ascidians; The Dorsal Vessel Of An Insect; The Lymoh Heart Of A Reptile., updated_at=2023-07-20 12:23:56, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=U4ZCyAVk, name=compound organ, ontology_id=UBERON:0003103, description=Anatomical Structure That Has As Its Parts Two Or More Multi-Tissue Structures Of At Least Two Different Types And Which Through Specific Morphogenetic Processes Forms A Single Distinct Structural Unit Demarcated By Bona Fide Boundaries From Other Distinct Anatomical Structures Of Different Types., updated_at=2023-07-20 12:23:57, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=di8YhQRe, name=organ, ontology_id=UBERON:0000062, description=Anatomical Structure That Performs A Specific Function Or Group Of Functions [Wp]., updated_at=2023-07-20 12:23:58, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=hZ6puzQW, name=multicellular anatomical structure, ontology_id=UBERON:0010000, synonyms=multicellular structure, description=An Anatomical Structure That Has More Than One Cell As A Part., updated_at=2023-07-20 12:23:58, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=zURRkybM, name=thoracic segment organ, ontology_id=UBERON:0005181, description=An Organ That Part Of The Thoracic Segment Region. This Region Can Be Further Subdividied Chest And Thoracic Cavity Regions., updated_at=2023-07-20 12:23:54, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=50iJ6bqb, name=trunk region element, ontology_id=UBERON:0005177, synonyms=trunk organ, description=An Organ Or Element That Part Of The Trunk Region. The Trunk Region Can Be Further Subdividied Into Thoracic (Including Chest And Thoracic Cavity) And Abdominal (Including Abdomen And Pelbis) Regions., updated_at=2023-07-20 12:23:59, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=7HcGzG0l, name=brain, ontology_id=UBERON:0000955, description=The Brain Is The Center Of The Nervous System In All Vertebrate, And Most Invertebrate, Animals. Some Primitive Animals Such As Jellyfish And Starfish Have A Decentralized Nervous System Without A Brain, While Sponges Lack Any Nervous System At All. In Vertebrates, The Brain Is Located In The Head, Protected By The Skull And Close To The Primary Sensory Apparatus Of Vision, Hearing, Balance, Taste, And Smell[Wp]., updated_at=2023-07-20 12:23:53, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=jlJQD0PJ, name=ectoderm-derived structure, ontology_id=UBERON:0004121, synonyms=ectodermal deriviative, description=An Anatomical Structure That Develops (Entirely Or Partially) From The Ectoderm., updated_at=2023-07-20 12:24:00, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=j9lTWyWV, name=kidney, ontology_id=UBERON:0002113, description=A Paired Organ Of The Urinary Tract Which Has The Production Of Urine As Its Primary Function., updated_at=2023-07-20 12:23:53, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m3 Tissue records from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=tYS0lE58, name=abdomen element, ontology_id=UBERON:0005172, synonyms=abdomen organ, description=An Organ Or Element That Is In The Abdomen. Examples: Spleen, Intestine, Kidney, Abdominal Mammary Gland., updated_at=2023-07-20 12:24:00, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=0AGAYALK, name=abdominal segment element, ontology_id=UBERON:0005173, synonyms=abdominal segment organ, description=An Organ Or Element That Is Part Of The Adbominal Segment Of The Organism. This Region Can Be Further Subdivided Into The Abdominal Cavity And The Pelvic Region., updated_at=2023-07-20 12:24:01, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=2jIagj4G, name=lateral structure, ontology_id=UBERON:0015212, description=Any Structure That Is Placed On One Side Of The Left-Right Axis Of A Bilaterian., updated_at=2023-07-20 12:24:00, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=MvX8jjgg, name=cavitated compound organ, ontology_id=UBERON:0000489, synonyms=cavitated organ, description=Compound Organ That Contains One Or More Macroscopic Anatomical Spaces., updated_at=2023-07-20 12:24:00, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=HHKnN309, name=liver, ontology_id=UBERON:0002107, description=An Exocrine Gland Which Secretes Bile And Functions In Metabolism Of Protein And Carbohydrate And Fat, Synthesizes Substances Involved In The Clotting Of The Blood, Synthesizes Vitamin A, Detoxifies Poisonous Substances, Stores Glycogen, And Breaks Down Worn-Out Erythrocytes[Go]., updated_at=2023-07-20 12:23:53, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Created \u001b[1;95m3 Tissue records from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=hR0q0OYS, name=digestive system gland, ontology_id=UBERON:0006925, description=Any Gland That Is Part Of The Digestive System., updated_at=2023-07-20 12:24:02, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m2 Tissue records from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=7ltP8W0V, name=digestive system element, ontology_id=UBERON:0013765, synonyms=digestive organ|digestive system organ, description=Any Of The Organs Or Elements That Are Part Of The Digestive System. Examples: Tongue, Esophagus, Spleen, Crop, Lunge Feeding Organ, Tooth Elements., updated_at=2023-07-20 12:24:03, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=0E8LkWRv, name=endocrine gland, ontology_id=UBERON:0002368, synonyms=glandula endocrina|ductless gland, description=Endocrine Glands Are Glands Of The Endocrine System That Secrete Their Products Directly Into The Circulatory System Rather Than Through A Duct.[Wp, Modified]., updated_at=2023-07-20 12:24:03, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Created \u001b[1;95m1 Tissue record from Bionty\u001b[0m that matched \u001b[1;95montology_id\u001b[0m field (bionty_source_id=gn26)\n", + "🔶 Now recursing through parents: this only happens once, but is much slower than bulk saving\n", + "💬 Also saving parents of Tissue(id=dtyXkYk0, name=gland, ontology_id=UBERON:0002530, synonyms=glandular organ, description=An Organ That Functions As A Secretory Or Excretory Organ., updated_at=2023-07-20 12:24:03, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=7tbgH7aG, name=exocrine gland, ontology_id=UBERON:0002365, synonyms=glandula exocrina|ducted gland, description=A Gland That Secretes Products (Excluding Hormones And Other Chemical Messengers) Into Ducts (Duct Glands) Which Lead Directly Into The External Environment[Wp]. Typical Exocrine Glands Include Sweat Glands, Salivary Glands, Mammary Glands, Stomach, Liver, Pancreas., updated_at=2023-07-20 12:24:02, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n", + "💬 Also saving parents of Tissue(id=cGeITELg, name=endoderm-derived structure, ontology_id=UBERON:0004119, description=An Anatomical Structure That Develops (Entirely Or Partially) From The Endoderm., updated_at=2023-07-20 12:24:02, bionty_source_id=gn26, created_by_id=DzTjkKse)\n", + "💬 Loaded \u001b[1;92m1 Tissue record\u001b[0m that matched field \u001b[1;92montology_id\u001b[0m\n" + ] + } + ], + "source": [ + "ln.save(cell_types)\n", + "ln.save(tissues)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Associate the cell types and tissues with the {func}`docs:lamindb.File` object." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "file.cell_types.set(cell_types)\n", + "file.tissues.set(tissues)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "tags": [] + }, + "source": [ + "### Your vocabulary store" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Examine the currently available cell types and tissues:" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "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", + "
nameontology_idabbrsynonymsdescriptionbionty_source_idupdated_atcreated_by_id
id
J7hHC8SKhepatocyteCL:0000182NoneNoneThe Main Structural Component Of The Liver. Th...DWJA2023-07-20 14:23:47DzTjkKse
CbEpmr0Tmy new cell typeNoneNoneNoneNoneNone2023-07-20 14:23:47DzTjkKse
BxNjby0xT cellCL:0000084NoneT-cell|T lymphocyte|T-lymphocyteA Type Of Lymphocyte Whose Defining Characteri...DWJA2023-07-20 14:23:47DzTjkKse
m91LZBDZhematopoietic stem cellCL:0000037Nonehemopoietic stem cell|HSC|blood forming stem cellA Stem Cell From Which All Cells Of The Lympho...DWJA2023-07-20 14:23:47DzTjkKse
P6E7yrc7epithelial cellCL:0000066NoneepitheliocyteA Cell That Is Usually Found In A Two-Dimensio...DWJA2023-07-20 14:23:47DzTjkKse
QMAH6IlSsomatic cellCL:0002371NoneNoneA Cell Of An Organism That Does Not Pass On It...DWJA2023-07-20 14:23:47DzTjkKse
AOy0Et6kendopolyploid cellCL:0000417NoneNoneNoneDWJA2023-07-20 14:23:47DzTjkKse
H0taCt24animal cellCL:0000548Nonemetazoan cellA Native Cell That Is Part Of Some Metazoa.DWJA2023-07-20 14:23:48DzTjkKse
igNGxgJTeukaryotic cellCL:0000255NoneNoneNoneDWJA2023-07-20 14:23:49DzTjkKse
VT73gpK2native cellCL:0000003NoneNoneA Cell That Is Found In A Natural Setting, Whi...DWJA2023-07-20 14:23:49DzTjkKse
Ry0JGwSDcellCL:0000000NoneNoneA Material Entity Of Anatomical Origin (Part O...DWJA2023-07-20 14:23:50DzTjkKse
eqVIXZEbpolyploid cellCL:0000412NoneNoneA Cell Whose Nucleus, Or Nuclei, Each Contain ...DWJA2023-07-20 14:23:50DzTjkKse
g8slxY8XlymphocyteCL:0000542NoneNoneA Lymphocyte Is A Leukocyte Commonly Found In ...DWJA2023-07-20 14:23:51DzTjkKse
MkrH0gsXleukocyteCL:0000738Nonewhite blood cell|leucocyteAn Achromatic Cell Of The Myeloid Or Lymphoid ...DWJA2023-07-20 14:23:52DzTjkKse
Q0aQr5JBhematopoietic cellCL:0000988Nonehemopoietic cell|haemopoietic cell|haematopoie...A Cell Of A Hematopoietic Lineage.DWJA2023-07-20 14:23:52DzTjkKse
0d3ym06Whematopoietic precursor cellCL:0008001NoneNoneAny Hematopoietic Cell That Is A Precursor Of ...DWJA2023-07-20 14:23:53DzTjkKse
\n", + "
" + ], + "text/plain": [ + " name ontology_id abbr \\\n", + "id \n", + "J7hHC8SK hepatocyte CL:0000182 None \n", + "CbEpmr0T my new cell type None None \n", + "BxNjby0x T cell CL:0000084 None \n", + "m91LZBDZ hematopoietic stem cell CL:0000037 None \n", + "P6E7yrc7 epithelial cell CL:0000066 None \n", + "QMAH6IlS somatic cell CL:0002371 None \n", + "AOy0Et6k endopolyploid cell CL:0000417 None \n", + "H0taCt24 animal cell CL:0000548 None \n", + "igNGxgJT eukaryotic cell CL:0000255 None \n", + "VT73gpK2 native cell CL:0000003 None \n", + "Ry0JGwSD cell CL:0000000 None \n", + "eqVIXZEb polyploid cell CL:0000412 None \n", + "g8slxY8X lymphocyte CL:0000542 None \n", + "MkrH0gsX leukocyte CL:0000738 None \n", + "Q0aQr5JB hematopoietic cell CL:0000988 None \n", + "0d3ym06W hematopoietic precursor cell CL:0008001 None \n", + "\n", + " synonyms \\\n", + "id \n", + "J7hHC8SK None \n", + "CbEpmr0T None \n", + "BxNjby0x T-cell|T lymphocyte|T-lymphocyte \n", + "m91LZBDZ hemopoietic stem cell|HSC|blood forming stem cell \n", + "P6E7yrc7 epitheliocyte \n", + "QMAH6IlS None \n", + "AOy0Et6k None \n", + "H0taCt24 metazoan cell \n", + "igNGxgJT None \n", + "VT73gpK2 None \n", + "Ry0JGwSD None \n", + "eqVIXZEb None \n", + "g8slxY8X None \n", + "MkrH0gsX white blood cell|leucocyte \n", + "Q0aQr5JB hemopoietic cell|haemopoietic cell|haematopoie... \n", + "0d3ym06W None \n", + "\n", + " description bionty_source_id \\\n", + "id \n", + "J7hHC8SK The Main Structural Component Of The Liver. Th... DWJA \n", + "CbEpmr0T None None \n", + "BxNjby0x A Type Of Lymphocyte Whose Defining Characteri... DWJA \n", + "m91LZBDZ A Stem Cell From Which All Cells Of The Lympho... DWJA \n", + "P6E7yrc7 A Cell That Is Usually Found In A Two-Dimensio... DWJA \n", + "QMAH6IlS A Cell Of An Organism That Does Not Pass On It... DWJA \n", + "AOy0Et6k None DWJA \n", + "H0taCt24 A Native Cell That Is Part Of Some Metazoa. DWJA \n", + "igNGxgJT None DWJA \n", + "VT73gpK2 A Cell That Is Found In A Natural Setting, Whi... DWJA \n", + "Ry0JGwSD A Material Entity Of Anatomical Origin (Part O... DWJA \n", + "eqVIXZEb A Cell Whose Nucleus, Or Nuclei, Each Contain ... DWJA \n", + "g8slxY8X A Lymphocyte Is A Leukocyte Commonly Found In ... DWJA \n", + "MkrH0gsX An Achromatic Cell Of The Myeloid Or Lymphoid ... DWJA \n", + "Q0aQr5JB A Cell Of A Hematopoietic Lineage. DWJA \n", + "0d3ym06W Any Hematopoietic Cell That Is A Precursor Of ... DWJA \n", + "\n", + " updated_at created_by_id \n", + "id \n", + "J7hHC8SK 2023-07-20 14:23:47 DzTjkKse \n", + "CbEpmr0T 2023-07-20 14:23:47 DzTjkKse \n", + "BxNjby0x 2023-07-20 14:23:47 DzTjkKse \n", + "m91LZBDZ 2023-07-20 14:23:47 DzTjkKse \n", + "P6E7yrc7 2023-07-20 14:23:47 DzTjkKse \n", + "QMAH6IlS 2023-07-20 14:23:47 DzTjkKse \n", + "AOy0Et6k 2023-07-20 14:23:47 DzTjkKse \n", + "H0taCt24 2023-07-20 14:23:48 DzTjkKse \n", + "igNGxgJT 2023-07-20 14:23:49 DzTjkKse \n", + "VT73gpK2 2023-07-20 14:23:49 DzTjkKse \n", + "Ry0JGwSD 2023-07-20 14:23:50 DzTjkKse \n", + "eqVIXZEb 2023-07-20 14:23:50 DzTjkKse \n", + "g8slxY8X 2023-07-20 14:23:51 DzTjkKse \n", + "MkrH0gsX 2023-07-20 14:23:52 DzTjkKse \n", + "Q0aQr5JB 2023-07-20 14:23:52 DzTjkKse \n", + "0d3ym06W 2023-07-20 14:23:53 DzTjkKse " + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lb.CellType.select().df()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "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", + "
nameontology_idabbrsynonymsdescriptionbionty_source_idupdated_atcreated_by_id
id
sm45H0wIheartUBERON:0000948Nonechambered heart|vertebrate heartA Myogenic Muscular Circulatory Organ Found In...gn262023-07-20 14:23:53DzTjkKse
7HcGzG0lbrainUBERON:0000955NoneNoneThe Brain Is The Center Of The Nervous System ...gn262023-07-20 14:23:53DzTjkKse
j9lTWyWVkidneyUBERON:0002113NoneNoneA Paired Organ Of The Urinary Tract Which Has ...gn262023-07-20 14:23:53DzTjkKse
HHKnN309liverUBERON:0002107NoneNoneAn Exocrine Gland Which Secretes Bile And Func...gn262023-07-20 14:23:53DzTjkKse
LB1DWmLhstructure with developmental contribution from...UBERON:0010314NoneNoneAn Anatomical Structure That Has Some Part Tha...gn262023-07-20 14:23:54DzTjkKse
w6ZLPLvCmesoderm-derived structureUBERON:0004120Nonemesodermal derivativeAn Anatomical Structure That Develops (Entirel...gn262023-07-20 14:23:54DzTjkKse
J3XUWZkiprimary circulatory organUBERON:0007100NoneNoneA Hollow, Muscular Organ, Which, By Contractin...gn262023-07-20 14:23:54DzTjkKse
zURRkybMthoracic segment organUBERON:0005181NoneNoneAn Organ That Part Of The Thoracic Segment Reg...gn262023-07-20 14:23:54DzTjkKse
eEntTihhanatomical structureUBERON:0000061Noneconnected biological structure|biological stru...Material Anatomical Entity That Is A Single Co...gn262023-07-20 14:23:54DzTjkKse
OHTKq1WOmaterial anatomical entityUBERON:0000465NoneNoneAnatomical Entity That Has Mass.gn262023-07-20 14:23:55DzTjkKse
QqMceszwanatomical entityUBERON:0001062NoneNoneBiological Entity That Is Either An Individual...gn262023-07-20 14:23:56DzTjkKse
zOsbXujjcirculatory organUBERON:0015228Noneheart or heart like organ|cardiac pumpA Hollow, Muscular Organ, Which, By Contractin...gn262023-07-20 14:23:56DzTjkKse
U4ZCyAVkcompound organUBERON:0003103NoneNoneAnatomical Structure That Has As Its Parts Two...gn262023-07-20 14:23:57DzTjkKse
di8YhQReorganUBERON:0000062NoneNoneAnatomical Structure That Performs A Specific ...gn262023-07-20 14:23:58DzTjkKse
hZ6puzQWmulticellular anatomical structureUBERON:0010000Nonemulticellular structureAn Anatomical Structure That Has More Than One...gn262023-07-20 14:23:58DzTjkKse
50iJ6bqbtrunk region elementUBERON:0005177Nonetrunk organAn Organ Or Element That Part Of The Trunk Reg...gn262023-07-20 14:23:59DzTjkKse
jlJQD0PJectoderm-derived structureUBERON:0004121Noneectodermal deriviativeAn Anatomical Structure That Develops (Entirel...gn262023-07-20 14:24:00DzTjkKse
tYS0lE58abdomen elementUBERON:0005172Noneabdomen organAn Organ Or Element That Is In The Abdomen. Ex...gn262023-07-20 14:24:00DzTjkKse
2jIagj4Glateral structureUBERON:0015212NoneNoneAny Structure That Is Placed On One Side Of Th...gn262023-07-20 14:24:00DzTjkKse
MvX8jjggcavitated compound organUBERON:0000489Nonecavitated organCompound Organ That Contains One Or More Macro...gn262023-07-20 14:24:00DzTjkKse
0AGAYALKabdominal segment elementUBERON:0005173Noneabdominal segment organAn Organ Or Element That Is Part Of The Adbomi...gn262023-07-20 14:24:01DzTjkKse
hR0q0OYSdigestive system glandUBERON:0006925NoneNoneAny Gland That Is Part Of The Digestive System.gn262023-07-20 14:24:02DzTjkKse
7tbgH7aGexocrine glandUBERON:0002365Noneglandula exocrina|ducted glandA Gland That Secretes Products (Excluding Horm...gn262023-07-20 14:24:02DzTjkKse
cGeITELgendoderm-derived structureUBERON:0004119NoneNoneAn Anatomical Structure That Develops (Entirel...gn262023-07-20 14:24:02DzTjkKse
7ltP8W0Vdigestive system elementUBERON:0013765Nonedigestive organ|digestive system organAny Of The Organs Or Elements That Are Part Of...gn262023-07-20 14:24:03DzTjkKse
0E8LkWRvendocrine glandUBERON:0002368Noneglandula endocrina|ductless glandEndocrine Glands Are Glands Of The Endocrine S...gn262023-07-20 14:24:03DzTjkKse
dtyXkYk0glandUBERON:0002530Noneglandular organAn Organ That Functions As A Secretory Or Excr...gn262023-07-20 14:24:03DzTjkKse
\n", + "
" + ], + "text/plain": [ + " name ontology_id \\\n", + "id \n", + "sm45H0wI heart UBERON:0000948 \n", + "7HcGzG0l brain UBERON:0000955 \n", + "j9lTWyWV kidney UBERON:0002113 \n", + "HHKnN309 liver UBERON:0002107 \n", + "LB1DWmLh structure with developmental contribution from... UBERON:0010314 \n", + "w6ZLPLvC mesoderm-derived structure UBERON:0004120 \n", + "J3XUWZki primary circulatory organ UBERON:0007100 \n", + "zURRkybM thoracic segment organ UBERON:0005181 \n", + "eEntTihh anatomical structure UBERON:0000061 \n", + "OHTKq1WO material anatomical entity UBERON:0000465 \n", + "QqMceszw anatomical entity UBERON:0001062 \n", + "zOsbXujj circulatory organ UBERON:0015228 \n", + "U4ZCyAVk compound organ UBERON:0003103 \n", + "di8YhQRe organ UBERON:0000062 \n", + "hZ6puzQW multicellular anatomical structure UBERON:0010000 \n", + "50iJ6bqb trunk region element UBERON:0005177 \n", + "jlJQD0PJ ectoderm-derived structure UBERON:0004121 \n", + "tYS0lE58 abdomen element UBERON:0005172 \n", + "2jIagj4G lateral structure UBERON:0015212 \n", + "MvX8jjgg cavitated compound organ UBERON:0000489 \n", + "0AGAYALK abdominal segment element UBERON:0005173 \n", + "hR0q0OYS digestive system gland UBERON:0006925 \n", + "7tbgH7aG exocrine gland UBERON:0002365 \n", + "cGeITELg endoderm-derived structure UBERON:0004119 \n", + "7ltP8W0V digestive system element UBERON:0013765 \n", + "0E8LkWRv endocrine gland UBERON:0002368 \n", + "dtyXkYk0 gland UBERON:0002530 \n", + "\n", + " abbr synonyms \\\n", + "id \n", + "sm45H0wI None chambered heart|vertebrate heart \n", + "7HcGzG0l None None \n", + "j9lTWyWV None None \n", + "HHKnN309 None None \n", + "LB1DWmLh None None \n", + "w6ZLPLvC None mesodermal derivative \n", + "J3XUWZki None None \n", + "zURRkybM None None \n", + "eEntTihh None connected biological structure|biological stru... \n", + "OHTKq1WO None None \n", + "QqMceszw None None \n", + "zOsbXujj None heart or heart like organ|cardiac pump \n", + "U4ZCyAVk None None \n", + "di8YhQRe None None \n", + "hZ6puzQW None multicellular structure \n", + "50iJ6bqb None trunk organ \n", + "jlJQD0PJ None ectodermal deriviative \n", + "tYS0lE58 None abdomen organ \n", + "2jIagj4G None None \n", + "MvX8jjgg None cavitated organ \n", + "0AGAYALK None abdominal segment organ \n", + "hR0q0OYS None None \n", + "7tbgH7aG None glandula exocrina|ducted gland \n", + "cGeITELg None None \n", + "7ltP8W0V None digestive organ|digestive system organ \n", + "0E8LkWRv None glandula endocrina|ductless gland \n", + "dtyXkYk0 None glandular organ \n", + "\n", + " description bionty_source_id \\\n", + "id \n", + "sm45H0wI A Myogenic Muscular Circulatory Organ Found In... gn26 \n", + "7HcGzG0l The Brain Is The Center Of The Nervous System ... gn26 \n", + "j9lTWyWV A Paired Organ Of The Urinary Tract Which Has ... gn26 \n", + "HHKnN309 An Exocrine Gland Which Secretes Bile And Func... gn26 \n", + "LB1DWmLh An Anatomical Structure That Has Some Part Tha... gn26 \n", + "w6ZLPLvC An Anatomical Structure That Develops (Entirel... gn26 \n", + "J3XUWZki A Hollow, Muscular Organ, Which, By Contractin... gn26 \n", + "zURRkybM An Organ That Part Of The Thoracic Segment Reg... gn26 \n", + "eEntTihh Material Anatomical Entity That Is A Single Co... gn26 \n", + "OHTKq1WO Anatomical Entity That Has Mass. gn26 \n", + "QqMceszw Biological Entity That Is Either An Individual... gn26 \n", + "zOsbXujj A Hollow, Muscular Organ, Which, By Contractin... gn26 \n", + "U4ZCyAVk Anatomical Structure That Has As Its Parts Two... gn26 \n", + "di8YhQRe Anatomical Structure That Performs A Specific ... gn26 \n", + "hZ6puzQW An Anatomical Structure That Has More Than One... gn26 \n", + "50iJ6bqb An Organ Or Element That Part Of The Trunk Reg... gn26 \n", + "jlJQD0PJ An Anatomical Structure That Develops (Entirel... gn26 \n", + "tYS0lE58 An Organ Or Element That Is In The Abdomen. Ex... gn26 \n", + "2jIagj4G Any Structure That Is Placed On One Side Of Th... gn26 \n", + "MvX8jjgg Compound Organ That Contains One Or More Macro... gn26 \n", + "0AGAYALK An Organ Or Element That Is Part Of The Adbomi... gn26 \n", + "hR0q0OYS Any Gland That Is Part Of The Digestive System. gn26 \n", + "7tbgH7aG A Gland That Secretes Products (Excluding Horm... gn26 \n", + "cGeITELg An Anatomical Structure That Develops (Entirel... gn26 \n", + "7ltP8W0V Any Of The Organs Or Elements That Are Part Of... gn26 \n", + "0E8LkWRv Endocrine Glands Are Glands Of The Endocrine S... gn26 \n", + "dtyXkYk0 An Organ That Functions As A Secretory Or Excr... gn26 \n", + "\n", + " updated_at created_by_id \n", + "id \n", + "sm45H0wI 2023-07-20 14:23:53 DzTjkKse \n", + "7HcGzG0l 2023-07-20 14:23:53 DzTjkKse \n", + "j9lTWyWV 2023-07-20 14:23:53 DzTjkKse \n", + "HHKnN309 2023-07-20 14:23:53 DzTjkKse \n", + "LB1DWmLh 2023-07-20 14:23:54 DzTjkKse \n", + "w6ZLPLvC 2023-07-20 14:23:54 DzTjkKse \n", + "J3XUWZki 2023-07-20 14:23:54 DzTjkKse \n", + "zURRkybM 2023-07-20 14:23:54 DzTjkKse \n", + "eEntTihh 2023-07-20 14:23:54 DzTjkKse \n", + "OHTKq1WO 2023-07-20 14:23:55 DzTjkKse \n", + "QqMceszw 2023-07-20 14:23:56 DzTjkKse \n", + "zOsbXujj 2023-07-20 14:23:56 DzTjkKse \n", + "U4ZCyAVk 2023-07-20 14:23:57 DzTjkKse \n", + "di8YhQRe 2023-07-20 14:23:58 DzTjkKse \n", + "hZ6puzQW 2023-07-20 14:23:58 DzTjkKse \n", + "50iJ6bqb 2023-07-20 14:23:59 DzTjkKse \n", + "jlJQD0PJ 2023-07-20 14:24:00 DzTjkKse \n", + "tYS0lE58 2023-07-20 14:24:00 DzTjkKse \n", + "2jIagj4G 2023-07-20 14:24:00 DzTjkKse \n", + "MvX8jjgg 2023-07-20 14:24:00 DzTjkKse \n", + "0AGAYALK 2023-07-20 14:24:01 DzTjkKse \n", + "hR0q0OYS 2023-07-20 14:24:02 DzTjkKse \n", + "7tbgH7aG 2023-07-20 14:24:02 DzTjkKse \n", + "cGeITELg 2023-07-20 14:24:02 DzTjkKse \n", + "7ltP8W0V 2023-07-20 14:24:03 DzTjkKse \n", + "0E8LkWRv 2023-07-20 14:24:03 DzTjkKse \n", + "dtyXkYk0 2023-07-20 14:24:03 DzTjkKse " + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lb.Tissue.select().df()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": { + "tags": [] + }, + "source": [ + "## Processing of the dataset" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the following we will modify the AnnData object to demonstrate data lineage tracking with LaminDB." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To track our data transformation we create a new {func}`docs:lamindb.Transform` of type \"pipeline\":" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "transform = ln.Transform(\n", + " type=\"pipeline\", name=\"subset_to_T_cells_and_liver_lymphoma\", version=\"0.1.0\"\n", + ")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set the current tracking to the new transform using {func}`docs:lamindb.track`:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ Saved: Transform(id=5Q9bT40xl2aa9p, name=subset_to_T_cells_and_liver_lymphoma, stem_id=5Q9bT40xl2aa, version=0.1.0, type=pipeline, updated_at=2023-07-20 12:24:27, created_by_id=DzTjkKse)\n", + "✅ Saved: Run(id=8gjWqOb9c9bfKb7ojedf, run_at=2023-07-20 12:24:27, transform_id=5Q9bT40xl2aa9p, created_by_id=DzTjkKse)\n" + ] + } + ], + "source": [ + "ln.track(transform)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Get a cloud-backed AnnData object" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "file = ln.File.select(key=\"mini_anndata_with_obs.h5ad\").one()" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/falexwolf/miniconda3/envs/py39/lib/python3.9/site-packages/anndata/_core/anndata.py:1832: UserWarning: Variable names are not unique. To make them unique, call `.var_names_make_unique`.\n", + " utils.warn_names_duplicates(\"var\")\n" + ] + }, + { + "data": { + "text/plain": [ + "AnnData object with n_obs × n_vars = 40 × 100 backed at '/Users/falexwolf/repos/lamin-usecases/docs/usecases/analysis-usecase/mini_anndata_with_obs.h5ad'\n", + " obs: 'cell_type', 'cell_type_id', 'tissue', 'disease'" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata = file.backed(is_run_input=True)\n", + "adata" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cell_type disease \n", + "T cell chronic kidney disease 10\n", + "hematopoietic stem cell liver lymphoma 10\n", + "hepatocyte cardiac ventricle disorder 10\n", + "my new cell type Alzheimer disease 10\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata.obs[[\"cell_type\", \"disease\"]].value_counts()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Subset dataset to specific cell types and diseases" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the subset:" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "subset_obs = adata.obs.cell_type.isin([\"T cell\", \"hematopoietic stem cell\"]) & (\n", + " adata.obs.disease.isin([\"liver lymphoma\", \"chronic kidney disease\"])\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "View of AnnData object with n_obs × n_vars = 20 × 100 backed at '/Users/falexwolf/repos/lamin-usecases/docs/usecases/analysis-usecase/mini_anndata_with_obs.h5ad'\n", + " obs: 'cell_type', 'cell_type_id', 'tissue', 'disease'" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata_subset = adata[subset_obs]\n", + "adata_subset" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cell_type disease \n", + "T cell chronic kidney disease 10\n", + "hematopoietic stem cell liver lymphoma 10\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "adata_subset.obs[[\"cell_type\", \"disease\"]].value_counts()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Add the subset `AnnData` to LaminDB" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This subset can now be registered with LaminDB." + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/falexwolf/miniconda3/envs/py39/lib/python3.9/site-packages/anndata/_core/anndata.py:1832: UserWarning: Variable names are not unique. To make them unique, call `.var_names_make_unique`.\n", + " utils.warn_names_duplicates(\"var\")\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💡 This is AnnDataLike, consider using File.from_anndata() to link var and obs.columns as features!\n", + "💡 File will be copied to storage upon `save()` using storage key = subset/mini_anndata_with_obs.h5ad\n" + ] + } + ], + "source": [ + "file_subset = ln.File(adata_subset.to_memory(), key=\"subset/mini_anndata_with_obs.h5ad\")" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💡 storing file tl8ehtsEjukp4Ub4UaYR with key subset/mini_anndata_with_obs.h5ad\n" + ] + } + ], + "source": [ + "file_subset.save()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Link the subsetted file to cell types:" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💬 Loaded \u001b[1;92m2 CellType records\u001b[0m that matched field \u001b[1;92mname\u001b[0m\n" + ] + } + ], + "source": [ + "cell_types = lb.CellType.from_values(adata_subset.obs.cell_type, lb.CellType.name)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "file_subset.cell_types.set(cell_types)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Examining data lineage" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Common questions that might arise are:\n", + "\n", + "- Which h5ad file is in the `subset` subfolder?\n", + "- Which notebook ingested this file?\n", + "- By whom?\n", + "- And which file is its parent?\n", + "\n", + "Let's answer this using LaminDB:" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Query a subsetted `.h5ad` file containing \"hematopoietic stem cell\" and \"T cell\" to learn which h5ad file is in the `subset` subfolder:" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "cell_types_bt_lookup = lb.CellType.lookup()" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [], + "source": [ + "le_subset = ln.File.select(\n", + " suffix=\".h5ad\",\n", + " key__startswith=\"subset\",\n", + " cell_types__in=[\n", + " cell_types_bt_lookup.hematopoietic_stem_cell,\n", + " cell_types_bt_lookup.t_cell,\n", + " ],\n", + ").first()" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "File(id=tl8ehtsEjukp4Ub4UaYR, key=subset/mini_anndata_with_obs.h5ad, suffix=.h5ad, size=38992, hash=WIdz5wyaAbZXAEIK-tWMsA, hash_type=md5, updated_at=2023-07-20 12:24:51, storage_id=sCZDjqa4, transform_id=5Q9bT40xl2aa9p, run_id=8gjWqOb9c9bfKb7ojedf, created_by_id=DzTjkKse)" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "le_subset" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "NRV4p4OeEcqnMA0T3GC1\n", + "\n", + "\n", + "\n", + "NRV4p4OeEcqnMA0T3GC1\n", + "\n", + "mini_anndata_with_obs.h5ad\n", + "id=NRV4p4OeEcqnMA0T3GC1\n", + "\n", + "\n", + "\n", + "8gjWqOb9c9bfKb7ojedf\n", + "\n", + "subset_to_T_cells_and_liver_lymphoma   \n", + "id=8gjWqOb9c9bfKb7ojedf\n", + "\n", + "\n", + "\n", + "NRV4p4OeEcqnMA0T3GC1->8gjWqOb9c9bfKb7ojedf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "tl8ehtsEjukp4Ub4UaYR\n", + "\n", + "subset/mini_anndata_with_obs.h5ad\n", + "id=tl8ehtsEjukp4Ub4UaYR\n", + "\n", + "\n", + "\n", + "8gjWqOb9c9bfKb7ojedf->tl8ehtsEjukp4Ub4UaYR\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "LK9kPTABS2XK7QTP9yxI\n", + "\n", + "Manage interactive analyses   \n", + "id=LK9kPTABS2XK7QTP9yxI\n", + "\n", + "\n", + "\n", + "LK9kPTABS2XK7QTP9yxI->NRV4p4OeEcqnMA0T3GC1\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "file.view_lineage()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Which notebook ingested this file?" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Transform(id=5Q9bT40xl2aa9p, name=subset_to_T_cells_and_liver_lymphoma, stem_id=5Q9bT40xl2aa, version=0.1.0, type=pipeline, updated_at=2023-07-20 12:24:51, created_by_id=DzTjkKse)" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "file_subset.transform" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Who ingested this file?" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "User(id=DzTjkKse, handle=testuser1, email=testuser1@lamin.ai, name=Test User1, updated_at=2023-07-20 12:22:25)" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "file_subset.created_by" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "What are the parent files?" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['mini_anndata_with_obs.h5ad']" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "file_subset.run.inputs.list(\"key\")" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "💬 Deleting instance testuser1/analysis-usecase\n", + "💬 deleted instance settings file: /Users/falexwolf/.lamin/instance--testuser1--analysis-usecase.env\n", + "✅ Closed instance: testuser1/analysis-usecase\n", + "💬 instance cache deleted\n", + "💬 deleted '.lndb' sqlite file\n", + "💬 manually delete your stored data: /Users/falexwolf/repos/lamin-usecases/docs/usecases/analysis-usecase\n" + ] + } + ], + "source": [ + "!lamin delete analysis-usecase\n", + "!rm -r ./analysis-usecase" + ] + } + ], + "metadata": { + "citation-manager": { + "items": {} + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + }, + "nbproject": { + "id": "eNef4Arw8nNM", + "parent": null, + "pypackage": null, + "time_init": "2023-06-05T13:33:30.647656+00:00", + "user_handle": "sunnyosun", + "user_id": "kmvZDIX9", + "user_name": "Sunny Sun", + "version": "0" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/docs/biology/celltypist.ipynb b/docs/usecases/celltypist.ipynb similarity index 99% rename from docs/biology/celltypist.ipynb rename to docs/usecases/celltypist.ipynb index aafbbb0..05dd44f 100644 --- a/docs/biology/celltypist.ipynb +++ b/docs/usecases/celltypist.ipynb @@ -818,7 +818,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we can track the file and search for it for example by querying for a specific cell type." + "Now we can track the file and search for it for usecase by querying for a specific cell type." ] }, { @@ -860,7 +860,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook is available at [https://github.com/laminlabs/lamin-examples](https://github.com/laminlabs/lamin-examples)." + "This notebook is available at [https://github.com/laminlabs/lamin-usecases](https://github.com/laminlabs/lamin-usecases)." ] }, { diff --git a/docs/biology/enrichr.ipynb b/docs/usecases/enrichr.ipynb similarity index 98% rename from docs/biology/enrichr.ipynb rename to docs/usecases/enrichr.ipynb index 327f462..3a32d3d 100644 --- a/docs/biology/enrichr.ipynb +++ b/docs/usecases/enrichr.ipynb @@ -88,7 +88,7 @@ "import scanpy as sc\n", "import matplotlib.pyplot as plt\n", "\n", - "from lamin_examples import datasets as ds\n", + "from lamin_usecases import datasets as ds\n", "\n", "ln.settings.verbosity = 3 # show hints" ] @@ -426,7 +426,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This analysis is based on: https://gseapy.readthedocs.io/en/master/singlecell_example.html" + "This analysis is based on: https://gseapy.readthedocs.io/en/master/singlecell_usecase.html" ] }, { @@ -813,7 +813,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Registering pathways and associated gene sets is made simple with {func}`docs:lamindb.parse` that ensures that all parsed objects are linked to ontology IDs.Linking both sets is possible with {func}`docs:lamindb.Featureset` to facilitate simple querying for datasets that contain specific pathways. Since the pathways are linked to genes, Lamin also enables fetching the associated genes of a registered pathway to, for example, retrieve sets of differentially expressed genes that are a part of a specific pathway." + "Registering pathways and associated gene sets is made simple with {func}`docs:lamindb.parse` that ensures that all parsed objects are linked to ontology IDs.Linking both sets is possible with {func}`docs:lamindb.Featureset` to facilitate simple querying for datasets that contain specific pathways. Since the pathways are linked to genes, Lamin also enables fetching the associated genes of a registered pathway to, for usecase, retrieve sets of differentially expressed genes that are a part of a specific pathway." ] }, { @@ -829,7 +829,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook is available at [https://github.com/laminlabs/lamin-examples](https://github.com/laminlabs/lamin-examples)." + "This notebook is available at [https://github.com/laminlabs/lamin-usecases](https://github.com/laminlabs/lamin-usecases)." ] } ], diff --git a/docs/usecases/index.md b/docs/usecases/index.md new file mode 100644 index 0000000..6ee6d07 --- /dev/null +++ b/docs/usecases/index.md @@ -0,0 +1,8 @@ +# Use cases + +```{toctree} +:maxdepth: 1 + +registries +analyses +``` diff --git a/docs/biology/index.md b/docs/usecases/registries.md similarity index 62% rename from docs/biology/index.md rename to docs/usecases/registries.md index c24311d..e8c3c40 100644 --- a/docs/biology/index.md +++ b/docs/usecases/registries.md @@ -1,9 +1,8 @@ -# Biology +# Manage biological registries ```{toctree} :maxdepth: 1 celltypist enrichr -lineage ``` diff --git a/lamin-project.yaml b/lamin-project.yaml index 280e5a8..6b91ef1 100644 --- a/lamin-project.yaml +++ b/lamin-project.yaml @@ -1,5 +1,5 @@ -project_name: lamin-examples +project_name: lamin-usecases description: Examples built using Lamin -project_slug: lamin-examples -repository_name: lamin-examples -package_name: lamin_examples +project_slug: lamin-usecases +repository_name: lamin-usecases +package_name: lamin_usecases diff --git a/lamin_examples/__init__.py b/lamin_usecases/__init__.py similarity index 86% rename from lamin_examples/__init__.py rename to lamin_usecases/__init__.py index 3895ac2..f9d64ce 100644 --- a/lamin_examples/__init__.py +++ b/lamin_usecases/__init__.py @@ -2,7 +2,7 @@ Import the package:: - import lamin_examples + import lamin_usecases """ diff --git a/lamin_examples/_datasets.py b/lamin_usecases/_datasets.py similarity index 100% rename from lamin_examples/_datasets.py rename to lamin_usecases/_datasets.py diff --git a/pyproject.toml b/pyproject.toml index 130e669..ac0350b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["flit_core >=3.2,<4"] build-backend = "flit_core.buildapi" [project] -name = "lamin_examples" +name = "lamin_usecases" authors = [{name = "Lamin Labs", email = "laminlabs@gmail.com"}] readme = "README.md" dynamic = ["version", "description"] @@ -14,7 +14,7 @@ dependencies = [ ] [project.urls] -Home = "https://github.com/laminlabs/lamin-examples" +Home = "https://github.com/laminlabs/lamin-usecases" [project.optional-dependencies] dev = [ @@ -35,5 +35,5 @@ testpaths = [ [tool.coverage.run] omit = [ - "lamin_examples/*", + "lamin_usecases/*", ]