Metadata-Version: 2.4
Name: vima-spatial
Version: 0.2.0
Summary: variational inference-based microniche analysis
Home-page: https://github.com/yakirr/vima
Author: Yakir Reshef
Author-email: yreshef@broadinstitute.org
Project-URL: Bug Tracker, https://github.com/yakirr/vima/issues
Project-URL: Tutorial, https://github.com/yakirr/vima/blob/main/README.md
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12.3
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.3.0
Requires-Dist: torchvision>=0.18.0
Requires-Dist: anndata>=0.10.7
Requires-Dist: harmonypy>=2.0.0
Requires-Dist: matplotlib
Requires-Dist: numpy>=1.26.4
Requires-Dist: scanpy
Requires-Dist: opencv-python-headless>=4.10
Requires-Dist: xarray
Requires-Dist: netcdf4
Requires-Dist: seaborn
Requires-Dist: pandas>=2.2.3
Requires-Dist: scipy
Requires-Dist: cna>=0.2.3
Requires-Dist: tqdm
Requires-Dist: pyarrow
Requires-Dist: scikit-image
Requires-Dist: IPython

# vima
Variational inference-based microniche analysis is a method for conducting case-control analysis on multi-sample spatial molecular datasets. `vima` can be applied to any spatially resolved molecular technology, is well powered even at the modest sample sizes typical of research cohorts, and avoids traditional, parameter-intensive preprocessing steps such as cell segmentation or clustering of cells into discrete cell types. It works by treating each spatial sample as an image and using a variational autoencoder to extract numerical "fingerprints" from small tissue patches that capture their biological content. It uses these fingerprints to define a large number of "microniches" – small, potentially overlapping groups of tissue patches with highly similar biology that span multiple samples. It then uses rigorous permutation testing to identify microniches whose abundance correlates significantly with case-control status after accounting for multiple testing.

## installation
`vima` can be installed via `pip` as follows:
   ```
   pip install vima-spatial
   ```

## demo
Take a look at our [demo](https://github.com/yakirr/vima/blob/main/demo/demo_IF.ipynb) to see how to get started with an example analysis. We plan to put up demos for other data modalities in the future.

## citation
If you use `vima`, please cite:

[Y. Reshef, et al. Powerful and accurate case-control analysis of spatial molecular data. bioRxiv. https://doi.org/10.1101/2025.02.07.637149v1](https://www.biorxiv.org/content/10.1101/2025.02.07.637149v2).
