Skip to main content

Probabilistic cell typing for spatial transcriptomics

Project description

pciSeq: Probabilistic Cell typing by In situ Sequencing

A Python package that implements the cell calling algorithm as described in [Qian, X., et al. Nature Methods (2020)]

screenshot

Installation

pip install pciSeq

Requirement: Python >= 3.7

Usage

You need to create two pandas dataframes for the spots and the single cell data and a coo_matrix for the label image (which in most cases will be the output of some image segmentation application). Then you pass them into the pciSeq.fit() method as follows:

import pciSeq

res = pciSeq.fit(spots_df, label_image, scRNA_df)

See the demo below for a more detailed explanation about the arguments of pciSeq.fit() and its return values.

There is also a fourth argument (optional) to override the default hyperparameter values which are initialised by the config.py module. To pass user-defined hyperparameter values, create a dictionary with keys the hyperparameter names and values their new values. For example, to exclude all Npy and Vip spots you can do:

import pciSeq

opts = { 'exclude_genes': ['Npy', 'Vip'] }
res = pciSeq.fit(spots_df, label_image, scRNA_df, opts)

Demo

You can run a pciSeq demo in google colab: Open In Colab

Visualizer

An interactive viewer to interrogate the data runs on this url. Instructions about building this viewer with your own data are here.

References

Qian, X., et al. (2020). Probabilistic cell typing enables fine mapping of closely related cell types in situ. Nat Methods 17, 101 - 106.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pciSeq-0.0.45-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file pciSeq-0.0.45-py3-none-any.whl.

File metadata

  • Download URL: pciSeq-0.0.45-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.6

File hashes

Hashes for pciSeq-0.0.45-py3-none-any.whl
Algorithm Hash digest
SHA256 bf3eb1dad0c8e0f7b2a135e32c93bb10fcbad9cce93bd6f970b00a25e134a6ef
MD5 c6258fc40a7d581865fd5ebcd75408f4
BLAKE2b-256 f9b8daaaa33aadc8d1eb3f82b6554ab0ff062d425855ee3684ec1b3e6af66a1b

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