A Landmark-based Approach for Generating Multi-cellular Sample Embeddings from Single-cell Data
Project description
scLKME
A Landmark-based Approach for Generating Multi-cellular Sample Embeddings from Single-cell Data
Introduction
scLKME is a computational approach designed for generating sample embeddings in multi-sample single-cell data. scLKME models samples as cell distributions, and leverages lanbmark-based kernel mean embedding to generate a sample-by-landmark kernel matrix as sample embeddings. The workflow of scLKME is as follows:
Installation
scLKME requires python
version >= 3.8, < 3.12.
scLKME
including its dependencies can be installed via PyPI by running:
pip install sclkme
Data
All the datasets used in this study are shared via .h5ad
format. The datasets are available at:
Get started
scLKME
's apis are designed to be compatible with the scanpy's ecosystem. To use scLKME
, here is a basic example:
import sclkme
import scanpy as sc
n_sketch= 128
sample_id = "sample_id"
adata = sc.read_h5ad("path_to_h5ad_data")
sclkme.tl.sketch(adata, n_sketch=n_sketch)
X_anchor = adata[adata.obs['sketch']].X.copy()
sclkme.tl.kernel_mean_embedding(adata, partition_key="sample_id", X_anchor=X_anchor)
# sample_embedding
adata.uns['kme'][f'{sample_id}_kme']
For more details, examples and tutorials, check our document.
Run on a cloud platform
Tutorials | Colab |
---|---|
Cell Sketching | |
Landmark-based multi-sample single-cell data analysis |
Citation
@article{yi2023sclkme,
title={scLKME: A Landmark-based Approach for Generating Multi-cellular Sample Embeddings from Single-cell Data},
author={Yi, Haidong and Stanley, Natalie},
journal={bioRxiv},
pages={2023--11},
year={2023},
publisher={Cold Spring Harbor Laboratory}
}
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 sclkme-0.9.4.tar.gz
.
File metadata
- Download URL: sclkme-0.9.4.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c16c21ac4211ebe2eb42909199bdc6d9e1ede3fee26201567d12b3ea854c6da |
|
MD5 | 1efde41b9c5e6cc682c1013c6f6c4674 |
|
BLAKE2b-256 | 029c34faf401bb2b4442462bd40e08b92712020c052b2516129e1f4ab4343e4b |
File details
Details for the file sclkme-0.9.4-py3-none-any.whl
.
File metadata
- Download URL: sclkme-0.9.4-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e964878e9b2936feb3511b95f37720bcb9b33d7faa44bd7793b1a563d9162bf |
|
MD5 | 3363150e6a18292847f2b7ae4b2b76bc |
|
BLAKE2b-256 | 488bfcc054f6d8f684dc8ebffb1ed0401d34388e12e81e80637266017671242c |