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.
Usage
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.2.tar.gz
.
File metadata
- Download URL: neuralee-0.1.2.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69203862eb79f954790f71bab83561fe1669920ab013126f7ddbd3c42d6b2e92 |
|
MD5 | c254dc3d56c6a440783369954803eab8 |
|
BLAKE2b-256 | fcfc8f10578d5981c57f05d88b15e91c724236f59f438b0eb3b578d430668cab |
File details
Details for the file neuralee-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: neuralee-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bce852c98d4efd601ce04486df4d75d37142869284636c4bbf301dfc39e68f4b |
|
MD5 | 7e926bd4fb3450072b172600f3123db7 |
|
BLAKE2b-256 | da4f2f90e17c54a72a4eba88f016700297b6400858ed20db117f608571e0da56 |