GitHub - caokai1073/Pamona: The software of Pamona, a partial manifold alignment algorithm. (original) (raw)

Pamona

Paper

Manifold alignment for heterogeneous single-cell multi-omics data integration using Pamona

The implementation is based on UnionCom and SCOT.

Enviroment

python >= 3.6

numpy >= 1.18.5
scikit-learn >= 0.23.2
umap-learn >= 0.3.10
Cython >= 0.29.21
scipy >= 1.4.1
matplotlib >= 3.3.1
POT >= 0.7.0

Install

Pamona software is available on the Python package index (PyPI), latest version 0.0.1. To install it using pip, simply type:

Integrate data

Each row should contain the measured values for a single cell, and each column should contain the values of a feature across cells.

from pamona import Pamona import numpy as np data1 = np.loadtxt("./scGEM/methylation_partial.txt") data2 = np.loadtxt("./scGEM/expression_partial.txt") type1 = np.loadtxt("./scGEM/methylation_type_partial.txt") type2 = np.loadtxt("./scGEM/expression_type_partial.txt") type1 = type1.astype(np.int) type2 = type2.astype(np.int) Pa = Pamona.Pamona(n_shared=[138], Lambda=10, output_dim=5) # shared cell number 138 is estimated by SPL integrated_data, T = Pa.run_Pamona([data1, data2]) Pa.test_LabelTA(integrated_data[0],integrated_data[-1],type1,type2) Pa.alignment_score(integrated_data[0], integrated_data[-1][0:142], data2_specific=integrated_data[-1][142:177]) Pa.Visualize([data1,data2], integrated_data, mode='UMAP') # without datatype Pa.Visualize([data1,data2], integrated_data, [type1,type2], mode='UMAP') # with datatype

mode: ["PCA", "TSNE", "UMAP"], default as "PCA".

Example of disagreement matrix of prior information

If cell types are available, users can incorporate the information as follows

gamma = 0.5 # gamma is a parameter, ranges from 0 to 1.

A larger gamma gives more importance to the matching of prior information.

DM = np.ones((len(data1), len(data2))) for i in range(len(data1)): for j in range(len(data2)): if type1[i] == type2[j]: DM[i][j] = gamma ... Pa = Pamona.Pamona(..., M=DM, ...)

Examples on simualtions and real data sets (jupyter notebook)

Parameters of class Pamona

The list of parameters is given below:

The other parameters include:

Contact via caokai@amss.ac.cn