Metadata-Version: 2.3
Name: insitupy-spatial
Version: 0.8.7
Summary: Package introducing the InSituPy framework to analyze single-cell spatial transcriptomics data.
License: BSD-3-Clause
Author: Johannes Wirth
Author-email: jwrth <j.wirth@tum.de>
Requires-Python: >=3.10.0,<3.11.0
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: adjusttext (>=1.3.0,<2.0.0)
Requires-Dist: dask (>=2025.3.0,<2026.0.0)
Requires-Dist: dask-geopandas (>=0.4.2)
Requires-Dist: dask-image (>=2023.8.1)
Requires-Dist: fastparquet (>=2023.10.1)
Requires-Dist: fiona (>=1.10.1)
Requires-Dist: geopandas (>=1.0.1)
Requires-Dist: imagecodecs (>=2024.12.30)
Requires-Dist: napari[all] (>=0.5.6)
Requires-Dist: numpy (>=2.1.3,<3.0.0)
Requires-Dist: opencv-python (>=4.8.0.76)
Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
Requires-Dist: parse (>=1.19.1)
Requires-Dist: plottable (==0.1.5)
Requires-Dist: pyarrow (>=14.0.1)
Requires-Dist: pytest (>=7.4.2)
Requires-Dist: scanpy[leiden] (>=1.10.3,<2.0.0)
Requires-Dist: scikit-image (>=0.21.0,<1.0.0)
Requires-Dist: scikit-misc (>=0.3.1)
Requires-Dist: toml (>=0.10.2,<1.0.0)
Requires-Dist: tornado (>=6.5.0)
Requires-Dist: xmltodict (>=0.13.0)
Requires-Dist: zarr (>=2.16.1,<3.0.0)
Description-Content-Type: text/markdown

# InSituPy: A framework for histology-guided, multi-sample  analysis of single-cell spatial transcriptomics data

<p align="center">
   <img src="https://github.com/SpatialPathology/InSituPy/blob/main/docs/source/_static/img/insitupy_logo_with_name_wo_bg.png?raw=true" width="500">
</p>

InSituPy is a Python package designed to facilitate the analysis of single-cell spatial transcriptomics data. With InSituPy, you can easily load, visualize, and analyze the data, enabling and simplifying the comprehensive exploration of spatial gene expression patterns within tissue sections and across multiple samples.
Currently the analysis is focused on data from the [_Xenium In Situ_](https://www.10xgenomics.com/platforms/xenium) methodology but a broader range of reading functions will be implemented in the future.

## Latest changes

*!!!Warning: This repository is under very active development and it cannot be ruled out that changes might impair backwards compatibility. If you observe any such thing, please feel free to contact us to solve the problem. Thanks!*

For the latest developments check out the [releases](https://github.com/SpatialPathology/InSituPy/releases).

## Getting started

### Documentation

For detailed instructions on using InSituPy, refer to the [official documentation](https://InSituPy.readthedocs.io).

InSituPy works best within *Jupyter Lab* or *Jupyter Notebook* sessions. If you are not familiar with these platforms, see the documentation of [Project Jupyter](https://jupyter.org/).

## Installation

**Create and activate a conda environment:**

   ```bash
   conda create --name insitupy python=3.10
   conda activate insitupy
   ```

**Install from PyPi:**

   ```bash
   pip install insitupy-spatial
   ```

Make sure you have Conda installed on your system before proceeding with these steps. If not, you can install Miniconda or Anaconda from [https://docs.conda.io/en/latest/miniconda.html](https://docs.conda.io/en/latest/miniconda.html).

To ensure that the InSituPy package is available as a kernel in Jupyter notebooks within your conda environment, you can follow the instructions [here](https://ipython.readthedocs.io/en/stable/install/kernel_install.html). 

For alternative installation strategies see the [documentation](https://insitupy.readthedocs.io/en/latest/installation.html).


## Features

- **Data Preprocessing:** InSituPy provides functions for normalizing, filtering, and transforming raw in situ transcriptomics data.
- **Interactive Visualization:** Create interactive plots using [napari](https://napari.org/stable/#) to easily explore spatial gene expression patterns.
- **Annotation:** Annotate _Xenium In Situ_ data in the napari viewer or import annotations from external tools like [QuPath](https://qupath.github.io/).
- **Multi-sample analysis:** Perform analysis on an experiment-level, i.e. with multiple samples at once.

## Contributing

Contributions are welcome! If you find any issues or have suggestions for new features, please open an [issue](https://github.com/SpatialPathology/InSituPy/issues) or submit a pull request.

## Citation

If you use `InSituPy` in your work, please cite the [preprint](https://www.biorxiv.org/content/10.1101/2025.03.07.641860v1) as follows:

> InSituPy – A Framework for Histology-Guided, Multi-Sample Analysis of Single-Cell Spatial Transcriptomics Data. <br>Wirth, Johannes, Anna Chernysheva, Birthe Lemke, Isabel Giray, Aitana Egea Lavandera, and Katja Steiger.<br>
bioRxiv, March 12, 2025. https://doi.org/10.1101/2025.03.07.641860.

## License

InSituPy is licensed under the [BSD-3-Clause](LICENSE).

---

**InSituPy** is developed and maintained by [Johannes Wirth](https://github.com/jwrth) and [Anna Chernysheva](https://github.com/annachernysheva179). Feedback is highly appreciated and hopefully **InSituPy** helps you with your analysis of spatial transcriptomics data. The package is thought to be a starting point to simplify the analysis of in situ sequencing data in Python and it would be exciting to integrate functionalities for larger and more comprehensive data structures. Currently, the framework focuses on the analysis of _Xenium In Situ_ data but it is planned to integrate more methodologies and any support on this is highly welcomed.

