Spatial Glycomics Analysis Toolkit — MALDI imaging + H&E registration and analysis.
Project description
goatpy — Spatial Glycomics Analysis Toolkit
goatpy is a Python toolkit for spatial glycomics analysis, combining MALDI mass spectrometry imaging with H&E histology. It provides automatic image registration, pseudo-image generation, spatial PCA, and annotation tools built on top of the SpatialData framework.
Features
- Automatic H&E registration — align MALDI ion images to whole-slide H&E images using normalised cross-correlation with full 360° rotation search
- QuPath annotation support — transform GeoJSON annotations from QuPath into the registered coordinate system
- Spatial GraphPCA — dimensionality reduction with optional spatial smoothing via k-nearest-neighbour graphs
- Pseudo-image generation — create spatial images from categorical or continuous obs columns
- Landmark alignment GUI — interactive napari-based landmark alignment tool
- SpatialData native — all outputs are standard
SpatialDataobjects, compatible with the scverse ecosystem
Installation
Recommended: conda environment
Download environment.yml and create the environment:
conda env create -f environment.yml
conda activate maldi
pip install goatpy
PyPI
pip install goatpy
For napari visualisation support:
pip install "goatpy[napari]"
From source
pip install git+https://github.com/agc888/goatpy.git
Quick start
import goatpy as gp
# Load and register MALDI + H&E
sdata = gp.load_and_align(
imzml_path="my_sample.imzML",
he_path="my_sample.svs",
geojson_path="annotations.geojson", # optional QuPath annotations
)
# Normalise intensities
sdata = gp.normalize_spatialdata(sdata, table_name="maldi_adata", method="TIC")
# Dimensionality reduction
sdata = gp.graphpca_spatialdata(sdata, n_components=30, alpha=0.5)
# Cluster
sdata = gp.get_kmean_clusters(sdata, n_clusters=8)
# Visualise in napari
from napari_spatialdata import Interactive
Interactive([sdata]).run()
Documentation
Full documentation is available at goatpy.readthedocs.io.
Citation
If you use goatpy in your research, please cite:
Causer, A. (2025). goatpy: Spatial Glycomics Analysis Toolkit. https://github.com/agc888/goatpy
License
MIT — see LICENSE for details.
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 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 goatpy-0.1.0.tar.gz.
File metadata
- Download URL: goatpy-0.1.0.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc3d0ac105ceedb36546404f7b6a46b35a4a1fa9f14a6f4fe0321b096ad6bc6
|
|
| MD5 |
31805032ef2cee94364db09e243b3f0d
|
|
| BLAKE2b-256 |
f05234175cefbe85423291d3554a0d8dcc1e68c29ce5652682303f6cd4903d0d
|
Provenance
The following attestation bundles were made for goatpy-0.1.0.tar.gz:
Publisher:
publish.yaml on agc888/goatpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
goatpy-0.1.0.tar.gz -
Subject digest:
bcc3d0ac105ceedb36546404f7b6a46b35a4a1fa9f14a6f4fe0321b096ad6bc6 - Sigstore transparency entry: 1239251427
- Sigstore integration time:
-
Permalink:
agc888/goatpy@2a2c750a680d5d5c7c6cfae93db05978128d0ac8 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/agc888
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2a2c750a680d5d5c7c6cfae93db05978128d0ac8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file goatpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: goatpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.3 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 |
040e30e85e5aa49d09387feb1605dd7cd976a01489cb06e20f28140bf99f363b
|
|
| MD5 |
4806f1fa353130f1b84883812345e1a5
|
|
| BLAKE2b-256 |
4b05c3e080b3a70c9754d648aa38ca7058933d05867a9142619cd793fbaaf60c
|
Provenance
The following attestation bundles were made for goatpy-0.1.0-py3-none-any.whl:
Publisher:
publish.yaml on agc888/goatpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
goatpy-0.1.0-py3-none-any.whl -
Subject digest:
040e30e85e5aa49d09387feb1605dd7cd976a01489cb06e20f28140bf99f363b - Sigstore transparency entry: 1239251429
- Sigstore integration time:
-
Permalink:
agc888/goatpy@2a2c750a680d5d5c7c6cfae93db05978128d0ac8 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/agc888
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2a2c750a680d5d5c7c6cfae93db05978128d0ac8 -
Trigger Event:
push
-
Statement type: