Skip to main content

integration

Project description

scbean.VIPCCA

Documentation Status PyPI

Variational inference of probabilistic canonical correlation analysis

introduction......

............

Create conda enviroment

$ conda create -n scbean python=3.6
$ conda activate scbean

For more information, see https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/environments.html

Install VIPCCA from pypi

$ pip install scbean

Install VIPCCA from GitHub source code

$ git clone https://github.com/jhu99/scbean.git
$ cd ./scbean/
$ pip install .

Note: Please make sure that the pip is for python>=3.6. The current release depends on tensorflow with version 1.15.4. Install tenserfolow-gpu if gpu is avialable on the machine.

Usage

https://vipcca.readthedocs.io/en/latest/

Quick Start

Download example data at http://141.211.10.196/result/test/papers/vipcca/data.tar.gz

import scbean.vipcca as vip
from scbean import preprocessing as pp
from scbean import plotting as pl

# read single-cell data.
adata_b1 = pp.read_sc_data("./data/mixed_cell_lines/293t.h5ad", batch_name="293t")
adata_b2 = pp.read_sc_data("./data/mixed_cell_lines/jurkat.h5ad", batch_name="jurkat")
adata_b3 = pp.read_sc_data("./data/mixed_cell_lines/mixed.h5ad", batch_name="mixed")

# pp.preprocessing include filteration, log-TPM normalization, selection of highly variable genes.
adata_all= pp.preprocessing([adata_b1, adata_b2, adata_b3])

# VIPCCA will train the neural network on the provided datasets.
handle = vp.VIPCCA(
							adata_all,
							res_path='./results/CVAE_5/',
							split_by="_batch",
							epochs=100,
							lambda_regulizer=5,
							)

# transform user's single-cell data into shared low-dimensional space and recover gene expression.
adata_integrate=handle.fit_transform()

# Visualization
pl.run_embedding(adata_integrate, path='./results/CVAE_5/',method="umap")
pl.plotEmbedding(adata_integrate, path='./results/CVAE_5/', method='umap', group_by="_batch",legend_loc="right margin")
pl.plotEmbedding(adata_integrate, path='./results/CVAE_5/', method='umap', group_by="celltype",legend_loc="on data")

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

scbean-0.2.6.tar.gz (1.9 MB view hashes)

Uploaded Source

Built Distribution

scbean-0.2.6-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page