Metadata-Version: 2.1
Name: scenvi
Version: 0.2.2
Summary: Integration of scRNA-seq and spatial transcriptomics data
License: MIT
Author: Doron Haviv
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: clu (==0.0.10)
Requires-Dist: flax (==0.7.5)
Requires-Dist: tensorfow_probability (==0.22.0)
Requires-Dist: tqdm (>=4.66.1,<5.0.0)
Description-Content-Type: text/markdown

PyENVI for Python3
======================


ENVI is a deep learnining based variational inference method to integrate scRNAseq with spatial sequencing data. 
It creates a combined latent space for both data modalities, from which missing gene can be imputed from spatial data, cell types labels can be transfered
and the spatial niche can be reconstructed for the dissociated scRNAseq 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 --upgrade "jax[cuda11_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:

    from scenvi import ENVI
    
    envi_model = ENVI.ENVI(spatial_data = st_data, sc_data = sc_data)
    
    envi_model.train()
    envi_model.impute_genes()
    envi_model.infer_niche()
     
    
    st_data.obsm['envi_latent'] = envi_model.spatial_data.obsm['envi_latent']
    st_data.obsm['COVET'] = envi_model.spatial_data.obsm['COVET']
    st_data.obsm['COVET_SQRT'] = envi_model.spatial_data.obsm['COVET_SQRT']
    st_data.uns['COVET_genes'] =  envi_model.CovGenes
    st_data.obsm['imputation'] = envi_model.spatial_data.obsm['imputation']

    sc_data.obsm['envi_latent'] = envi_model.sc_data.obsm['envi_latent']
    sc_data.obsm['COVET'] = envi_model.sc_data.obsm['COVET']
    sc_data.obsm['COVET_SQRT'] = envi_model.sc_data.obsm['COVET_SQRT']
    sc_data.uns['COVET_genes'] =  envi_model.CovGenes

