Skip to main content

A Landmark-based Approach for Generating Multi-cellular Sample Embeddings from Single-cell Data

Project description

PyPI version Documentation Status scLKME

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:

scLKME workflow figure

Installation

scLKME requires python version >= 3.8, < 3.11.

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:

  • Multi-species: here
  • Preterm: here
  • Myocardial Infarction: here

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 Open In Colab
Landmark-based multi-sample single-cell data analysis Open In Colab

Citation

TBD

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

sclkme-0.9.2.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

sclkme-0.9.2-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file sclkme-0.9.2.tar.gz.

File metadata

  • Download URL: sclkme-0.9.2.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/21.6.0

File hashes

Hashes for sclkme-0.9.2.tar.gz
Algorithm Hash digest
SHA256 c7c60cedff07ab50080b92cb3cb7f16c8ebd93b9afc606eb5c78b710bb3711c4
MD5 5ba229f6190acc2f931cd4e2b3d4224d
BLAKE2b-256 c75fbe989ace671d726e0d4600003fa8705f62ade0142a4593b3a7eaf76b80c0

See more details on using hashes here.

File details

Details for the file sclkme-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: sclkme-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/21.6.0

File hashes

Hashes for sclkme-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74390a85f9780acdc0e058a164b87072492be87dfc2324048433b6f7f79e630e
MD5 9286fa73b25467d5b8b4575bffc633b6
BLAKE2b-256 f8b54a50172a8a7f5928d6d9a70b864451d3d310a3ddd0c71828c658c64984da

See more details on using hashes here.

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