Metadata-Version: 2.3
Name: scenvi
Version: 0.3.8
Summary: Integration of scRNA-seq and spatial transcpriptomics 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
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: clu (>=0.0.11,<0.0.12)
Requires-Dist: flax (>=0.10.4,<0.11.0)
Requires-Dist: optax (>=0.2.4,<0.3.0)
Requires-Dist: scanpy (>=1.11.0,<2.0.0)
Requires-Dist: tensorflow_probability (>=0.22.0,<0.23.0)
Requires-Dist: tqdm (>=4.66.1,<5.0.0)
Description-Content-Type: text/markdown

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/.

