A Bayesian optimization framework for multimodal registration of highly multiplexed single-cell spatial proteomics data
Project description
Twocan
A Bayesian optimization framework for multimodal registration of highly multiplexed single-cell spatial proteomics data
Overview
Twocan automatically finds optimal parameters for registering images from different spatial proteomics technologies using Bayesian optimization. Instead of manually tuning preprocessing and registration parameters, Twocan efficiently explores the parameter space to find the best registration for your data.
Key Features:
- 🔧 Automated parameter optimization for image registration
- 🧠 Bayesian optimization via Optuna for efficient search
- 🔬 Support for multiple spatial proteomics modalities (IF, IMC, FISH, IMS)
- 📊 Built-in quality metrics and visualization tools
- 🎯 Extensible framework for custom objectives and preprocessors
Quick Start
Installation
# Install from PyPI
pip install twocan
# Or install from source
git clone https://github.com/camlab-bioml/twocan.git
cd twocan
pip install .
Basic Usage
import twocan as tc
# Load your images
moving_img = tc.read_image("moving.tif")
fixed_img = tc.read_image("fixed.tif")
# Create estimator and optimize
estimator = tc.RegEstimator(moving_img, fixed_img)
study = estimator.optimize(n_trials=100)
# Get best transformation
best_transform = tc.pick_best_registration(study)
Documentation
Examples & Notebooks
Check out the notebooks/ directory for comprehensive examples:
- Basic registration with default settings
- Custom preprocessing for different modalities
- Advanced optimization strategies
- Saving and loading registration results
Citation
If you use Twocan in your research, please cite:
@software{harrigan2024twocan,
title={Twocan: A Bayesian optimization framework for multimodal registration},
author={Harrigan, Caitlin F.},
year={2024},
url={https://github.com/camlab-bioml/twocan}
}
License
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License - see the LICENSE file for details.
Support
- 📖 Documentation: twocan.readthedocs.io
- 📧 Contact: kierancampbell@lunenfeld.ca
- 🐛 Issues: GitHub Issues
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 twocan-0.1.2.tar.gz.
File metadata
- Download URL: twocan-0.1.2.tar.gz
- Upload date:
- Size: 80.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cee0667fa39ce1c2a89ec67a0edc128757ca9e64fe75e8e3a03a3f23f99d2bbd
|
|
| MD5 |
0ac0258e5fb8a7152b2d71b9ff5a250e
|
|
| BLAKE2b-256 |
f6c689e6776dc1a0efd5a49128940ed2713c6c554e5595387e49611a45a416a8
|
File details
Details for the file twocan-0.1.2-py3-none-any.whl.
File metadata
- Download URL: twocan-0.1.2-py3-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381d7a8dda7dcb3d100f8a7ccc5bdc85235cacab1abd6aeb9dc5d610bd4865e0
|
|
| MD5 |
d75db8e4ddfff224f2b643617fa77793
|
|
| BLAKE2b-256 |
98f71b1dc1e80831667d8af38773e51d2a61ec82ec79016226d3a774dcb68a34
|