Skip to main content

Integration of scRNA-seq and spatial transcpriptomics 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]"

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scenvi-0.4.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scenvi-0.4.2-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file scenvi-0.4.2.tar.gz.

File metadata

  • Download URL: scenvi-0.4.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for scenvi-0.4.2.tar.gz
Algorithm Hash digest
SHA256 39ee021b22cf6b2f5b975e290ff43c5c205ecc4d349b41dd985e887993203e1b
MD5 25a77af453b38dc37589d1c0ca1a75f9
BLAKE2b-256 c973dc8cf76e816e8da2a58815edc6167e32cf261a7e78c0db58ee5d515c5464

See more details on using hashes here.

File details

Details for the file scenvi-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: scenvi-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for scenvi-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2eab25dc8b7ded417f51ffd0f7616016dd8be7496c3923b01bff7677eab33cc2
MD5 a837f39101efc9fb276fdfe184e5b42f
BLAKE2b-256 9ab7b0285e3bade564124d063f9b6bb34ae6dd686f1d842565f91ae2748214d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page