A python tool to investigate cell overlaps in imaging-based spatial transcriptomics data.
Project description
A python tool to investigate vertical signal properties of imaging-based spatial transcriptomics data.
introduction
Much of spatial biology uses microscopic tissue slices to study the spatial distribution of cells and molecules. In the process, tissue slices are often interpreted as 2D representations of 3D biological structures - which can introduce artefacts and inconsistencies in the data whenever structures overlap in the thin vertical dimension of the slice:
Ovrl.py is a quality-control tool for spatial transcriptomics data that can help analysts find sources of vertical signal inconsistency in their data. It is works with imaging-based spatial transcriptomics data, such as 10x genomics' Xenium or vizgen's MERSCOPE platforms. The main feature of the tool is the production of 'signal integrity maps' that can help analysts identify sources of signal inconsistency in their data. Users can also use the built-in 3D visualisation tool to explore regions of signal inconsistency in their data on a molecular level.
installation
ovrlpy can be installed from PyPI or
bioconda
# install from PyPI
pip install ovrlpy
# or install from bioconda
conda install bioconda::ovrlpy
quickstart
The simplest use case of ovrlpy is the creation of a signal integrity map from a spatial transcriptomics dataset. In a first step, we define a number of parameters for the analysis:
import pandas as pd
import ovrlpy
# define ovrlpy analysis parameters
n_components = 20 # number pf PCA components
# load the data
coordinate_df = pd.read_csv('path/to/coordinate_file.csv')
coordinate_df.head()
the coordinate dataframe should contain a gene, x, y, and z column.
you can then fit an ovrlpy model to the data and create a signal integrity map:
# fit the ovrlpy model to the data
dataset = ovrlpy.Ovrlp(
coordinate_df,
n_components=n_components,
n_workers=4, # number of threads to use for processing
)
dataset.analyse()
after fitting we can visualize the data ...
fig = ovrlpy.plot_pseudocells(dataset)
... and the signal integrity map
fig = ovrlpy.plot_signal_integrity(dataset, signal_threshold=4)
Ovrlpy can also identify individual overlap events in the data:
doublets = dataset.detect_doublets(min_signal=4, integrity_sigma=1)
And plot a multi-view visualization of the overlaps in the tissue:
# Which doublet do you want to visualize?
doublet_to_show = 0
x, y = doublets["x", "y"].row(doublet_to_show)
fig = ovrlpy.plot_region_of_interest(dataset, x, y, window_size=50)
parameter selection
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovrlpy-1.1.0.tar.gz.
File metadata
- Download URL: ovrlpy-1.1.0.tar.gz
- Upload date:
- Size: 8.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
781f794f0711bbf5ddbc9c10bafc89f38db6363102a7c157a78c9b1968721483
|
|
| MD5 |
03e1aaa09cbc1d7b6f089fea8f600bb1
|
|
| BLAKE2b-256 |
e9e804de3893528346f5d95846e83fa7ff9ed7f02a6a3060d294d9aad96d38e6
|
Provenance
The following attestation bundles were made for ovrlpy-1.1.0.tar.gz:
Publisher:
publish-pypi.yml on HiDiHlabs/ovrl.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ovrlpy-1.1.0.tar.gz -
Subject digest:
781f794f0711bbf5ddbc9c10bafc89f38db6363102a7c157a78c9b1968721483 - Sigstore transparency entry: 862225809
- Sigstore integration time:
-
Permalink:
HiDiHlabs/ovrl.py@b9f79e0287f12ff319f36c8c247791cc8d10128a -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/HiDiHlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b9f79e0287f12ff319f36c8c247791cc8d10128a -
Trigger Event:
release
-
Statement type:
File details
Details for the file ovrlpy-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ovrlpy-1.1.0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ecfd11f180b9959244fa77b80d069f78560f009159c0f21394ae293cb4c66c5
|
|
| MD5 |
01071e45e3a2124314fb362cc28319d7
|
|
| BLAKE2b-256 |
d22f2a5f21827567ac5d3e88b0dd65173571fa1e059cb730dcaaa621c29378cf
|
Provenance
The following attestation bundles were made for ovrlpy-1.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on HiDiHlabs/ovrl.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ovrlpy-1.1.0-py3-none-any.whl -
Subject digest:
5ecfd11f180b9959244fa77b80d069f78560f009159c0f21394ae293cb4c66c5 - Sigstore transparency entry: 862225856
- Sigstore integration time:
-
Permalink:
HiDiHlabs/ovrl.py@b9f79e0287f12ff319f36c8c247791cc8d10128a -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/HiDiHlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b9f79e0287f12ff319f36c8c247791cc8d10128a -
Trigger Event:
release
-
Statement type: