A package for point pattern analysis: Pattern Extraction from Relative Positions of Localisations
Project description
PERPL
Pattern Extraction from Relative Positions of Localisations
PERPL infers structure that is not directly visible in point-cloud data, including when data is sparse relative to the underlying structure. It was initially developed for localisation microscopy, but is also applicable to other point-cloud data.
PERPL works by computing pairwise relative positions between data points in a relative position distribution (RPD). It compares this experimental RPD with RPDs generated from candidate model structures and assists in final model selection.
Originally developed at the University of Leeds.
Citation
If you use PERPL in your work, please cite:
Curd, A. P., Leng, J., Hughes, R. E., Cleasby, A. J., Rogers, B., Trinh, C. H., Baird, M. A., Takagi, Y., Tiede, C., Sieben, C., Manley, S., Schlichthaerle, T., Jungmann, R., Ries, J., Shroff, H., & Peckham, M. Nanoscale Pattern Extraction from Relative Positions of Sparse 3D Localizations. Nano Letters 2021, 21 (3), 1213–1220. https://doi.org/10.1021/acs.nanolett.0c03332
BibTeX
@article{curd2021perpl,
title = {Nanoscale Pattern Extraction from Relative Positions of Sparse 3D Localizations},
author = {Curd, Alistair P. and Leng, Joanna and Hughes, Ruth E. and Cleasby, Alexa J. and Rogers, Brendan and Trinh, Chi H. and Baird, Michelle A. and Takagi, Yasuharu and Tiede, Christian and Sieben, Christian and Manley, Suliana and Schlichthaerle, Thomas and Jungmann, Ralf and Ries, Jonas and Shroff, Hari and Peckham, Michelle},
journal = {Nano Letters},
year = {2021},
volume = {21},
number = {3},
pages = {1213--1220},
doi = {10.1021/acs.nanolett.0c03332}
}
Installation
Requires Python 3.11+ (e.g. in a new conda environment)
pip install perpl for released versions
or
Download or clone this repository and pip install .
Tested on Linux and Windows
Quick start
Input data should be a table of 2D or 3D data points in a CSV file, with one row per data point. The first columns must contain the X and Y coordinates (and Z for 3D data).
- Collect 2D (
-d 2) relative positions with filter distance (-f) 200:
relpos -i INPUT_DATA.csv -d 2 -f 200
- Example analysis: radial symmetry modelling from the RPD. This uses output from the
relposcommand:
rotsym2d -i RPD_DATA.csv
Output is generated in new subdirectories in the input directories.
HTML reports are generated alongside the output files.
Usage
Run relpos -h or rotsym2d -h to see available command-line options.
The -s flag can be used to shorten output path if this becomes a problem in Windows.
Output is generated in a subdirectory to the directory containing the input data/RPD data.
relpos/relative_positions.py generates the set of 2D/3D relative positions, plots of distance histograms and an HTML report.
Here is one of the distance histograms for data from a nuclear pore complex protein (located around a ring of approx. 100 nm diameter):
rotsym2d/rot_2d_symm_fit.py generates visualisations of fitted structures and fit results, and an HTML report containing detailed fit results and comparisons of different orders of symmetry.
Here is a plot with the fits to model RPDs with different orders of symmetry:
Core components
relpos(relative_positions.py): computes relative positions and generates distance histograms and reports.modelling/modelling_general.py: contains the class and functions for building and fitting models.
See src/perpl/ for additional modules including structural model implementations.
Automation
Scripts are provided in dev/, with README, for procedural data preparation and model generation, fitting and comparison.
Data
The original test data for this software and examples with which the software can be used, can be found at
https://bitbucket.org/apcurd/perpl_test_data.
Documentation
More detailed documentation is available in dev/old-readme.md and will be improved in future releases.
Notebooks
See notebooks/ for interactive examples, developed from work reported here.
Authors
Alistair Curd, Oliver Umney, Joanna Leng
License
Apache License 2.0 — see LICENSE file 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 perpl-1.2.0.tar.gz.
File metadata
- Download URL: perpl-1.2.0.tar.gz
- Upload date:
- Size: 118.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d28336f05b64bb566015dd011f3bb0c845afd02e94cc536548986e88d5adb0b6
|
|
| MD5 |
e9775b18dd71b22175f513fd1a8f66fe
|
|
| BLAKE2b-256 |
c7ebef3642842d77eec50496f30a21af94392b939689e617989d3bafbbee913b
|
Provenance
The following attestation bundles were made for perpl-1.2.0.tar.gz:
Publisher:
release.yml on AlistairCurd/PERPL-Python3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perpl-1.2.0.tar.gz -
Subject digest:
d28336f05b64bb566015dd011f3bb0c845afd02e94cc536548986e88d5adb0b6 - Sigstore transparency entry: 1538460709
- Sigstore integration time:
-
Permalink:
AlistairCurd/PERPL-Python3@b8b81cae939fb4bf303b65aa333fb41f83bd0423 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/AlistairCurd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b8b81cae939fb4bf303b65aa333fb41f83bd0423 -
Trigger Event:
push
-
Statement type:
File details
Details for the file perpl-1.2.0-py3-none-any.whl.
File metadata
- Download URL: perpl-1.2.0-py3-none-any.whl
- Upload date:
- Size: 92.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f275dcba4ad0a43e36de807a1625f1aaaecc810606920ae04122ebaf0e431ac3
|
|
| MD5 |
17dd0551edf0597bce849d4590cb36d1
|
|
| BLAKE2b-256 |
9363ca43e1dfb8c713df77af85ddc60dc039ea6f8371ba61414a6876b40a2029
|
Provenance
The following attestation bundles were made for perpl-1.2.0-py3-none-any.whl:
Publisher:
release.yml on AlistairCurd/PERPL-Python3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perpl-1.2.0-py3-none-any.whl -
Subject digest:
f275dcba4ad0a43e36de807a1625f1aaaecc810606920ae04122ebaf0e431ac3 - Sigstore transparency entry: 1538460784
- Sigstore integration time:
-
Permalink:
AlistairCurd/PERPL-Python3@b8b81cae939fb4bf303b65aa333fb41f83bd0423 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/AlistairCurd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b8b81cae939fb4bf303b65aa333fb41f83bd0423 -
Trigger Event:
push
-
Statement type: