Skip to main content

Interpretable Variational Autoencoder for Single-Cell Data

Project description

About

iVAE is an enhanced representation learning method designed for capturing lineage features and gene expression patterns in single-cell transcriptomics. Compared to a standard VAE, iVAE incorporates a pivotal interpretative module that increases the correlation between latent components. This enhanced correlation helps the model learn gene expression patterns in single-cell data where correlations are present.

Installation

PyPI

You can install the iVAE package using:

pip install iVAE

This repository is hosted at iVAE GitHub Repository.

Usage

You can customize the behavior of the script by providing additional arguments:

  • --epochs: Number of training epochs (default: 1000)
  • --layer: Layer to use from the AnnData object (default: 'counts')
  • --percent: Percent parameter value (default: 0.01)
  • --irecon: Irecon parameter value (default: 0.0)
  • --beta: Beta parameter value (default: 1.0)
  • --dip: Dip parameter value (default: 0.0)
  • --tc: TC parameter value (default: 0.0)
  • --info: Info parameter value (default: 0.0)
  • --hidden_dim: Hidden dimension size (default: 128)
  • --latent_dim: Latent dimension size (default: 10)
  • --i_dim: i dimension size (default: 2)
  • --lr: Learning rate (default: 1e-4)
  • --data_path: Path to the data file (default: 'data.h5ad')
  • --output_dir: Directory to save the results (default: 'iVAE_output')

Example of running with custom parameters:

iVAE --epochs 500 --layer 'counts' --data_path 'path/to/your/data.h5ad' --output_dir 'iVAE_output'

Output

After running the script, the latent space representations are saved in the specified output directory (iVAE_output by default):

  • iembed.npy: Contains the output from the get_iembed() function.
  • latent.npy: Contains the output from the get_latent() function.

These files are NumPy arrays that can be loaded using numpy.load() for further analysis.

Example of Loading Output Data

You can load and analyze the output data using the following Python code:

import numpy as np

# Load the iembed data
iembed = np.load('iVAE_output/iembed.npy')

# Load the latent data
latent = np.load('iVAE_output/latent.npy')

# Perform your analysis
print("iembed shape:", iembed.shape)
print("latent shape:", latent.shape)

License

PyPI

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or issues, please contact Zeyu Fu at fuzeyu99@126.com.


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

iVAE-0.0.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

iVAE-0.0.3-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file iVAE-0.0.3.tar.gz.

File metadata

  • Download URL: iVAE-0.0.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for iVAE-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0cae21725d38cae9499440c6e3c125c41bb2161a44ae649bf08dabfc6a7f9295
MD5 fb8c1a3d6869113134828812f1ea64bf
BLAKE2b-256 a9a5a33d0fe2ed0828b0b9ea06e0a7b461cbe8d4ca7a2715fc79302e5fb8396a

See more details on using hashes here.

File details

Details for the file iVAE-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: iVAE-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for iVAE-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b24393deeefca4702a46ad1c26eb4ac36a8493ff238e0fc41263abd8fcc9332f
MD5 58dbcb39d94e357c909ca6cd5a0a16b1
BLAKE2b-256 ee4e7ef44b993b69f829a730665b2c2bcc3371d38a921c8b1e28c86afda415fa

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