Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multimodal review #52

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 52 additions & 28 deletions docs/multimodal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@
"# Validate & register multi-modal data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Background"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"scRNA data has moved beyond just RNA and can also include the measurements of other modalities such as chromatin accessibility, surface proteins or adaptive immune receptors.\n",
"ECCITE-seq is designed to enable interrogation of single-cell transcriptomes together with surface protein markers in the context of CRISPR screens.\n",
"\n",
"Here, we'll showcase how to curate and register ECCITE-seq data from [Papalexi21](https://www.nature.com/articles/s41592-019-0392-0) in the form of [MuData](https://github.com/scverse/mudata) objects."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -55,7 +79,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## MuData object"
"## Papalexi21"
]
},
{
Expand All @@ -65,6 +89,13 @@
"Let's use a MuData object:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Transform ![](https://img.shields.io/badge/Transform-10b981)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -75,16 +106,16 @@
},
"outputs": [],
"source": [
"mdata = ln.dev.datasets.mudata_papalexi21_subset()"
"mdata = ln.dev.datasets.mudata_papalexi21_subset()\n",
"mdata"
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"mdata"
"MuData objects build on top of AnnData objects to store and serialize multimodal data.\n",
"More information can be found on the [MuData documentation](https://mudata.readthedocs.io/en/latest/)."
]
},
{
Expand All @@ -110,31 +141,24 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Register features"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let's register the 3 feature sets this data contains:\n",
"1. rna\n",
"2. adt\n",
"Now let's validate and register the 3 feature sets this data contains:\n",
"1. RNA (gene expression)\n",
"2. ADT (antibody derived tags reflecting surface proteins)\n",
"3. obs (metadata)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### modalities"
"For the two modalities rna and adt, we use bionty tables as the reference:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For the two modalities rna and adt, we use bionty tables as the reference:"
"### Validate ![](https://img.shields.io/badge/Validate-10b981)"
]
},
{
Expand Down Expand Up @@ -253,6 +277,13 @@
"lb.CellMarker.validate(mdata[\"adt\"].var_names, field=lb.CellMarker.name);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Register ![](https://img.shields.io/badge/Register-10b981) "
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -281,13 +312,6 @@
"file.features.add_feature_set(feature_set_adt, slot=\"adt\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### metadata"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -440,7 +464,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "py39",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -454,7 +478,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.10.12"
},
"nbproject": {
"id": "yMWSFirS6qv2",
Expand All @@ -468,5 +492,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}