Integration of scRNA-seq and spatial transcriptomics data
Project description
ENVI & COVET
ENVI is a deep learnining based variational inference method to integrate scRNA-seq with spatial transcriptomics data. ENVI learns to reconstruct spatial onto for dissociated scRNA-seq data and impute unimagd genes onto spatial data.
This implementation is written in Python3 and relies on jax, flax, sklearn, scipy and scanpy.
To install JAX, simply run the command:
pip install -U "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
And to install ENVI along with the rest of the requirements:
pip install scenvi
To run ENVI:
import scenvi
envi_model = scenvi.ENVI(spatial_data = st_data, sc_data = sc_data)
envi_model.train()
envi_model.impute_genes()
envi_model.infer_niche_covet()
envi_model.infer_niche_celltype()
st_data.obsm['envi_latent'] = envi_model.spatial_data.obsm['envi_latent']
st_data.uns['COVET_genes'] = envi_model.CovGenes
st_data.obsm['COVET'] = envi_model.spatial_data.obsm['COVET']
st_data.obsm['COVET_SQRT'] = envi_model.spatial_data.obsm['COVET_SQRT']
st_data.obsm['cell_type_niche'] = envi_model.spatial_data.obsm['cell_type_niche']
st_data.obsm['imputation'] = envi_model.spatial_data.obsm['imputation']
sc_data.obsm['envi_latent'] = envi_model.sc_data.obsm['envi_latent']
sc_data.uns['COVET_genes'] = envi_model.CovGenes
sc_data.obsm['COVET'] = envi_model.sc_data.obsm['COVET']
sc_data.obsm['COVET_SQRT'] = envi_model.sc_data.obsm['COVET_SQRT']
sc_data.obsm['cell_type_niche'] = envi_model.sc_data.obsm['cell_type_niche']
And to just compute COVET for spatial data:
st_data.obsm['COVET'], st_data.obsm['COVET_SQRT'], st_data.uns['CovGenes'] = scenvi.compute_covet(st_data)
Please read our documentation and see a full tutorial at https://scenvi.readthedocs.io/.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file scenvi-0.3.7.tar.gz
.
File metadata
- Download URL: scenvi-0.3.7.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/3.10.0-1160.45.1.el7.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcbcafca7a7e213e60c0ae1cc246e583a350762802035a6d18c1d35b593d5c71 |
|
MD5 | b9e98c1309e74b7196e1f4b6e4e88c37 |
|
BLAKE2b-256 | 03d10fdc234b715c8f169f4f7d769dc8c89801c08d05d6045addcf17dbc70a49 |
File details
Details for the file scenvi-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: scenvi-0.3.7-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/3.10.0-1160.45.1.el7.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dedff284afb3716954c16b2536ea798577687a17242676d4ae8c82e802d15928 |
|
MD5 | 63214361faf52dfb107a16b43da0dadd |
|
BLAKE2b-256 | cef29c023b03479800ce753e590dd8558c8fdaffddeda6d0806830d95f154a2f |