Skip to content

Commit

Permalink
update heading anchors in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
vitkl committed May 18, 2022
1 parent 7b72e41 commit 110543c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions docs/notebooks/cell2location_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@
"\n",
"\n",
"## Contents\n",
"* [Loading packages](#Loading_packages)\n",
"* [Loading Visium and single cell data data](#Loading_Visium)\n",
"1. [Estimating cell type signatures (NB regression)](#Estimating_signatures)\n",
"2. [Cell2location: spatial mapping](#cell2location)\n",
"3. [Visualising cell abundance in spatial coordinates](#Visualising)\n",
"4. [Downstream analysis](#downstream)\n",
"* [Leiden clustering of cell abundance](#region_clustering)\n",
"* [Identifying cellular compartments / tissue zones using matrix factorisation (NMF)](#NMF)\n",
"5. [Advanced use](#advanced)\n",
"* [Estimate cell-type specific expression of every gene in the spatial data](#per_cell_type_expression)\n",
"* [Working with the posterior distribution and computing arbitrary quantiles](#posterior_summary)"
"* [Loading packages](#Loading-packages)\n",
"* [Loading Visium and single cell data data](#Loading-Visium-and-scRNA-seq-reference-data)\n",
"1. [Estimating cell type signatures (NB regression)](#Estimation-of-reference-cell-type-signatures-(NB-regression))\n",
"2. [Cell2location: spatial mapping](#Cell2location:-spatial-mapping)\n",
"3. [Visualising cell abundance in spatial coordinates](#Visualising-cell-abundance-in-spatial-coordinates)\n",
"4. [Downstream analysis](#Downstream-analysis)\n",
"* [Leiden clustering of cell abundance](#Identifying-discrete-tissue-regions-by-Leiden-clustering)\n",
"* [Identifying cellular compartments / tissue zones using matrix factorisation (NMF)](#Identifying-cellular-compartments-/-tissue-zones-using-matrix-factorisation-(NMF))\n",
"* [Estimate cell-type specific expression of every gene in the spatial data (needed for NCEM)](#Estimate-cell-type-specific-expression-of-every-gene-in-the-spatial-data-(needed-for-NCEM))\n",
"5. [Advanced use](#Advanced-use)\n",
"* [Working with the posterior distribution and computing arbitrary quantiles](#Working-with-the-posterior-distribution-and-computing-arbitrary-quantiles)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Loading packages <a class=\"anchor\" id=\"Loading_packages\"></a>"
"## Loading packages <a class=\"anchor\" id=\"Loading-packages\"></a>"
]
},
{
Expand Down Expand Up @@ -126,7 +126,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Loading Visium and scRNA-seq reference data <a class=\"anchor\" id=\"Loading_Visium\"></a>"
"## Loading Visium and scRNA-seq reference data <a class=\"anchor\" id=\"Loading-Visium-and-scRNA-seq-reference-data\"></a>"
]
},
{
Expand Down Expand Up @@ -300,7 +300,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Estimation of reference cell type signatures (NB regression) <a class=\"anchor\" id=\"Estimating_signatures\"></a>\n",
"## Estimation of reference cell type signatures (NB regression) <a class=\"anchor\" id=\"Estimation-of-reference-cell-type-signatures-(NB-regression)\"></a>\n",
"\n",
"The signatures are estimated from scRNA-seq data, accounting for batch effect, using a Negative binomial regression model.\n",
"\n",
Expand Down Expand Up @@ -990,7 +990,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cell2location: spatial mapping <a class=\"anchor\" id=\"cell2location\"></a>\n",
"## Cell2location: spatial mapping <a class=\"anchor\" id=\"Cell2location:-spatial-mapping\"></a>\n",
"\n",
"<div class=\"alert alert-block alert-message\">\n",
"<b>Find shared genes and prepare anndata.</b>\n",
Expand Down Expand Up @@ -1418,7 +1418,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Visualising cell abundance in spatial coordinates <a class=\"anchor\" id=\"Visualising\"></a>\n",
"## Visualising cell abundance in spatial coordinates <a class=\"anchor\" id=\"Visualising-cell-abundance-in-spatial-coordinates\"></a>\n",
"\n",
"<div class=\"alert alert-info\">\n",
"Note\n",
Expand Down Expand Up @@ -1517,9 +1517,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Downstream analysis <a class=\"anchor\" id=\"downstream\"></a>\n",
"## Downstream analysis <a class=\"anchor\" id=\"Downstream-analysis\"></a>\n",
"\n",
"### Identifying discrete tissue regions by Leiden clustering<a class=\"anchor\" id=\"region_clustering\"></a>\n",
"### Identifying discrete tissue regions by Leiden clustering<a class=\"anchor\" id=\"Identifying-discrete-tissue-regions-by-Leiden-clustering\"></a>\n",
"\n",
"We identify tissue regions that differ in their cell composition by clustering locations using cell abundance estimated by cell2location. \n",
"\n",
Expand Down Expand Up @@ -1623,7 +1623,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Identifying cellular compartments / tissue zones using matrix factorisation (NMF) <a name=\"NMF\"></a>\n",
"### Identifying cellular compartments / tissue zones using matrix factorisation (NMF) <a name=\"Identifying-cellular-compartments-/-tissue-zones-using-matrix-factorisation-(NMF)\"></a>\n",
"\n",
"Here, we use the cell2location mapping results to identify the spatial co-occurrence of cell types in order to better understand the tissue organisation and predict cellular interactions. We performed non-negative matrix factorization (NMF) of the cell type abundance estimates from cell2location ([paper section 4, Fig 4D](https://www.nature.com/articles/s41587-021-01139-4)). Similar to the established benefits of applying NMF to conventional scRNA-seq, the additive NMF decomposition yielded a grouping of spatial cell type abundance profiles into components that capture co-localised cell types ([Supplemenary Methods section 4.2, p. 60](https://www.nature.com/articles/s41587-021-01139-4#Sec50)). This NMF-based decomposition naturally accounts for the fact that multiple cell types and microenvironments can co-exist at the same Visium locations (see [paper Fig S20, p. 34](https://www.nature.com/articles/s41587-021-01139-4#Sec50)), while sharing information across tissue areas (e.g. individual germinal centres). \n",
"\n",
Expand Down Expand Up @@ -1762,7 +1762,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Estimate cell-type specific expression of every gene in the spatial data (needed for NCEM) <a name=\"per_cell_type_expression\"></a>\n",
"### Estimate cell-type specific expression of every gene in the spatial data (needed for NCEM) <a name=\"Estimate-cell-type-specific-expression-of-every-gene-in-the-spatial-data-(needed-for-NCEM)\"></a>\n",
"\n",
"The cell-type specific expression of every gene at every spatial location in the spatial data enables learning cell communication with NCEM model using Visium data (https://github.com/theislab/ncem). \n",
"\n",
Expand Down Expand Up @@ -1865,7 +1865,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Working with the posterior distribution and computing arbitrary quantiles <a name=\"posterior_summary\"></a>\n",
"### Working with the posterior distribution and computing arbitrary quantiles <a name=\"Working-with-the-posterior-distribution-and-computing-arbitrary-quantiles\"></a>\n",
"\n",
"In addition to the posterior distribution mean, std and quantiles presented earlier in the notebook you can fetch an arbitrary number of samples from the posterior distribution. To limit memory use, it could be beneficial to select particular varibles in the model. \n",
"\n",
Expand Down Expand Up @@ -1943,7 +1943,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Modules and their versions used for this analysis\n",
"### Modules and their versions used for this analysis\n",
"\n",
"\n",
"Useful for debugging and reporting issues."
Expand Down

0 comments on commit 110543c

Please sign in to comment.