An Accessible Python Framework for Real-Time Magnetic Tweezers Microscope Control and Image Processing
Preprint
Abstract
Magnetic tweezers are a popular biophysical instrument for manipulating and measuring single molecules. Most groups rely on custom-built setups tailored to specific experiments, making it challenging to implement and share software. Typically, image acquisition and hardware control are automated via LabVIEW, while real-time video processing is implemented in C++/CUDA libraries. Live processing can eliminate the need to store raw video, enabling high throughput, fast acquisition rates, and simplified experimental workflows. However, no open-source general-purpose software framework currently unifies these capabilities for magnetic tweezers experiments. Here, we introduce MagTrack and MagScope open-source Python-based tools designed to fill this gap. MagTrack is an image-processing library that efficiently determines bead-positions from magnetic-tweezers videos using CPU and/or GPU computation. MagScope is a comprehensive software framework offering a graphical user interface, real-time hardware control, data acquisition, and video processing. It is built on a multiprocessing architecture for responsive, high-throughput computation. Together, MagTrack and MagScope offer a fully customizable, end-to-end, open-source Python alternative to proprietary or fragmented systems, enabling laboratories to adapt and extend the framework according to their experimental needs.Keywords
Funding Information
- Huntington's Disease Society of America (1485211)
- National Institutes of Health (CA067007)
- National Institutes of Health (AI150496)
- National Institutes of Health (GM150003)
This publication has 37 references indexed in Scilit:
- Exploring force-driven stochastic folding dynamics in mechano-responsive proteins and implications in phenotypic variationNature Communications, 2025
- An Introduction to Magnetic Tweezers2023
- Multiplex flow magnetic tweezers reveal rare enzymatic events with single molecule precisionNature Communications, 2020
- Array programming with NumPyNature, 2020
- High Spatiotemporal-Resolution Magnetic Tweezers: Calibration and Applications for DNA DynamicsBiophysical Journal, 2015
- Extending the Range for Force Calibration in Magnetic TweezersBiophysical Journal, 2015
- Camera-based three-dimensional real-time particle tracking at kHz rates and Ångström accuracyNature Communications, 2015
- Non-Bias-Limited Tracking of Spherical Particles, Enabling Nanometer Resolution at Low MagnificationBiophysical Journal, 2012
- Single-molecule force spectroscopy: optical tweezers, magnetic tweezers and atomic force microscopyNature Methods, 2008
- Magnetic Tweezers: Micromanipulation and Force Measurement at the Molecular LevelBiophysical Journal, 2002