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.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sclkme-0.9.1.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.1.tar.gz
Algorithm Hash digest
SHA256 039a3176e80705bd36d1adb0ea606f6e512305c6c188ebc98c971843d0ed59b2
MD5 374a397b734a63e78e0a1a8316edc26f
BLAKE2b-256 fbc14f78653ea7924cfa561bee9a1c6185c4ec55ecfcc66349e57d3bfa1e8fee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sclkme-0.9.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39de319c5ebb77497a5e34c08e45ac037bb125669a7ede6e0ed10b30028d1398
MD5 809f115af2126f1fc5d95200f96a5998
BLAKE2b-256 a21c2f8acd5a04012e525252407dc8b74b69c242dac5af858091ee50a43edb49

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