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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sclkme-0.9.3.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.3.tar.gz
Algorithm Hash digest
SHA256 df8a4c9aa33703ed2039ee918fc9dd3ae8aa8e504cb4609ec55f090335ad6696
MD5 1c5681d46f893a197b5426527d7d7851
BLAKE2b-256 bc29dd908d7bcaed9d62b5d3adfe5091d57c603ead0c60ca3396672ceac663e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sclkme-0.9.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9be98a2283070ef9835088c3a7da98539db0b9a28048121b0d43ab20f5b63d1a
MD5 8548a468da1480dfdad03c4bfa0b61df
BLAKE2b-256 e00c849e3fabb08a84a9d63416cda8390c31c8747f2976cd406486b210d8939b

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