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
You can install the iVAE package using:
pip install iVAE.
This repository is hosted at iVAE GitHub Repository.
Usage
Customizing Parameters
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 theget_iembed()function.latent.npy: Contains the output from theget_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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iVAE-0.0.1.tar.gz.
File metadata
- Download URL: iVAE-0.0.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd2af6299be806a77a6ef1b9ef517548d08473405f4a65a7e8d5e9f487a509ca
|
|
| MD5 |
2160917268aef5dd8bc328677d6b6724
|
|
| BLAKE2b-256 |
4eee8c8fd17d9c700aa71ac70d839fbb8d14afc304ffbc66c4db3f478edd6a55
|
File details
Details for the file iVAE-0.0.1-py3-none-any.whl.
File metadata
- Download URL: iVAE-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03cfe27b7e078617505e4198990e93dae828e2c0f9c442a175285de6bdcba19d
|
|
| MD5 |
e30af9fddf75c7f90b5b4f52b77b5201
|
|
| BLAKE2b-256 |
08c7d703de88c8c5c1372767330460948d000b9f7b839ce2abc543b60c38342a
|