From 214e05bdc54df61c520dc563ab39b7780e6d3358 Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:42:30 +0100 Subject: [PATCH] Backport PR #2901: Doc submodule (#2962) Co-authored-by: Isaac Virshup --- .gitmodules | 3 + .readthedocs.yml | 2 + docs/_tutorials.md | 142 ------------------ docs/api/plotting.md | 2 +- docs/conf.py | 10 +- docs/extensions/cite.py | 2 +- docs/how-to/index.md | 7 + docs/how-to/knn-transformers.ipynb | 1 + docs/index.md | 10 +- docs/installation.md | 2 +- docs/news.md | 6 +- docs/references.bib | 100 ++++++++++++ docs/references.rst | 6 +- docs/release-notes/0.4.0.md | 2 +- docs/release-notes/0.4.3.md | 2 +- docs/release-notes/1.0.0.md | 2 +- docs/release-notes/1.1.0.md | 8 +- docs/release-notes/1.10.0.md | 18 ++- docs/release-notes/1.2.1.md | 2 +- docs/release-notes/1.3.1.md | 10 +- docs/release-notes/1.3.4.md | 6 +- docs/release-notes/1.4.1.md | 2 +- docs/release-notes/1.4.5.md | 2 +- docs/release-notes/1.4.6.md | 2 +- docs/release-notes/1.5.0.md | 4 +- docs/release-notes/1.6.0.md | 2 +- docs/release-notes/1.7.0.md | 6 +- docs/release-notes/1.9.0.md | 2 +- docs/tutorials/basics/clustering-2017.ipynb | 1 + docs/tutorials/basics/clustering.ipynb | 1 + docs/tutorials/basics/index.md | 9 ++ .../integrating-data-using-ingest.ipynb | 1 + docs/tutorials/experimental/dask.ipynb | 1 + docs/tutorials/experimental/index.md | 8 + .../experimental/pearson_residuals.ipynb | 1 + docs/tutorials/index.md | 66 ++++++++ docs/tutorials/plotting/advanced.ipynb | 1 + docs/tutorials/plotting/core.ipynb | 1 + docs/tutorials/plotting/index.md | 8 + docs/tutorials/spatial/basic-analysis.ipynb | 1 + docs/tutorials/spatial/index.md | 8 + .../spatial/integration-scanorama.ipynb | 1 + docs/tutorials/trajectories/index.md | 7 + docs/tutorials/trajectories/paga-paul15.ipynb | 1 + notebooks | 2 +- pyproject.toml | 2 + scanpy/datasets/_datasets.py | 2 +- scanpy/neighbors/__init__.py | 4 +- scanpy/plotting/_tools/scatterplots.py | 2 +- scanpy/tools/_ingest.py | 2 +- 50 files changed, 299 insertions(+), 194 deletions(-) create mode 100644 .gitmodules delete mode 100644 docs/_tutorials.md create mode 100644 docs/how-to/index.md create mode 120000 docs/how-to/knn-transformers.ipynb create mode 100644 docs/references.bib create mode 120000 docs/tutorials/basics/clustering-2017.ipynb create mode 120000 docs/tutorials/basics/clustering.ipynb create mode 100644 docs/tutorials/basics/index.md create mode 120000 docs/tutorials/basics/integrating-data-using-ingest.ipynb create mode 120000 docs/tutorials/experimental/dask.ipynb create mode 100644 docs/tutorials/experimental/index.md create mode 120000 docs/tutorials/experimental/pearson_residuals.ipynb create mode 100644 docs/tutorials/index.md create mode 120000 docs/tutorials/plotting/advanced.ipynb create mode 120000 docs/tutorials/plotting/core.ipynb create mode 100644 docs/tutorials/plotting/index.md create mode 120000 docs/tutorials/spatial/basic-analysis.ipynb create mode 100644 docs/tutorials/spatial/index.md create mode 120000 docs/tutorials/spatial/integration-scanorama.ipynb create mode 100644 docs/tutorials/trajectories/index.md create mode 120000 docs/tutorials/trajectories/paga-paul15.ipynb diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..8665ee972e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "notebooks"] + path = notebooks + url = https://github.com/scverse/scanpy-tutorials/ diff --git a/.readthedocs.yml b/.readthedocs.yml index 97597ff326..4a5d3e219f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,4 +1,6 @@ version: 2 +submodules: + include: all build: os: ubuntu-20.04 tools: diff --git a/docs/_tutorials.md b/docs/_tutorials.md deleted file mode 100644 index 36f7a99da1..0000000000 --- a/docs/_tutorials.md +++ /dev/null @@ -1,142 +0,0 @@ -# Tutorials - -## Clustering - -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. - -```{image} _static/img/tutorials/170505_seurat/filter_genes_dispersion.png -:width: 100px -``` - -```{image} _static/img/tutorials/170505_seurat/louvain.png -:width: 100px -``` - -```{image} _static/img/tutorials/170505_seurat/NKG7.png -:width: 100px -``` - -```{image} _static/img/tutorials/170505_seurat/violin.png -:width: 100px -``` - -```{image} _static/img/tutorials/170505_seurat/cell_types.png -:width: 200px -``` - -## Visualization - -Learn how to visually explore genes using scanpy: {doc}`tutorials:plotting/core` - -For advanced customization of your plots, see {doc}`tutorials:plotting/advanced` - -```{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`: {doc}`tutorials:paga-paul15` - -```{image} _static/img/tutorials/paga_paul15.png -:width: 450px -``` - -More examples for trajectory inference on complex datasets can be found in the -[PAGA](https://github.com/theislab/paga) repository {cite}`Wolf19`, for instance, multi-resolution analyses of whole -animals, such as for [planaria] for data of {cite}`Plass18`. - -```{image} _static/img/tutorials/paga_planaria.png -:width: 350px -``` - -As a reference for simple pseudotime analyses, we provide the diffusion pseudotime (DPT) analyses of {cite}`Haghverdi16` -for two hematopoiesis datasets: [DPT example 1] {cite}`Paul15` and [DPT example 2] {cite}`Moignard15`. - -## Integrating datasets - -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: {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 -``` - -## Further Tutorials - -(conversion-to-r)= - -### Conversion: AnnData, SingleCellExperiment, and Seurat objects - -```{image} https://github.com/theislab/scanpy-in-R/raw/master/logo.png -:align: right -:width: 200px -``` - -- See [Seurat to AnnData] for a tutorial on `anndata2ri`. -- See the [Scanpy in R] guide for a tutorial on interacting with Scanpy from R. - -### Regressing out cell cycle - -See the [cell cycle] notebook. - -```{image} _static/img/tutorials/170522_visualizing_one_million_cells/tsne_1.3M.png -:align: right -:width: 120px -``` - -### Normalization with Pearson Residuals - -Normalization of scRNA-seq data with Pearson Residuals, from {cite}`Lause21`: {doc}`tutorials:tutorial_pearson_residuals` - -### Scaling Computations - -- Visualize and cluster [1.3M neurons] from 10x Genomics. - -### Simulations - -Simulating single cells using literature-curated gene regulatory networks {cite}`Wittmann09`. - -```{image} _static/img/tutorials/170430_krumsiek11/timeseries.png -:align: right -:width: 200px -``` - -- Notebook for [myeloid differentiation] -- Notebook for simple [toggleswitch] - -### Images - -See pseudotime-time inference on deep-learning based features for [cell cycle reconstruction] from image data {cite}`Eulenberg17`. - -% User Examples -% ~~~~~~~~~~~~~ -% -% January 12, 2018: `Exploring the mouse cell atlas`_ by `David P. Cook`_. -% Data by `Tabula Muris Consortium`_. -% -% .. _Exploring the mouse cell atlas: https://github.com/dpcook/fun_analysis/blob/master/tabula_muris/mouse_atlas_scanpy.ipynb -% .. _David P. Cook: https://twitter.com/DavidPCook -% .. _Tabula Muris Consortium: https://www.biorxiv.org/content/early/2017/12/20/237446 - -[1.3m neurons]: https://github.com/scverse/scanpy_usage/tree/master/170522_visualizing_one_million_cells -[cell cycle]: https://nbviewer.jupyter.org/github/scverse/scanpy_usage/blob/master/180209_cell_cycle/cell_cycle.ipynb -[cell cycle reconstruction]: https://github.com/scverse/scanpy_usage/tree/master/170529_images -[dpt example 1]: https://nbviewer.jupyter.org/github/scverse/scanpy_usage/blob/master/170502_paul15/paul15.ipynb -[dpt example 2]: https://nbviewer.jupyter.org/github/scverse/scanpy_usage/blob/master/170501_moignard15/moignard15.ipynb -[myeloid differentiation]: https://nbviewer.jupyter.org/github/scverse/scanpy_usage/blob/master/170430_krumsiek11/krumsiek11.ipynb -[planaria]: https://nbviewer.jupyter.org/github/theislab/paga/blob/master/planaria/planaria.ipynb -[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 diff --git a/docs/api/plotting.md b/docs/api/plotting.md index 32f73daf87..f1ceb17c4c 100644 --- a/docs/api/plotting.md +++ b/docs/api/plotting.md @@ -11,7 +11,7 @@ The plotting module {mod}`scanpy.pl` largely parallels the `tl.*` and a few of the `pp.*` functions. For most tools and for some preprocessing functions, you'll find a plotting function with the same name. -See {doc}`tutorials:plotting/core` for an overview of how to use these functions. +See {doc}`/tutorials/plotting/core` for an overview of how to use these functions. ```{note} See the {ref}`settings` section for all important plotting configurations. diff --git a/docs/conf.py b/docs/conf.py index 61d931974f..12ab01c8c0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,6 @@ # -- General configuration ------------------------------------------------ - nitpicky = True # Warn about broken links. This is here for a reason: Do not change. needs_sphinx = "4.0" # Nicer param docs suppress_warnings = [ @@ -42,6 +41,11 @@ release = version +# Bibliography settings +bibtex_bibfiles = ["references.bib"] +bibtex_reference_style = "author_year" + + # default settings templates_path = ["_templates"] master_doc = "index" @@ -59,6 +63,7 @@ "sphinx.ext.napoleon", "sphinx.ext.autosummary", "sphinx.ext.extlinks", + "sphinxcontrib.bibtex", "matplotlib.sphinxext.plot_directive", "sphinx_autodoc_typehints", # needs to be after napoleon "git_ref", # needs to be before scanpydoc.rtd_github_links @@ -90,7 +95,7 @@ "html_image", "html_admonition", ] -myst_url_schemes = ("http", "https", "mailto") +myst_url_schemes = ("http", "https", "mailto", "ftp") nb_output_stderr = "remove" nb_execution_mode = "off" nb_merge_streams = True @@ -127,7 +132,6 @@ scipy=("https://docs.scipy.org/doc/scipy/", None), seaborn=("https://seaborn.pydata.org/", None), sklearn=("https://scikit-learn.org/stable/", None), - tutorials=("https://scanpy-tutorials.readthedocs.io/en/latest/", None), ) diff --git a/docs/extensions/cite.py b/docs/extensions/cite.py index 3b8afd34a7..649f0c28f2 100644 --- a/docs/extensions/cite.py +++ b/docs/extensions/cite.py @@ -30,4 +30,4 @@ def cite_role( # noqa: PLR0917 def setup(app: Sphinx): - app.add_role("cite", cite_role, override=True) + app.add_role("cite-hack", cite_role, override=True) diff --git a/docs/how-to/index.md b/docs/how-to/index.md new file mode 100644 index 0000000000..2e923a539d --- /dev/null +++ b/docs/how-to/index.md @@ -0,0 +1,7 @@ +# How to + +This section contains short examples on how to perform specific tasks with scanpy. + +```{toctree} +knn-transformers +``` diff --git a/docs/how-to/knn-transformers.ipynb b/docs/how-to/knn-transformers.ipynb new file mode 120000 index 0000000000..74ae4f265b --- /dev/null +++ b/docs/how-to/knn-transformers.ipynb @@ -0,0 +1 @@ +../../notebooks/knn-transformers.ipynb \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 9ecf45dcb5..fea9a50ecd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,7 +21,7 @@ New to *scanpy*? Check out the installation guide. ::: :::{grid-item-card} Tutorials {octicon}`play;1em;` -:link: _tutorials +:link: tutorials/index :link-type: doc The tutorials walk you through real-world applications of scanpy. @@ -49,8 +49,9 @@ Find a bug? Interested in improving scanpy? Checkout our GitHub for the latest d :::: **Other resources** + * Follow changes in the {ref}`release notes `. -* Find tools that harmonize well with anndata & Scanpy via the {doc}`external API ` and the {doc}`ecosystem page `. +* Find tools that harmonize well with anndata & Scanpy at [scverse.org/packages/](https://scverse.org/packages/) * Check out our {ref}`contribution guide ` for development practices. * Consider citing [Genome Biology (2018)] along with original {doc}`references `. @@ -71,9 +72,10 @@ Find a bug? Interested in improving scanpy? Checkout our GitHub for the latest d :hidden: true :maxdepth: 1 -_tutorials -usage-principles installation +tutorials/index +usage-principles +how-to/index api/index external/index ecosystem diff --git a/docs/installation.md b/docs/installation.md index b147ee62d8..7cc17df09c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -24,7 +24,7 @@ pip install 'scanpy[leiden]' ``` The extra `[leiden]` installs two packages that are needed for popular -parts of scanpy but aren't requirements: [igraph] {cite}`Csardi06` and [leiden] {cite}`Traag18`. +parts of scanpy but aren't requirements: [igraph] {cite-hack}`Csardi06` and [leiden] {cite-hack}`Traag18`. (dev-install-instructions)= diff --git a/docs/news.md b/docs/news.md index f9edc56753..9e2f257b89 100644 --- a/docs/news.md +++ b/docs/news.md @@ -7,6 +7,10 @@ ``` +### `rapids-singlecell` brings scanpy to the GPU! {small}`2024-03-18` + +{doc}`rapids-singlecell ` by Severin Dicks provides a scanpy-like API with accelerated operations implemented on GPU. + ### Scanpy hits 100 contributors! {small}`2022-03-31` [100 people have contributed to Scanpy's source code!](https://github.com/scverse/scanpy/graphs/contributors) @@ -59,7 +63,7 @@ Bioconda, Seurat, Bioconductor, and others. ### Science “Breakthrough of the Year 2018” {small}`2018-12-01` -The Science “Breakthrough of the Year 2018”, [Development cell by cell](https://vis.sciencemag.org/breakthrough2018/finalists/#cell-development), mentions the first application of PAGA {cite}`Plass18` among 5 papers. +The Science “Breakthrough of the Year 2018”, [Development cell by cell](https://vis.sciencemag.org/breakthrough2018/finalists/#cell-development), mentions the first application of PAGA {cite-hack}`Plass18` among 5 papers. [32 projects]: https://chanzuckerberg.com/eoss/proposals/ [essential open source software for science]: https://chanzuckerberg.com/newsroom/chan-zuckerberg-initiative-awards-5-million-for-open-source-software-projects-essential-to-science/ diff --git a/docs/references.bib b/docs/references.bib new file mode 100644 index 0000000000..595b2fa56a --- /dev/null +++ b/docs/references.bib @@ -0,0 +1,100 @@ +@article{Wolf2018, + author = {Wolf, F. Alexander + and Angerer, Philipp + and Theis, Fabian J.}, + title = {SCANPY: large-scale single-cell gene expression data analysis}, + journal = {Genome Biology}, + year = {2018}, + month = {Feb}, + day = {06}, + volume = {19}, + number = {1}, + pages = {15}, + abstract = {Scanpy is a scalable toolkit for analyzing single-cell gene expression data. It includes methods for preprocessing, visualization, clustering, pseudotime and trajectory inference, differential expression testing, and simulation of gene regulatory networks. Its Python-based implementation efficiently deals with data sets of more than one million cells (https://github.com/theislab/Scanpy). Along with Scanpy, we present AnnData, a generic class for handling annotated data matrices (https://github.com/theislab/anndata).}, + issn = {1474-760X}, + doi = {10.1186/s13059-017-1382-0}, + url = {https://doi.org/10.1186/s13059-017-1382-0} +} +@inproceedings{luecken2021, + author = {Luecken, Malte and Burkhardt, Daniel and Cannoodt, Robrecht and Lance, Christopher and Agrawal, Aditi and Aliee, Hananeh and Chen, Ann and Deconinck, Louise and Detweiler, Angela and Granados, Alejandro and Huynh, Shelly and Isacco, Laura and Kim, Yang and Klein, Dominik and DE KUMAR, BONY and Kuppasani, Sunil and Lickert, Heiko and McGeever, Aaron and Melgarejo, Joaquin and Mekonen, Honey and Morri, Maurizio and M\"{u}ller, Michaela and Neff, Norma and Paul, Sheryl and Rieck, Bastian and Schneider, Kaylie and Steelman, Scott and Sterr, Michael and Treacy, Daniel and Tong, Alexander and Villani, Alexandra-Chloe and Wang, Guilin and Yan, Jia and Zhang, Ce and Pisco, Angela and Krishnaswamy, Smita and Theis, Fabian and Bloom, Jonathan M}, + booktitle = {Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks}, + editor = {J. Vanschoren and S. Yeung}, + pages = {}, + publisher = {Curran}, + title = {A sandbox for prediction and integration of DNA, RNA, and proteins in single cells}, + url = {https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/158f3069a435b314a80bdcb024f8e422-Paper-round2.pdf}, + volume = {1}, + year = {2021} +} +@article{McCarthy2017, + doi = {10.1093/bioinformatics/btw777}, + url = {https://doi.org/10.1093/bioinformatics/btw777}, + year = {2017}, + month = jan, + publisher = {Oxford University Press ({OUP})}, + volume = {33}, + number = {8}, + pages = {1179--1186}, + author = {Davis J McCarthy and Kieran R Campbell and Aaron T L Lun and Quin F Wills}, + editor = {Ivo Hofacker}, + title = {Scater: pre-processing, quality control, normalization and visualization of single-cell {RNA}-seq data in R}, + journal = {Bioinformatics} +} +@article{Wolock2019, + doi = {10.1016/j.cels.2018.11.005}, + url = {https://doi.org/10.1016/j.cels.2018.11.005}, + year = {2019}, + month = apr, + publisher = {Elsevier {BV}}, + volume = {8}, + number = {4}, + pages = {281--291.e9}, + author = {Samuel L. Wolock and Romain Lopez and Allon M. Klein}, + title = {Scrublet: Computational Identification of Cell Doublets in Single-Cell Transcriptomic Data}, + journal = {Cell Systems} +} +@article{Satija2015, + doi = {10.1038/nbt.3192}, + url = {https://doi.org/10.1038/nbt.3192}, + year = {2015}, + month = apr, + publisher = {Springer Science and Business Media {LLC}}, + volume = {33}, + number = {5}, + pages = {495--502}, + author = {Rahul Satija and Jeffrey A Farrell and David Gennert and Alexander F Schier and Aviv Regev}, + title = {Spatial reconstruction of single-cell gene expression data}, + journal = {Nature Biotechnology} +} +@article{Zheng2017, + doi = {10.1038/ncomms14049}, + url = {https://doi.org/10.1038/ncomms14049}, + year = {2017}, + month = jan, + publisher = {Springer Science and Business Media {LLC}}, + volume = {8}, + number = {1}, + author = {Grace X. Y. Zheng and Jessica M. Terry and Phillip Belgrader and Paul Ryvkin and Zachary W. Bent and Ryan Wilson and Solongo B. Ziraldo and Tobias D. Wheeler and Geoff P. McDermott and Junjie Zhu and Mark T. Gregory and Joe Shuga and Luz Montesclaros and Jason G. Underwood and Donald A. Masquelier and Stefanie Y. Nishimura and Michael Schnall-Levin and Paul W. Wyatt and Christopher M. Hindson and Rajiv Bharadwaj and Alexander Wong and Kevin D. Ness and Lan W. Beppu and H. Joachim Deeg and Christopher McFarland and Keith R. Loeb and William J. Valente and Nolan G. Ericson and Emily A. Stevens and Jerald P. Radich and Tarjei S. Mikkelsen and Benjamin J. Hindson and Jason H. Bielas}, + title = {Massively parallel digital transcriptional profiling of single cells}, + journal = {Nature Communications} +} +@article{stuart2019comprehensive, + title = {Comprehensive integration of single-cell data}, + author = {Stuart, Tim and Butler, Andrew and Hoffman, Paul and Hafemeister, Christoph and Papalexi, Efthymia and Mauck, William M and Hao, Yuhan and Stoeckius, Marlon and Smibert, Peter and Satija, Rahul}, + journal = {Cell}, + volume = {177}, + number = {7}, + pages = {1888--1902}, + year = {2019}, + publisher = {Elsevier} +} +@article{traag2019louvain, + title = {From Louvain to Leiden: guaranteeing well-connected communities}, + author = {Traag, Vincent A and Waltman, Ludo and Van Eck, Nees Jan}, + journal = {Scientific reports}, + volume = {9}, + number = {1}, + pages = {5233}, + year = {2019}, + publisher = {Nature Publishing Group UK London} +} diff --git a/docs/references.rst b/docs/references.rst index 80fdc892de..04c8a59b9f 100644 --- a/docs/references.rst +++ b/docs/references.rst @@ -37,10 +37,6 @@ References *Single cell RNA-seq denoising using a deep count autoencoder*, `bioRxiv `__. -.. [Eulenberg17] Eulenberg *et al.* (2017), - *Reconstructing cell cycle and disease progression using deep learning* - `Nature Communications `__. - .. [Fechtner18] *PyPairs*, `GitHub `__. @@ -233,3 +229,5 @@ References .. [Zunder15] Zunder *et al.* (2015), *A continuous molecular roadmap to iPSC reprogramming through progression analysis of single-cell mass cytometry*, `Cell Stem Cell `__. + +.. bibliography:: diff --git a/docs/release-notes/0.4.0.md b/docs/release-notes/0.4.0.md index e028f7852e..5e49ad8570 100644 --- a/docs/release-notes/0.4.0.md +++ b/docs/release-notes/0.4.0.md @@ -1,6 +1,6 @@ ### 0.4.0 {small}`2017-12-23` -- export to [SPRING] {cite}`Weinreb17` for interactive visualization of data: +- export to [SPRING] {cite-hack}`Weinreb17` for interactive visualization of data: [spring tutorial] {smaller}`S Wollock` [spring]: https://github.com/AllonKleinLab/SPRING/ diff --git a/docs/release-notes/0.4.3.md b/docs/release-notes/0.4.3.md index 966157e076..c3027fbce9 100644 --- a/docs/release-notes/0.4.3.md +++ b/docs/release-notes/0.4.3.md @@ -1,6 +1,6 @@ ### 0.4.3 {small}`2018-02-09` - {func}`~scanpy.pl.clustermap`: heatmap from hierarchical clustering, - based on {func}`seaborn.clustermap` {cite}`Waskom16` {smaller}`A Wolf` + based on {func}`seaborn.clustermap` {cite-hack}`Waskom16` {smaller}`A Wolf` - only return {class}`matplotlib.axes.Axes` in plotting functions of `sc.pl` when `show=False`, otherwise `None` {smaller}`A Wolf` diff --git a/docs/release-notes/1.0.0.md b/docs/release-notes/1.0.0.md index 7085c6a00f..ab86b1c200 100644 --- a/docs/release-notes/1.0.0.md +++ b/docs/release-notes/1.0.0.md @@ -38,7 +38,7 @@ ```{rubric} Further updates ``` -- UMAP {cite}`McInnes18` can serve as a first visualization of the data just as tSNE, +- UMAP {cite-hack}`McInnes18` can serve as a first visualization of the data just as tSNE, in contrast to tSNE, UMAP directly embeds the single-cell graph and is faster; UMAP is also used for measuring connectivities and computing neighbors, see {func}`~scanpy.pp.neighbors` {smaller}`A Wolf` diff --git a/docs/release-notes/1.1.0.md b/docs/release-notes/1.1.0.md index 2f4ca67b08..fd0d68d9fb 100644 --- a/docs/release-notes/1.1.0.md +++ b/docs/release-notes/1.1.0.md @@ -1,12 +1,12 @@ ### 1.1.0 {small}`2018-06-01` - {func}`~scanpy.set_figure_params` by default passes `vector_friendly=True` and allows you to produce reasonablly sized pdfs by rasterizing large scatter plots {smaller}`A Wolf` -- {func}`~scanpy.tl.draw_graph` defaults to the ForceAtlas2 layout {cite}`Jacomy14` {cite}`Chippada18`, which is often more visually appealing and whose computation is much faster {smaller}`S Wollock` +- {func}`~scanpy.tl.draw_graph` defaults to the ForceAtlas2 layout {cite-hack}`Jacomy14` {cite-hack}`Chippada18`, which is often more visually appealing and whose computation is much faster {smaller}`S Wollock` - {func}`~scanpy.pl.scatter` also plots along variables axis {smaller}`MD Luecken` - {func}`~scanpy.pp.pca` and {func}`~scanpy.pp.log1p` support chunk processing {smaller}`S Rybakov` - {func}`~scanpy.pp.regress_out` is back to multiprocessing {smaller}`F Ramirez` - {func}`~scanpy.read` reads compressed text files {smaller}`G Eraslan` - {func}`~scanpy.queries.mitochondrial_genes` for querying mito genes {smaller}`FG Brundu` -- {func}`~scanpy.external.pp.mnn_correct` for batch correction {cite}`Haghverdi18` {cite}`Kang18` -- {func}`~scanpy.external.tl.phate` for low-dimensional embedding {cite}`Moon17` {smaller}`S Gigante` -- {func}`~scanpy.external.tl.sandbag`, {func}`~scanpy.external.tl.cyclone` for scoring genes {cite}`Scialdone15` {cite}`Fechtner18` +- {func}`~scanpy.external.pp.mnn_correct` for batch correction {cite-hack}`Haghverdi18` {cite-hack}`Kang18` +- {func}`~scanpy.external.tl.phate` for low-dimensional embedding {cite-hack}`Moon17` {smaller}`S Gigante` +- {func}`~scanpy.external.tl.sandbag`, {func}`~scanpy.external.tl.cyclone` for scoring genes {cite-hack}`Scialdone15` {cite-hack}`Fechtner18` diff --git a/docs/release-notes/1.10.0.md b/docs/release-notes/1.10.0.md index 72b066d130..a42d409f9f 100644 --- a/docs/release-notes/1.10.0.md +++ b/docs/release-notes/1.10.0.md @@ -1,11 +1,14 @@ -### 1.10.0rc2 {small}`2024-02-22` +### 1.10.0 {small}`2024-03-26` -```{rubric} Bug fixes -``` +`scanpy` 1.10 brings a large amount of new features, performance improvements, and improved documentation. -* Fix pytest deprecation warning {pr}`2879` {smaller}`P Angerer` +Some highlights: -### 1.10.0rc1 {small}`2024-02-22` +* Improved support for out-of-core workflows via `dask`. See new tutorial: {doc}`/tutorials/experimental/dask` demonstrating counts-to-clusters for 1.4 million cells in <10 min. +* A new {doc}`basic clustering tutorial ` demonstrating an updated workflow. +* Opt-in increased performance for neighbor search and clustering ({doc}`how to guide `). +* Ability to `mask` observations or variables from a number of methods (see {doc}`/tutorials/plotting/advanced` for an example with plotting embeddings) +* A new function {func}`~scanpy.get.aggregate` for computing aggregations of your data, very useful for pseudo bulking! ```{rubric} Features ``` @@ -32,10 +35,14 @@ ```{rubric} Docs ``` +* Doc style overhaul {pr}`2220` {smaller}`A Gayoso` * Re-add search-as-you-type, this time via `readthedocs-sphinx-search` {pr}`2805` {smaller}`P Angerer` * Fixed a lot of broken usage examples {pr}`2605` {smaller}`P Angerer` * Improved harmonization of return field of `sc.pp` and `sc.tl` functions {pr}`2742` {smaller}`E Roellin` * Improved docs for `percent_top` argument of {func}`~scanpy.pp.calculate_qc_metrics` {pr}`2849` {smaller}`I Virshup` +* New basic clustering tutorial ({doc}`/tutorials/basics/clustering`), based on one from [scverse-tutorials](https://scverse-tutorials.readthedocs.io/en/latest/notebooks/basic-scrna-tutorial.html) {pr}`2901` {smaller}`I Virshup` +* Overhauled {doc}`/tutorials/index` page, and added new {doc}`/how-to/index` section to docs {pr}`2901` {smaller}`I Virshup` +* Added a new tutorial on working with dask ({doc}`/tutorials/experimental/dask`) {pr}`2901` {smaller}`I Gold` {smaller}`I Virshup` ```{rubric} Bug fixes ``` @@ -51,6 +58,7 @@ * Removes self from array of neighbors for `use_approx_neighbors = True` in {func}`~scanpy.pp.scrublet` {pr}`2896`{smaller}`S Dicks` * Compatibility with scipy 1.13 {pr}`2943` {smaller}`I Virshup` * Fix use of {func}`~scanpy.tl.dendrogram` on highly correlated low precision data {pr}`2928` {smaller}`P Angerer` +* Fix pytest deprecation warning {pr}`2879` {smaller}`P Angerer` ```{rubric} Development diff --git a/docs/release-notes/1.2.1.md b/docs/release-notes/1.2.1.md index 24d339e34a..3bbd855406 100644 --- a/docs/release-notes/1.2.1.md +++ b/docs/release-notes/1.2.1.md @@ -3,4 +3,4 @@ ~~~{rubric} Plotting of {ref}`pl-generic` marker genes and quality control. ~~~ -- {func}`~scanpy.pl.highest_expr_genes` for quality control; plot genes with highest mean fraction of cells, similar to `plotQC` of *Scater* {cite}`McCarthy17` {pr}`169` {smaller}`F Ramirez` +- {func}`~scanpy.pl.highest_expr_genes` for quality control; plot genes with highest mean fraction of cells, similar to `plotQC` of *Scater* {cite-hack}`McCarthy17` {pr}`169` {smaller}`F Ramirez` diff --git a/docs/release-notes/1.3.1.md b/docs/release-notes/1.3.1.md index 9eb6bf35d6..93a0109da4 100644 --- a/docs/release-notes/1.3.1.md +++ b/docs/release-notes/1.3.1.md @@ -1,10 +1,10 @@ ### 1.3.1 {small}`2018-09-03` -```{rubric} RNA velocity in single cells {cite}`Manno18` +```{rubric} RNA velocity in single cells {cite-hack}`Manno18` ``` -- Scanpy and AnnData support loom’s layers so that computations for single-cell RNA velocity {cite}`Manno18` become feasible {smaller}`S Rybakov and V Bergen` -- [scvelo] harmonizes with Scanpy and is able to process loom files with splicing information produced by Velocyto {cite}`Manno18`, it runs a lot faster than the count matrix analysis of Velocyto and provides several conceptual developments +- Scanpy and AnnData support loom’s layers so that computations for single-cell RNA velocity {cite-hack}`Manno18` become feasible {smaller}`S Rybakov and V Bergen` +- [scvelo] harmonizes with Scanpy and is able to process loom files with splicing information produced by Velocyto {cite-hack}`Manno18`, it runs a lot faster than the count matrix analysis of Velocyto and provides several conceptual developments ~~~{rubric} Plotting ({ref}`pl-generic`) ~~~ @@ -16,7 +16,7 @@ ~~~{rubric} There now is a section on imputation in {doc}`external <../external/index>`: ~~~ -- {func}`~scanpy.external.pp.magic` for imputation using data diffusion {cite}`vanDijk18` {pr}`187` {smaller}`S Gigante` -- {func}`~scanpy.external.pp.dca` for imputation and latent space construction using an autoencoder {cite}`Eraslan18` {pr}`186` {smaller}`G Eraslan` +- {func}`~scanpy.external.pp.magic` for imputation using data diffusion {cite-hack}`vanDijk18` {pr}`187` {smaller}`S Gigante` +- {func}`~scanpy.external.pp.dca` for imputation and latent space construction using an autoencoder {cite-hack}`Eraslan18` {pr}`186` {smaller}`G Eraslan` [scvelo]: https://github.com/theislab/scvelo diff --git a/docs/release-notes/1.3.4.md b/docs/release-notes/1.3.4.md index 2a26a1c765..2be8d27903 100644 --- a/docs/release-notes/1.3.4.md +++ b/docs/release-notes/1.3.4.md @@ -1,5 +1,5 @@ ### 1.3.4 {small}`2018-11-24` -- {func}`~scanpy.tl.leiden` wraps the recent graph clustering package by {cite}`Traag18` {smaller}`K Polanski` -- {func}`~scanpy.external.pp.bbknn` wraps the recent batch correction package {cite}`Polanski19` {smaller}`K Polanski` -- {func}`~scanpy.pp.calculate_qc_metrics` caculates a number of quality control metrics, similar to `calculateQCMetrics` from *Scater* {cite}`McCarthy17` {smaller}`I Virshup` +- {func}`~scanpy.tl.leiden` wraps the recent graph clustering package by {cite-hack}`Traag18` {smaller}`K Polanski` +- {func}`~scanpy.external.pp.bbknn` wraps the recent batch correction package {cite-hack}`Polanski19` {smaller}`K Polanski` +- {func}`~scanpy.pp.calculate_qc_metrics` caculates a number of quality control metrics, similar to `calculateQCMetrics` from *Scater* {cite-hack}`McCarthy17` {smaller}`I Virshup` diff --git a/docs/release-notes/1.4.1.md b/docs/release-notes/1.4.1.md index b9023513c6..964176a029 100644 --- a/docs/release-notes/1.4.1.md +++ b/docs/release-notes/1.4.1.md @@ -10,7 +10,7 @@ - {func}`~scanpy.pp.normalize_total` replaces {func}`~scanpy.pp.normalize_per_cell`, is more efficient and provides a parameter to only normalize using a fraction of expressed genes {smaller}`S Rybakov` - {func}`~scanpy.pp.downsample_counts` has been sped up, changed default value of `replace` parameter to `False` {pr}`474` {smaller}`I Virshup` - {func}`~scanpy.tl.embedding_density` computes densities on embeddings {pr}`543` {smaller}`M Luecken` -- {func}`~scanpy.external.tl.palantir` interfaces Palantir {cite}`Setty18` {pr}`493` {smaller}`A Mousa` +- {func}`~scanpy.external.tl.palantir` interfaces Palantir {cite-hack}`Setty18` {pr}`493` {smaller}`A Mousa` ```{rubric} Code design ``` diff --git a/docs/release-notes/1.4.5.md b/docs/release-notes/1.4.5.md index a70ab739ee..c56c1270da 100644 --- a/docs/release-notes/1.4.5.md +++ b/docs/release-notes/1.4.5.md @@ -5,7 +5,7 @@ Please install `scanpy==1.4.5.post3` instead of `scanpy==1.4.5`. ```{rubric} New functionality ``` -- {func}`~scanpy.tl.ingest` maps labels and embeddings of reference data to new data {doc}`tutorials:integrating-data-using-ingest` {pr}`651` {smaller}`S Rybakov, A Wolf` +- {func}`~scanpy.tl.ingest` maps labels and embeddings of reference data to new data {doc}`/tutorials/basics/integrating-data-using-ingest` {pr}`651` {smaller}`S Rybakov, A Wolf` - {mod}`~scanpy.queries` recieved many updates including enrichment through [gprofiler] and more advanced biomart queries {pr}`467` {smaller}`I Virshup` - {func}`~scanpy.set_figure_params` allows setting `figsize` and accepts `facecolor='white'`, useful for working in dark mode {smaller}`A Wolf` diff --git a/docs/release-notes/1.4.6.md b/docs/release-notes/1.4.6.md index bd204d211f..dc321e878a 100644 --- a/docs/release-notes/1.4.6.md +++ b/docs/release-notes/1.4.6.md @@ -3,7 +3,7 @@ ~~~{rubric} Functionality in `external` ~~~ -- {func}`~scanpy.external.tl.sam` self-assembling manifolds {cite}`Tarashansky19` {pr}`903` {smaller}`A Tarashansky` +- {func}`~scanpy.external.tl.sam` self-assembling manifolds {cite-hack}`Tarashansky19` {pr}`903` {smaller}`A Tarashansky` - {func}`~scanpy.external.tl.harmony_timeseries` for trajectory inference on discrete time points {pr}`994` {smaller}`A Mousa` - {func}`~scanpy.external.tl.wishbone` for trajectory inference (bifurcations) {pr}`1063` {smaller}`A Mousa` diff --git a/docs/release-notes/1.5.0.md b/docs/release-notes/1.5.0.md index 3da5fdf766..b1fff45e03 100644 --- a/docs/release-notes/1.5.0.md +++ b/docs/release-notes/1.5.0.md @@ -5,7 +5,7 @@ The `1.5.0` release adds a lot of new functionality, much of which takes advanta ```{rubric} Spatial data support ``` -- Basic analysis {doc}`tutorials:spatial/basic-analysis` and integration with single cell data {doc}`tutorials:spatial/integration-scanorama` {smaller}`G Palla` +- Basic analysis {doc}`/tutorials/spatial/basic-analysis` and integration with single cell data {doc}`/tutorials/spatial/integration-scanorama` {smaller}`G Palla` - {func}`~scanpy.read_visium` read 10x Visium data {pr}`1034` {smaller}`G Palla, P Angerer, I Virshup` - {func}`~scanpy.datasets.visium_sge` load Visium data directly from 10x Genomics {pr}`1013` {smaller}`M Mirkazemi, G Palla, P Angerer` - {func}`~scanpy.pl.spatial` plot spatial data {pr}`1012` {smaller}`G Palla, P Angerer` @@ -20,7 +20,7 @@ The `1.5.0` release adds a lot of new functionality, much of which takes advanta ``` - `scanpy.external.pp.scvi` for preprocessing with scVI {pr}`1085` {smaller}`G Xing` -- Guide for using {ref}`Scanpy in R ` {pr}`1186` {smaller}`L Zappia` +- Guide for using `Scanpy in R` {pr}`1186` {smaller}`L Zappia` ```{rubric} Performance ``` diff --git a/docs/release-notes/1.6.0.md b/docs/release-notes/1.6.0.md index a57f2b01b8..fe40597a81 100644 --- a/docs/release-notes/1.6.0.md +++ b/docs/release-notes/1.6.0.md @@ -5,7 +5,7 @@ This release includes an overhaul of {func}`~scanpy.pl.dotplot`, {func}`~scanpy. ~~~{rubric} Overhaul of {func}`~scanpy.pl.dotplot`, {func}`~scanpy.pl.matrixplot`, and {func}`~scanpy.pl.stacked_violin` {pr}`1210` {smaller}`F Ramirez` ~~~ -- An overhauled tutorial {doc}`tutorials:plotting/core`. +- An overhauled tutorial {doc}`/tutorials/plotting/core`. - New plotting classes can be accessed directly (e.g., {class}`~scanpy.pl.DotPlot`) or using the `return_fig` param. diff --git a/docs/release-notes/1.7.0.md b/docs/release-notes/1.7.0.md index 69ae5fd1b0..39d4b5a06b 100644 --- a/docs/release-notes/1.7.0.md +++ b/docs/release-notes/1.7.0.md @@ -17,9 +17,9 @@ ```{rubric} External tools (new) ``` -- Add [Scanorama](https://github.com/brianhie/scanorama) integration to scanpy external API ({func}`~scanpy.external.pp.scanorama_integrate`) {cite}`Hie19` {pr}`1332` {smaller}`B Hie` -- Scrublet {cite}`Wolock19` integration: {func}`~scanpy.pp.scrublet`, {func}`~scanpy.pp.scrublet_simulate_doublets`, and plotting method {func}`~scanpy.pl.scrublet_score_distribution` {pr}`1476` {smaller}`J Manning` -- {func}`~scanpy.external.pp.hashsolo` for HTO demultiplexing {cite}`Bernstein20` {pr}`1432` {smaller}`NJ Bernstein` +- Add [Scanorama](https://github.com/brianhie/scanorama) integration to scanpy external API ({func}`~scanpy.external.pp.scanorama_integrate`) {cite-hack}`Hie19` {pr}`1332` {smaller}`B Hie` +- Scrublet {cite-hack}`Wolock19` integration: {func}`~scanpy.pp.scrublet`, {func}`~scanpy.pp.scrublet_simulate_doublets`, and plotting method {func}`~scanpy.pl.scrublet_score_distribution` {pr}`1476` {smaller}`J Manning` +- {func}`~scanpy.external.pp.hashsolo` for HTO demultiplexing {cite-hack}`Bernstein20` {pr}`1432` {smaller}`NJ Bernstein` - Added [scirpy](https://github.com/icbi-lab/scirpy) (sc-AIRR analysis) to ecosystem page {pr}`1453` {smaller}`G Sturm` - Added [scvi-tools](https://scvi-tools.org) to ecosystem page {pr}`1421` {smaller}`A Gayoso` diff --git a/docs/release-notes/1.9.0.md b/docs/release-notes/1.9.0.md index 309e85f39c..977489a34b 100644 --- a/docs/release-notes/1.9.0.md +++ b/docs/release-notes/1.9.0.md @@ -3,7 +3,7 @@ ```{rubric} Tutorials ``` -- New tutorial on the usage of Pearson Residuals: {doc}`tutorials:tutorial_pearson_residuals` {smaller}`J Lause, G Palla` +- New tutorial on the usage of Pearson Residuals: {doc}`/tutorials/experimental/pearson_residuals` {smaller}`J Lause, G Palla` - [Materials](https://github.com/scverse/scanpy-tutorials/tree/master/scanpy_workshop) and [recordings](https://www.youtube.com/playlist?list=PL4rcQcNPLZxWQQH7LlRBMkAo5NWuHX1e3) for Scanpy workshops by Maren Büttner ```{rubric} Experimental module diff --git a/docs/tutorials/basics/clustering-2017.ipynb b/docs/tutorials/basics/clustering-2017.ipynb new file mode 120000 index 0000000000..188cc47fa4 --- /dev/null +++ b/docs/tutorials/basics/clustering-2017.ipynb @@ -0,0 +1 @@ +../../../notebooks/pbmc3k.ipynb \ No newline at end of file diff --git a/docs/tutorials/basics/clustering.ipynb b/docs/tutorials/basics/clustering.ipynb new file mode 120000 index 0000000000..5048fcbfd5 --- /dev/null +++ b/docs/tutorials/basics/clustering.ipynb @@ -0,0 +1 @@ +../../../notebooks/basic-scrna-tutorial.ipynb \ No newline at end of file diff --git a/docs/tutorials/basics/index.md b/docs/tutorials/basics/index.md new file mode 100644 index 0000000000..820f925092 --- /dev/null +++ b/docs/tutorials/basics/index.md @@ -0,0 +1,9 @@ +# Basics + +```{toctree} +:maxdepth: 1 + +clustering +clustering-2017 +integrating-data-using-ingest +``` diff --git a/docs/tutorials/basics/integrating-data-using-ingest.ipynb b/docs/tutorials/basics/integrating-data-using-ingest.ipynb new file mode 120000 index 0000000000..900667fb75 --- /dev/null +++ b/docs/tutorials/basics/integrating-data-using-ingest.ipynb @@ -0,0 +1 @@ +../../../notebooks/integrating-data-using-ingest.ipynb \ No newline at end of file diff --git a/docs/tutorials/experimental/dask.ipynb b/docs/tutorials/experimental/dask.ipynb new file mode 120000 index 0000000000..627fb705d4 --- /dev/null +++ b/docs/tutorials/experimental/dask.ipynb @@ -0,0 +1 @@ +../../../notebooks/dask.ipynb \ No newline at end of file diff --git a/docs/tutorials/experimental/index.md b/docs/tutorials/experimental/index.md new file mode 100644 index 0000000000..a269c2e11f --- /dev/null +++ b/docs/tutorials/experimental/index.md @@ -0,0 +1,8 @@ +## Experimental + +```{toctree} +:maxdepth: 1 + +pearson_residuals +dask +``` diff --git a/docs/tutorials/experimental/pearson_residuals.ipynb b/docs/tutorials/experimental/pearson_residuals.ipynb new file mode 120000 index 0000000000..d1caec3010 --- /dev/null +++ b/docs/tutorials/experimental/pearson_residuals.ipynb @@ -0,0 +1 @@ +../../../notebooks/tutorial_pearson_residuals.ipynb \ No newline at end of file diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md new file mode 100644 index 0000000000..ee57056a6d --- /dev/null +++ b/docs/tutorials/index.md @@ -0,0 +1,66 @@ +# Tutorials + +:::{seealso} +For more tutorials featureing scanpy and other [scverse](https://scverse.org) ecosystem tools, check out the curated set of tutorials at [scverse.org/learn](https://scverse.org/learn) +::: + +## Basic workflows + +```{toctree} +:maxdepth: 2 + +basics/index +``` + +## Visualization + +```{toctree} +:maxdepth: 2 + +plotting/index +``` + +## Trajectory inference + +```{seealso} +For more powerful tools for analysing single cell dynamics, check out the Scverse ecosystem packages: + +* [CellRank](https://cellrank.readthedocs.io) +* [Dynamo](https://dynamo-release.readthedocs.io/en/latest/) +``` + +```{toctree} +:maxdepth: 2 + +trajectories/index +``` + +## Spatial data + +```{seealso} +For more up-to-date tutorials on working with spatial data, see: + +* [SquidPy tutorials](https://squidpy.readthedocs.io/en/stable/notebooks/tutorials/index.html) +* [SpatialData tutorials](https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks.html) +* [Scverse ecosystem spatial tutorials](https://scverse.org/learn/) +``` + +```{toctree} +:maxdepth: 2 + +spatial/index +``` + +## Experimental + +```{toctree} +:maxdepth: 2 + +experimental/index +``` + +## Older tutorials + +A number of older tutorials can be found at: + +* The [`scanpy_usage`](https://github.com/scverse/scanpy_usage) repository diff --git a/docs/tutorials/plotting/advanced.ipynb b/docs/tutorials/plotting/advanced.ipynb new file mode 120000 index 0000000000..1737cc043d --- /dev/null +++ b/docs/tutorials/plotting/advanced.ipynb @@ -0,0 +1 @@ +../../../notebooks/plotting/advanced.ipynb \ No newline at end of file diff --git a/docs/tutorials/plotting/core.ipynb b/docs/tutorials/plotting/core.ipynb new file mode 120000 index 0000000000..0fb0f04350 --- /dev/null +++ b/docs/tutorials/plotting/core.ipynb @@ -0,0 +1 @@ +../../../notebooks/plotting/core.ipynb \ No newline at end of file diff --git a/docs/tutorials/plotting/index.md b/docs/tutorials/plotting/index.md new file mode 100644 index 0000000000..62dde6990d --- /dev/null +++ b/docs/tutorials/plotting/index.md @@ -0,0 +1,8 @@ +# Plotting + +```{toctree} +:maxdepth: 1 + +core +advanced +``` diff --git a/docs/tutorials/spatial/basic-analysis.ipynb b/docs/tutorials/spatial/basic-analysis.ipynb new file mode 120000 index 0000000000..66d9e48121 --- /dev/null +++ b/docs/tutorials/spatial/basic-analysis.ipynb @@ -0,0 +1 @@ +../../../notebooks/spatial/basic-analysis.ipynb \ No newline at end of file diff --git a/docs/tutorials/spatial/index.md b/docs/tutorials/spatial/index.md new file mode 100644 index 0000000000..801b901e53 --- /dev/null +++ b/docs/tutorials/spatial/index.md @@ -0,0 +1,8 @@ +## Spatial + +```{toctree} +:maxdepth: 1 + +basic-analysis +integration-scanorama +``` diff --git a/docs/tutorials/spatial/integration-scanorama.ipynb b/docs/tutorials/spatial/integration-scanorama.ipynb new file mode 120000 index 0000000000..5143681577 --- /dev/null +++ b/docs/tutorials/spatial/integration-scanorama.ipynb @@ -0,0 +1 @@ +../../../notebooks/spatial/integration-scanorama.ipynb \ No newline at end of file diff --git a/docs/tutorials/trajectories/index.md b/docs/tutorials/trajectories/index.md new file mode 100644 index 0000000000..2b65cc9510 --- /dev/null +++ b/docs/tutorials/trajectories/index.md @@ -0,0 +1,7 @@ +## Trajectories + +```{toctree} +:maxdepth: 1 + +paga-paul15 +``` diff --git a/docs/tutorials/trajectories/paga-paul15.ipynb b/docs/tutorials/trajectories/paga-paul15.ipynb new file mode 120000 index 0000000000..fb77d3d59e --- /dev/null +++ b/docs/tutorials/trajectories/paga-paul15.ipynb @@ -0,0 +1 @@ +../../../notebooks/paga-paul15.ipynb \ No newline at end of file diff --git a/notebooks b/notebooks index 26e16f8338..22cc7cf461 160000 --- a/notebooks +++ b/notebooks @@ -1 +1 @@ -Subproject commit 26e16f83387caef76abdd42afda3c7c13f7139f1 +Subproject commit 22cc7cf46139cc8bdc2a1c7e4ec37254c8aa50ae diff --git a/pyproject.toml b/pyproject.toml index b7a00384eb..2a2578af30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,6 +122,8 @@ doc = [ "nbsphinx>=0.9", "ipython>=7.20", # for nbsphinx code highlighting "matplotlib!=3.6.1", + "sphinxcontrib-bibtex", + "setuptools", # TODO: remove necessity for being able to import doc-linked classes "dask", "scanpy[paga]", diff --git a/scanpy/datasets/_datasets.py b/scanpy/datasets/_datasets.py index f040eb7a52..0b4f333dab 100644 --- a/scanpy/datasets/_datasets.py +++ b/scanpy/datasets/_datasets.py @@ -307,7 +307,7 @@ def pbmc3k() -> ad.AnnData: def pbmc3k_processed() -> ad.AnnData: """Processed 3k PBMCs from 10x Genomics. - Processed using the basic tutorial :doc:`tutorials:pbmc3k`. + Processed using the basic tutorial :doc:`/tutorials/basics/clustering-2017`. Returns ------- diff --git a/scanpy/neighbors/__init__.py b/scanpy/neighbors/__init__.py index 0910a0883b..3f5a512160 100644 --- a/scanpy/neighbors/__init__.py +++ b/scanpy/neighbors/__init__.py @@ -104,7 +104,7 @@ def neighbors( transformer Approximate kNN search implementation following the API of :class:`~sklearn.neighbors.KNeighborsTransformer`. - See :doc:`tutorials:knn-transformers` for more details. + See :doc:`/how-to/knn-transformers` for more details. Also accepts the following known options: `None` (the default) @@ -166,7 +166,7 @@ def neighbors( See also -------- - :doc:`tutorials:knn-transformers` + :doc:`/how-to/knn-transformers` """ start = logg.info("computing neighbors") adata = adata.copy() if copy else adata diff --git a/scanpy/plotting/_tools/scatterplots.py b/scanpy/plotting/_tools/scatterplots.py index e72bc78c16..ec47f95908 100644 --- a/scanpy/plotting/_tools/scatterplots.py +++ b/scanpy/plotting/_tools/scatterplots.py @@ -989,7 +989,7 @@ def spatial( -------- :func:`scanpy.datasets.visium_sge` Example visium data. - :doc:`tutorials:spatial/basic-analysis` + :doc:`/tutorials/spatial/basic-analysis` Tutorial on spatial analysis. """ # get default image params if available diff --git a/scanpy/tools/_ingest.py b/scanpy/tools/_ingest.py index fb36b7a913..3cf9dda891 100644 --- a/scanpy/tools/_ingest.py +++ b/scanpy/tools/_ingest.py @@ -45,7 +45,7 @@ def ingest( """\ Map labels and embeddings from reference data to new data. - :doc:`tutorials:integrating-data-using-ingest` + :doc:`/tutorials/basics/integrating-data-using-ingest` Integrates embeddings and annotations of an `adata` with a reference dataset `adata_ref` through projecting on a PCA (or alternate