Scalable Visualization of Massive Single-Cell DataUsing Neural Networks
Project description
This is an applicable version for NeuralEE.
The datasets loading and preprocessing module is modified from scVI.
Define NeuralEE class and some auxiliary function, mainly for cuda computation, except like entropic affinity calculation which is quite faster computed on cpu.
General elastic embedding algorithm on cuda is given based on matlab code from Max Vladymyrov.
Add some demos of notebook helping to reproduce.
Installation
Install Python 3.7.
Install PyTorch. If you have an NVIDIA GPU, be sure to install a version of PyTorch that supports it. NeuralEE runs much faster with a discrete GPU.
Install NeuralEE through pip or from GitHub:
pip install neuralee
git clone git://github.com/HiBearME/NeuralEE.git
cd NeuralEE
python setup.py install --user
How to use NeuralEE
from neuralee.dataset import CortexDataset
from neuralee.embedding import NeuralEE
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# preprocess dataset
cortex_dataset = CortexDataset(save_path='../data/')
cortex_dataset.log_shift()
cortex_dataset.subsample_genes(558)
cortex_dataset.standardscale()
cortex_dataset.affinity()
NEE = NeuralEE(cortex_dataset, device=device)
results = NEE.EE() # Elastic embedding results.
results_Neural = NEE.fine_tune() # NeuralEE results.
# with 'mini-batch' trick
cortex_dataset.affinity_split(N_small=0.25)
NEE = NeuralEE(cortex_dataset, device=device)
results_Neural_with4batches = NEE.fine_tune()
Reproduction. Reference from notebook files.
Examples
HEMATO
BRAIN LARGE
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
File details
Details for the file neuralee-0.1.3.tar.gz
.
File metadata
- Download URL: neuralee-0.1.3.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224d16a5e3ef58a974654a3d0bf44128949a7a2fdc7a4a76eb3bb2e2b9781f09 |
|
MD5 | 2d6890fff7cc7fc895dd207e2e869102 |
|
BLAKE2b-256 | 10b95935e8e578cc04c360f4c02a89e0612d021dcf65318eb783d4165cd39d48 |
File details
Details for the file neuralee-0.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: neuralee-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 37.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a5f30044d6c40ec6a9d1664cf64341935b9fd4d38872176f46c32b4a738919e |
|
MD5 | 90ab218552adcb7bce5c4d5c54e3484f |
|
BLAKE2b-256 | a7ecc61a58607b62d06cfd587d198ff1b7673054629a2a9ea8468d0feba73005 |