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
Note that vima requires pytorch and harmonypy. These should install automatically through pip, but if you have trouble, try installing them first, verifying that they work, and then installing vima.
demo
To get started with an example analysis on a toy spatial transcriptomics dataset, take a look at our brief demo. You can see a completed read-only version or run an interactive version yourself on a Google Colab GPU (though this requires Colab Pro due to insufficient memory provided on the free tier.)
To see how to apply vima to a stain-based modality like CODEX, immunohistochemistry, or immunofluorescence, look at our immunofluorescence demo.
citation
If you use vima, please cite:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vima_spatial-0.2.6.tar.gz.
File metadata
- Download URL: vima_spatial-0.2.6.tar.gz
- Upload date:
- Size: 62.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
062d2772bcfce40cacaad1e6487d8783652ee2497fd40750c82d87d83d33b941
|
|
| MD5 |
2f6dd8a102636516827f57e6230241a8
|
|
| BLAKE2b-256 |
74886f8cc078bab1b4c1719722a492a99f4d60e80ddda525e71de0882d20815e
|
File details
Details for the file vima_spatial-0.2.6-py3-none-any.whl.
File metadata
- Download URL: vima_spatial-0.2.6-py3-none-any.whl
- Upload date:
- Size: 72.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
450f898d607405e1f04cb7dd423286fc7c8dfda2085d02c8828d52cd62dd4f79
|
|
| MD5 |
90f089dc93de2601bc04448160f7c376
|
|
| BLAKE2b-256 |
e6d979547f548c94ef222390d4e3fe541bdd8148d532418882fd178ec4dc365e
|