YSMR

Bacterial video tracking and analysis

Installation

Dependencies

Python 3.5 or higher

Packages:

Optional:

Files in this package:

Usage

When first executed, ysmr() will set up a tracking.ini file, which it will then open and stop executing. We advise that you test the program afterwards with an example video to check basic functionality. Afterwards, you should go through the tracking.ini file and update the values for ‘pixel per micrometre’, ‘frames per second’, ‘frame width’, ‘frame height’ and ‘rod shaped bacteria’ before using it with your own video files. You will then see if further tweaks are needed.

For initial setup, we recommend to enable both the the ‘debugging’ and ‘display video analysis’ options and having a look at the various displayed conversion steps during tracking. This helps choosing better values for both ‘threshold offset for detection’ and ‘adaptive double threshold’.

We strongly recommend asserting the validity of the generated results by generating some values by other means and directly comparing them to the ones generated by YSMR during initial setup. Other means could include tracking manually or using other tracking programs. Using the ‘save video’

Explanation of tracking.ini file

Explanation of each setting in the tracking.ini file and the initial default setting. The tracking.ini file will be newly generated when missing or if it cannot be loaded correctly. The location of the file is assumed to be in the folder in which a script using ysmr() is executed, but ysmr() can take the location of the tracking.ini file as an optional argument.

BASIC RECORDING SETTINGS
BASIC TRACK DATA ANALYSIS SETTINGS
DISPLAY SETTINGS
RESULTS SETTINGS
PLOT Y-AXIS LIMIT
LOGGING SETTINGS
ADVANCED VIDEO SETTINGS
ADVANCED TRACK DATA ANALYSIS SETTINGS
GAUSSIAN-SUM FIR FILTER SETTINGS
HOUSEKEEPING
TEST SETTINGS

Citation

@article{Schwanbeck2020,
abstract = {BACKGROUND Motility in bacteria forms the basis for taxis and is in some pathogenic bacteria important for virulence. Video tracking of motile bacteria allows the monitoring of bacterial swimming behaviour and taxis on the level of individual cells, which is a prerequisite to study the underlying molecular mechanisms. RESULTS The open-source python program YSMR (Your Software for Motility Recognition) was designed to simultaneously track a large number of bacterial cells on standard computers from video files in various formats. In order to cope with the high number of tracked objects, we use a simple detection and tracking approach based on grey-value and position, followed by stringent selection against suspicious data points. The generated data can be used for statistical analyses either directly with YSMR or with external programs. CONCLUSION In contrast to existing video tracking software, which either requires expensive computer hardware or only tracks a limited number of bacteria for a few seconds, YSMR is an open-source program which allows the 2-D tracking of several hundred objects over at least 5 minutes on standard computer hardware. The code is freely available at https://github.com/schwanbeck/YSMR.},
author = {Schwanbeck, Julian and Oehmig, Ines and Dretzke, Jer{\^{o}}me and Zautner, Andreas E and Gro{\ss}, Uwe and Bohne, Wolfgang},
doi = {10.1186/s12859-020-3495-9},
issn = {1471-2105},
journal = {BMC Bioinformatics},
keywords = {2D object tracking,Bacterial motility,Multi-object tracking,Open-source software,Python,Video microscopy,Video tracking,openCV},
month = {apr},
number = {1},
pages = {166},
pmid = {32349658},
publisher = {BMC Bioinformatics},
title = ,
url = {https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-020-3495-9 http://www.ncbi.nlm.nih.gov/pubmed/32349658},
volume = {21},
year = {2020}
}

Acknowledgements

We would like to thank Prof. Burkhard Morgenstern for reading the manuscript and supporting the project. We would like to thank Avril von Hoyningen-Huene for proofreading and providing corrections for the manuscript. The original tracker.py was taken with permission from Adrian Rosebrock (adrian@pyimagesearch.com) from https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/