<!-- images can have any resolution, but need to have ratio W x H = 3 x 2 -->

# Tutorials

Notebooks tailored to showcase specific functionalities of the SpatialData ecosystem.
See the bottom of this page for links to analysis tutorials for external methods that use `SpatialData` as a data model.

## Basic

```{eval-rst}
.. grid:: 2 3 3 3

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/intro.png
                :target: notebooks/examples/intro.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/intro.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/transformations.jpg
                :target: notebooks/examples/transformations.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/transformations.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/spatial_query.jpg
                :target: notebooks/examples/spatial_query.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/spatial_query.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/napari_rois.jpg
                :target: notebooks/examples/napari_rois.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/napari_rois.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/alignment_using_landmarks.png
                :target: notebooks/examples/alignment_using_landmarks.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/alignment_using_landmarks.ipynb
```

## Intermediate

```{eval-rst}
.. grid:: 2 3 3 3

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/intro.png
                :target: notebooks/examples/sdata_from_scratch.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/sdata_from_scratch.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/table.png
                :target: notebooks/examples/tables.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/tables.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/table_queries.png
                :target: notebooks/examples/table_queries.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/table-queries.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/models1.png
                :target: notebooks/examples/models1.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/models1.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/models2.png
                :target: notebooks/examples/models2.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/models2.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/aggregation.jpg
                :target: notebooks/examples/aggregation.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/aggregation.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/interchangeability_labels_polygons.png
                :target: notebooks/examples/labels_shapes_interchangeability.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/labels_shapes_interchangeability.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/squidpy_integration.jpg
                :target: notebooks/examples/squidpy_integration.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/squidpy_integration.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/densenet.png
                :target: notebooks/examples/densenet.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/densenet.ipynb

```

## Technology-specific

Many different technologies can be visualised out-of-the-box. See below for a couple of examples. See the [example datasets](datasets/README.md) for additional technologies represented in SpatialData.

```{eval-rst}
.. grid:: 2 3 3 3

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/visium.png
                :target: notebooks/examples/technology_visium.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_visium.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/mibitof.png
                :target: notebooks/examples/technology_mibitof.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_mibitof.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/merfish.png
                :target: notebooks/examples/technology_merfish.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_merfish.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/visium_hd.jpg
                :target: notebooks/examples/technology_visium_hd.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_visium_hd.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/visium_hd_4.0.1.jpg
                :target: notebooks/examples/technology_visium_hd_mouse_4.0.1.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_visium_hd_mouse_4.0.1.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/xenium.png
                :target: notebooks/examples/technology_xenium.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_xenium.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/spacem_helanih3t3.png
                :target: notebooks/examples/technology_spacem.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/technology_spacem.ipynb

```

## Advanced

Advanced tutorials that showcase more complex functionalities of the SpatialData ecosystem.

```{eval-rst}
.. grid:: 2 3 3 3

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/speed.png
                :target: notebooks/examples/speed_up_illustration.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/speed_up_illustration.ipynb

    .. grid-item::

        .. container:: custom-card

            .. image:: _static/img/transformations.jpg
                :target: notebooks/examples/transformations_advanced.html

            .. toctree::
                :maxdepth: 1

                notebooks/examples/transformations_advanced.ipynb

```

## External tutorials

Links to the tutorials for (some) external analysis methods that use `SpatialData` as a data model.

Methods:

- [Squidpy: Spatial Single Cell Analysis in Python](https://squidpy.readthedocs.io/en/stable/)
- [SPArrOW: A library for Spatial Transcriptomics Data Analysis](https://sparrow-pipeline.readthedocs.io/en/latest/)
- [SOPA: Spatial-omics pipeline and analysis](https://gustaveroussy.github.io/sopa/)
- [Bento: a toolkit for subcellular analysis of spatial transcriptomics data](https://bento-tools.readthedocs.io/en/latest/tutorial_gallery/Main_Guide.html)

Workshop tutorials:

- [A hands-on introduction into the analysis of targeted spatial transcriptomics data using the SPArrOW pipeline developed by the Yvan Saeys group (VIB)](https://github.com/vibspatial/targeted_transcriptomics_training)
