caokai1073 / uniPort

a unified single-cell data integration framework by optimal transport
MIT License
30 stars 3 forks source link

license-badge PyPI version docs-badge Downloads Downloads

The original paper: A unified single-cell data integration framework with optimal transport

Website and documentation: https://uniport.readthedocs.io

Source Code (MIT): https://github.com/caokai1073/uniport

Author's Homepage: www.caokai.site

Overview

Installation

The uniport package can be installed via pip3:

pip3 install uniport

Tutorials

Please checkout the documentations and tutorials for more information at uniport.readthedocs.io.

Main function: uniport.Run()

Key parameters includes:

Data

Example

import uniport as up
import scanpy as sc

# HVG: highly variable genes
adata1 = sc.read_h5ad('adata1.h5ad') # preprocessed data with data1 specific HVG
adata2 = sc.read_h5ad('adata2.h5ad') # preprocessed data with data2 specific HVG, as reference data
adata_cm = sc.read_h5ad('adata_cm.h5ad') # preprocesssed data with common HVG

# integration with both common and dataset-specific genes
# latent representation are stored in adata.obs['latent']
adata = up.Run(adatas=[adata1, adata2], adata_cm=adata_cm)
# save global optimal transport matrix: adata, OT = up.Run(adatas=[adata1, adata2], adata_cm=adata_cm, save_OT=True)
# integration with only common genes: adata = up.Run(adata_cm=adata_cm)

Citation

@Article{Cao2022,
author={Cao, Kai and Gong, Qiyu and Hong, Yiguang and Wan, Lin},
title={A unified computational framework for single-cell data integration with optimal transport},
journal={Nature Communications},
year={2022},
month={Dec},
day={01},
volume={13},
number={1},
pages={7419},
issn={2041-1723},
doi={10.1038/s41467-022-35094-8}}

Contact via caokai1073@gmail.com