Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Scalable Visualization of Massive Single-Cell DataUsing Neural Networks

Project description

Build Status Documentation Status

This is an applicable version for NeuralEE.

  1. The datasets loading and preprocessing module is modified from scVI.
  2. Define NeuralEE class and some auxiliary function, mainly for cuda computation, except like entropic affinity calculation which is quite faster computed on cpu.
  3. General elastic embedding algorithm on cuda is given based on matlab code from Max Vladymyrov.
  4. Add some demos of notebook helping to reproduce.

Installation

  1. Install Python 3.7.
  2. 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.
  3. 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

NeuralEE of HEMATO

BRAIN LARGE

NeuralEE of 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.

Filename, size & hash SHA256 hash help File type Python version Upload date
neuralee-0.1.3-py2.py3-none-any.whl (37.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
neuralee-0.1.3.tar.gz (30.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page