Skip to content

Commit a15112e

Browse files
Backport PR #4100 on branch 1.12.x (docs: Highlight RSC & cleanup documentation) (#4104)
Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net>
1 parent 0dfbda1 commit a15112e

11 files changed

Lines changed: 38 additions & 223 deletions

File tree

docs/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import scanpy as sc
77
```
88

99
```{note}
10-
Additional functionality is available in the broader {doc}`ecosystem <../ecosystem>`, with some tools being wrapped in the {mod}`scanpy.external` module.
10+
Additional functionality is available across the broader [scverse ecosystem](https://scverse.org/packages/#ecosystem), with some tools wrapped in the {mod}`scanpy.external` module.
1111
```
1212

1313
(array-support)=

docs/community.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Community
22

3-
Scanpy is a community driven project. There are multiple channels for users and developers to communicate and connect.
3+
Scanpy is a community driven project embedded in the [scverse consortium](https://scverse.org).
4+
There are multiple channels for users and developers to communicate and connect.
45

56
## [Discourse](https://discourse.scverse.org)
67

7-
The scverse Discourse forum is place to go to ask usage questions and for longer form discussions around the project.
8+
The scverse Discourse forum is the place to ask usage questions and for longer form discussions around the project.
89

910
## [Github Issue Tracker](https://github.com/scverse/scanpy/issues)
1011

docs/ecosystem.md

Lines changed: 0 additions & 112 deletions
This file was deleted.

docs/external/index.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@
77

88
```{warning}
99
We are no longer accepting new tools into `scanpy.external`.
10-
Instead, please submit your tool to the [scverse ecosystem package listing](https://scverse.org/packages/#ecosystem).
11-
```
12-
13-
```{note}
14-
For tools that integrate well with scanpy and anndata, see:
15-
* The [scverse ecosystem](https://scverse.org/packages/#ecosystem)
16-
* Scanpy's ecosystem {doc}`ecosystem page <../ecosystem>`
10+
For tools that integrate well with scanpy and anndata, or to submit your own, see the [scverse ecosystem](https://scverse.org/packages/#ecosystem).
1711
```
1812

1913
Import Scanpy's wrappers to external tools as:

docs/index.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@ Need help? Reach out on our forum to get your questions answered!
3838

3939
Find a bug? Interested in improving scanpy? Checkout our GitHub for the latest developments.
4040
:::
41+
42+
:::{grid-item-card} GPU acceleration {octicon}`rocket;1em;`
43+
:link: https://rapids-singlecell.readthedocs.io
44+
45+
Working with millions of cells and have a GPU available?
46+
[rapids-singlecell][rsc] mirrors the scanpy API with order-of-magnitude speedups on core preprocessing, neighbors, embedding, and clustering steps.
47+
:::
4148
::::
4249

50+
[rsc]: https://rapids-singlecell.readthedocs.io
51+
4352
**Other resources**
4453

4554
* Follow changes in the {ref}`release notes <release-notes>`.
46-
* Find tools that harmonize well with anndata & Scanpy at [scverse.org/packages/](https://scverse.org/packages/)
55+
* Discover tools that build on or complement scanpy in the [scverse ecosystem](https://scverse.org/packages/#ecosystem), and follow scverse-wide news at [scverse.org/blog](https://scverse.org/blog/).
4756
* Check out our {ref}`contribution guide <contribution-guide>` for development practices.
4857
* Consider citing [Genome Biology (2018)] along with original {doc}`references <references>`.
4958

50-
## News
51-
52-
```{include} news.md
53-
:start-after: '<!-- marker: after prelude -->'
54-
:end-before: '<!-- marker: before old news -->'
55-
```
56-
57-
{ref}`(past news) <News>`
58-
5959
% put references first so all references are resolved
6060

6161
% NO! there is a particular meaning to this sequence
@@ -70,10 +70,8 @@ usage-principles
7070
how-to/index
7171
api/index
7272
external/index
73-
ecosystem
7473
release-notes/index
7574
community
76-
news
7775
dev/index
7876
contributors
7977
references

docs/installation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ For instructions on how to work with the code, see the {ref}`contribution guide
109109

110110
[on github]: https://github.com/scverse/scanpy
111111

112+
## GPU acceleration
113+
114+
If you have a GPU, consider [rapids-singlecell][], which mirrors the scanpy API with order-of-magnitude speedups.
115+
See its [documentation][rapids-singlecell] for installation and usage instructions.
116+
117+
[rapids-singlecell]: https://rapids-singlecell.readthedocs.io
118+
112119
## Docker
113120

114121
If you're using [Docker][], you can use e.g. the image [gcfntnu/scanpy][] from Docker Hub.

docs/news.md

Lines changed: 0 additions & 67 deletions
This file was deleted.

docs/release-notes/4100.docs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Highlighting rapids-singlecell for GPU users & cleanup documentation.

docs/tutorials/index.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plotting/index
2323
## Trajectory inference
2424

2525
```{seealso}
26-
For more powerful tools for analysing single cell dynamics, check out the Scverse ecosystem packages:
26+
For more powerful tools for analysing single cell dynamics, check out the scverse ecosystem packages:
2727
2828
* [CellRank](https://cellrank.readthedocs.io)
2929
* [Dynamo](https://dynamo-release.readthedocs.io/en/latest/)
@@ -35,9 +35,6 @@ For more powerful tools for analysing single cell dynamics, check out the Scvers
3535
trajectories/index
3636
```
3737

38-
## Spatial data
39-
40-
4138
## Experimental
4239

4340
```{toctree}
@@ -53,7 +50,7 @@ A number of older tutorials can be found at:
5350
* The [`scanpy_usage`](https://github.com/scverse/scanpy_usage) repository
5451

5552
```{seealso}
56-
Scanpy used to have tutorials for its (now deprecated) spatial data functionality.x
53+
Scanpy used to have tutorials for its (now deprecated) spatial data functionality.
5754
For up-to-date tutorials on working with spatial data, see:
5855
5956
* SquidPy {doc}`squidpy:notebooks/tutorials/index`

docs/usage-principles.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22

33
Import Scanpy as:
44

5-
```
5+
```python
66
import scanpy as sc
77
```
88

99
## Workflow
1010

11-
The typical workflow consists of subsequent calls of data analysis tools
12-
in `sc.tl`, e.g.:
11+
The typical workflow consists of subsequent calls of data analysis tools in `sc.tl`, e.g.:
1312

14-
```
13+
```python
1514
sc.tl.umap(adata, **tool_params) # embed a neighborhood graph of the data using UMAP
1615
```
1716

@@ -20,7 +19,7 @@ Each of these calls adds annotation to an expression matrix *X*,
2019
which stores *n_obs* observations (cells) of *n_vars* variables (genes).
2120
For each tool, there typically is an associated plotting function in `sc.pl`:
2221

23-
```
22+
```python
2423
sc.pl.umap(adata, **plotting_params)
2524
```
2625

@@ -41,24 +40,21 @@ Scanpy is based on {mod}`anndata`, which provides the {class}`~anndata.AnnData`
4140
:width: 300px
4241
```
4342

44-
At the most basic level, an {class}`~anndata.AnnData` object `adata` stores
45-
a data matrix `adata.X`, annotation of observations
46-
`adata.obs` and variables `adata.var` as `pd.DataFrame` and unstructured
47-
annotation `adata.uns` as `dict`. Names of observations and
48-
variables can be accessed via `adata.obs_names` and `adata.var_names`,
49-
respectively. {class}`~anndata.AnnData` objects can be sliced like
50-
dataframes, for example, `adata_subset = adata[:, list_of_gene_names]`.
43+
At the most basic level, an {class}`~anndata.AnnData` object `adata` stores a data matrix `adata.X`, annotation of observations
44+
`adata.obs` and variables `adata.var` as `pd.DataFrame` and unstructured annotation `adata.uns` as `dict`.
45+
Names of observations and variables can be accessed via `adata.obs_names` and `adata.var_names`, respectively.
46+
{class}`~anndata.AnnData` objects can be sliced like dataframes, for example, `adata_subset = adata[:, list_of_gene_names]`.
5147
For more, see this [blog post].
5248

5349
To read a data file to an {class}`~anndata.AnnData` object, call:
5450

55-
```
56-
adata = sc.read(filename)
51+
```python
52+
adata = sc.read_h5ad(filename). # or sc.read_zarr(filename)
5753
```
5854

5955
to initialize an {class}`~anndata.AnnData` object. Possibly add further annotation using, e.g., `pd.read_csv`:
6056

61-
```
57+
```python
6258
import pandas as pd
6359
anno = pd.read_csv(filename_sample_annotation)
6460
adata.obs['cell_groups'] = anno['cell_groups'] # categorical annotation of type pandas.Categorical
@@ -69,7 +65,7 @@ adata.obs['time'] = anno['time'] # numerical annotation of type f
6965

7066
To write, use:
7167

72-
```
68+
```python
7369
adata.write_h5ad(filename)
7470
adata.write_zarr(filename)
7571
adata.write_csvs(filename)

0 commit comments

Comments
 (0)