Skip to main content

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

Project description

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.

scLKME including its dependencies can be installed via PyPI by running:

pip install sclkme

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

Citation

Blank

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

Uploaded Source

Built Distribution

sclkme-0.9.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sclkme-0.9.0.tar.gz
  • Upload date:
  • Size: 12.7 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.0.tar.gz
Algorithm Hash digest
SHA256 138c6496f96fcf8180bdc9eb10cbf9268191186feadeb63b70870df2506cd189
MD5 dac62e5926b04832968094a5f9fa516a
BLAKE2b-256 3e44c380cadac2ab1c70d3232484b05ae2be557f546c2debbcb09ff32adece6b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sclkme-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c21c5d1e8334ea81aed128b5ebf20eb8b504fed41171c776c6970ffa3ab8a454
MD5 7f5fa15bf0252fa177f16ac58e773e27
BLAKE2b-256 140cc93a987d0b4e5315549e73613d58ba2b55894b66f3ce2eeb837a65b63445

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