Skip to main content

Package used to analyse spatial transcriptomics data with build in segmentation and information transfer

Project description

scSpatial

This software aims to allow analysis of spatial omics data by integrating segmentation methods and information transfer methods in a graphical UI. Interactions with your images are allowed by the multi dimentional image viewer Napari. This package provides segmentation of the cells and mapping of gene expression data. This is controlled by a widget in the Napari viewer.

1. Segmentation

For high resolution gene expression analysis, where the exact position of a gene is known (such as in HybISS), segmentation of the cells are critical to allow cell level analysis of gene expression. We include several options for cell segmentation:

  • Segmentation using Cellpose (nuclei)
  • Segmentation using Cellpose (cytoplasm)
  • Loading of 3rd party segmentation (ImageJ, Ilastik, CellProfiler etc.)

Cellpose can be used with data including only nuclei staining or images with both nuclei and cytoplasm markers. To achive high gene mapping ratios, segmentation using cytoplasm markers are prefered! When loading 3rd party segmentation images, these should have unique pixel values for each object in the segmentation, with the value 0 reserved for background.

2. Information transfer

With a segmented image, it is possible to map genes to objects (cells) creating a table with gene expression for each object. This information is similar to the data in scRNA-seq datasets, and information transfer between a reference dataset and the spatial mapping can be performed using the Tangram method. Here we have implemented the BoneFight modification from Linnarssons lab which allows for cell cluster based computation.

3. Visualization

Currently, we support visualization of gene expression and cell type prediction. This section will be expanded as new tools are implemented.

Getting started

Installation

Install Miniconda or Anaconda and create a virtual environment with python 3.7 and activate it.

conda create -n scSpatial python=3.7
conda activate scSpatial

Install scSpatial using pip:

pip install scSpatial

Running napari with the scSpatial widget

To open Napari with the scSpatial widget, run the scSpatial command in the terminal:

scSpatial

If you want to start napari from within your own pipeline/script, import the scSpatial.app.App class and instantiate it.

from scSpatial.app import App
app = App()

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

scSpatial-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

scSpatial-0.1.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file scSpatial-0.1.0.tar.gz.

File metadata

  • Download URL: scSpatial-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.12

File hashes

Hashes for scSpatial-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f371b76890b929365dc799ac9357d156703fe70e7b0f7297020107919bb523e7
MD5 d97fe3962cb898f0a3a6025f78b9e088
BLAKE2b-256 0d268a9814b7cc4ccff83b8392721b9d2440f7dc1f162b29ed76063ce9952886

See more details on using hashes here.

File details

Details for the file scSpatial-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scSpatial-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.12

File hashes

Hashes for scSpatial-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63d094046ad94a62621a675e112e33a0a4e3329d8f2fa84f6a38488cc7a0e119
MD5 34945462e00f67e93838cce27923aa18
BLAKE2b-256 125c91dfb5dcce8dc3674e2e19221df0af0db918fd2e23fb82e69f26191a8f89

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