Skip to content

Commit

Permalink
Doc overhaul (#2220)
Browse files Browse the repository at this point in the history
* Update conf.py

* add req

* add override path

* Create override.css

* add pygments, remove scvi-tools colors

* add myst extensions

* remove github edit links

* move css

* add sphinx design, opengraph

* move contributors out of index

* show source

* add submodule

* add submodule

* temp old tutorials rename

* remove github links

* remove github url from template

* disable warning fail

* disable warning fail

* nbsphinx

* fix headings

* rtd use submodule

* add viewcode

* more headings fixes

* tutorials index

* add nbsphinx ext

* remove sphinx pygments

* fix colab link

* add ipython as docs req

* no signatures in tables

* make ci happy

* add sphinx design cards

* break up api

* fix icons

* link to new api index in card

* update colors

* no latest release in index

* release notes

* colors

* color typo

* back to default colors

* Update override.css

* add module

* move external

* Make border color override work

* grid

* hoverxref and linkcode

* fix grid

* comment

* grid spacing

* intersphinx hoverxref

* extlinks

* extlinks

* fix contributors

* fix tutorials to use old page

* hidden toc tree

* toctree for tutorials hidden

* clean up conf

* fix extlinks

* tutorial extlink

* add leiden to docs build

* buttons

* small role

* try rst badge

* extlinks

* fix image link

* Update docs/conf.py

* update submodule

* remove hoverxref

* warning code

* add how to update submodule

* remove unnecessary css

* remove more scanpydoc

* tutorials link

* switch to sphinx book

* pre commit'

* update reqs

* logo only

* deps

* linkcode

* linkcode

* exclude patterns

* sidebar levels

* remove external tools

* fix external

---------

Co-authored-by: Philipp A <flying-sheep@web.de>
  • Loading branch information
adamgayoso and flying-sheep committed Feb 15, 2023
1 parent 619bd77 commit 2b28b57
Show file tree
Hide file tree
Showing 39 changed files with 1,036 additions and 882 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "docs/tutorials"]
path = docs/tutorials
url = https://github.com/scverse/scanpy-tutorials.git
4 changes: 4 additions & 0 deletions .readthedocs.yml
Expand Up @@ -11,3 +11,7 @@ python:
path: .
extra_requirements:
- doc
- leiden
submodules:
include:
- "docs/tutorials"
13 changes: 0 additions & 13 deletions docs/_key_contributors.rst

This file was deleted.

20 changes: 20 additions & 0 deletions docs/_static/css/override.css
@@ -0,0 +1,20 @@
/* for the sphinx design cards */
body {
--sd-color-shadow: dimgrey;
}

dl.citation>dt {
float: left;
margin-right: 15px;
font-weight: bold;
}

/* for custom small role */
.small {
font-size: 40% !important
}

.smaller,
.pr {
font-size: 70% !important
}
5 changes: 0 additions & 5 deletions docs/_templates/autosummary/base.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/_templates/autosummary/class.rst
@@ -1,5 +1,3 @@
:github_url: {{ fullname | github_url }}

{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}
Expand Down
30 changes: 22 additions & 8 deletions docs/tutorials.md → docs/_tutorials.md
Expand Up @@ -2,7 +2,7 @@

## Clustering

For getting started, we recommend Scanpy’s reimplementation {tutorial}`pbmc3k`
For getting started, we recommend Scanpy’s reimplementation {doc}`/tutorials/pbmc3k`
of Seurat’s [^cite_satija15] clustering tutorial for 3k PBMCs from 10x Genomics,
containing preprocessing, clustering and the identification of cell types via
known marker genes.
Expand All @@ -29,15 +29,15 @@ known marker genes.

## Visualization

This tutorial shows how to visually explore genes using scanpy. {tutorial}`plotting/core`
This tutorial shows how to visually explore genes using scanpy. {doc}`/tutorials/plotting/core`

```{image} _static/img/stacked_violin_dotplot_matrixplot.png
:width: 550px
```

## Trajectory inference

Get started with the following example for hematopoiesis for data of [^cite_paul15]: {tutorial}`paga-paul15`
Get started with the following example for hematopoiesis for data of [^cite_paul15]: {doc}`/tutorials/paga-paul15`

```{image} _static/img/tutorials/paga_paul15.png
:width: 450px
Expand All @@ -56,16 +56,16 @@ for two hematopoiesis datasets: [DPT example 1] [^cite_paul15] and [DPT example

## Integrating datasets

Map labels and embeddings of reference data to new data: {tutorial}`integrating-data-using-ingest`
Map labels and embeddings of reference data to new data: {doc}`/tutorials/integrating-data-using-ingest`

```{image} https://scanpy-tutorials.readthedocs.io/en/latest/_images/integrating-data-using-ingest_21_0.png
:width: 350px
```

## Spatial data

- Basic analysis of spatial data: {tutorial}`spatial/basic-analysis`
- Integrating spatial data with scRNA-seq using scanorama: {tutorial}`spatial/integration-scanorama`
- Basic analysis of spatial data: {doc}`/tutorials/spatial/basic-analysis`
- Integrating spatial data with scRNA-seq using scanorama: {doc}`/tutorials/spatial/integration-scanorama`

```{image} _static/img/spatial-basic-analysis.png
:width: 250px
Expand All @@ -77,7 +77,7 @@ Map labels and embeddings of reference data to new data: {tutorial}`integrating-

### Conversion: AnnData, SingleCellExperiment, and Seurat objects

```{image} https://github.com/scverse/scanpy-in-R/raw/master/logo.png
```{image} https://github.com/theislab/scanpy-in-R/raw/master/logo.png
:align: right
:width: 200px
```
Expand All @@ -96,7 +96,7 @@ See the [cell cycle] notebook.

### Normalization with Pearson Residuals

Normalization of scRNA-seq data with Pearson Residuals, from [^cite_lause21]: {tutorial}`tutorial_pearson_residuals`
Normalization of scRNA-seq data with Pearson Residuals, from [^cite_lause21]: {doc}`/tutorials/tutorial_pearson_residuals`

### Scaling Computations

Expand Down Expand Up @@ -138,3 +138,17 @@ See pseudotime-time inference on deep-learning based features for [cell cycle re
[scanpy in r]: https://theislab.github.io/scanpy-in-R/
[seurat to anndata]: https://github.com/LuckyMD/Code_snippets/blob/master/Seurat_to_anndata.ipynb
[toggleswitch]: https://nbviewer.jupyter.org/github/scverse/scanpy_usage/blob/master/170430_krumsiek11/toggleswitch.ipynb


```{toctree}
:hidden: true
:maxdepth: 1
tutorials/pbmc3k
tutorials/paga-paul15
tutorials/plotting/core
tutorials/integrating-data-using-ingest
tutorials/spatial/basic-analysis
tutorials/spatial/integration-scanorama
tutorials/tutorial_pearson_residuals
```

0 comments on commit 2b28b57

Please sign in to comment.