Skip to main content

Identifying multiscale tissue domains for spatial transcriptomic data using persistent homology.

Project description

PHD-MS: Persistent Homology for Domains at Multiple Scales

Multiscale domain identification for spatial transcriptomic data.

Installation

Simply install with pip:

pip install phd_ms

Or install from source by downloading, cd to this directory, using:

pip install .

Usage/Examples

Detailed jupyter notebook tutorials are available in the examples folder. Or simply download the file titled 'point_and_click.py' and run the file to use our clickable graphical interface. When using the point_and_click.py interface, update the directory where your data is stored by changing this line:

DATA = '/home/pbeamer/Documents/graphst/visium_hne_graphst'

Here we'll show a simple example with Visium DLPFC data, using default parameters. First, import necessary components.

import phd-ms
import scanpy

Preprocessing steps here (note that we assume a spatially-aware embedding has already been computed for your data):

INPUT_FILE= '/home/pbeamer/Documents/graphst/adata_151673.h5ad'
phd_ms.tl.preprocess_leiden(INPUT_FILE,output_file=INPUT_FILE)

Compute persistent homology and plot 10 most prominent multiscale domains:

cluster_complex,clusterings= phd_ms.tl.cluster_filtration(adata)
phd_ms.tl.map_multiscale(adata.obsm['spatial'],cluster_complex,clusterings,num_domains=10)

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

phd_ms-1.2.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phd_ms-1.2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file phd_ms-1.2.tar.gz.

File metadata

  • Download URL: phd_ms-1.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for phd_ms-1.2.tar.gz
Algorithm Hash digest
SHA256 ad220bce22ec88cc6152d955c8ae38d7af96d4938f99fa7cc66522576f2fd4f3
MD5 e1aae05f0cb54e6f2cb9fffe8f858a77
BLAKE2b-256 8c5ddac301e0ecafb524d736850128f40d2fd862e09f4602c6b1cb68b1a996f6

See more details on using hashes here.

File details

Details for the file phd_ms-1.2-py3-none-any.whl.

File metadata

  • Download URL: phd_ms-1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for phd_ms-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef369cc8956f862a5160c30f8628627ad92887256341b0fe7712daf1d4563a52
MD5 73f5997ee64a7350d3aa3f0e37363544
BLAKE2b-256 9b63aa4fa6c81813757ecdbf99a955d80de702dd16b492ff9ed9bc28e9ba8fc4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page