Many parasites have the ability to manipulate the behavior of their hosts. Copepods and especially one of their parasites, the tapeworm Schistocephalus solidus have been used repeatedly to study this phenome. Copepod can easily be maintained in individual wells of 24-well plates and their behavior recorded by filming these plates from above. However, tracking individual copepods in these recordings manually is very time consuming. This tool was custom made to provide a faster and less work intensive means to track copepod position and hence provide information on copepod behavior within hours rather than weeks after the recording.
Recordings for this process were obtained by filming the wells with copepod from above for 15 minutes following a small drop by a few millimeters that served to simulate a failed predator attack. Using the freeware ImageJ, one image every two seconds was then extracted from these videos and the resulting image sequence saved as individual .png images which could be analyzed with the current approach.
In order to do so, initially the mid-point of each well (containing an individual copepod) was automatically localized and an area around it of 130 by 130 pixels (containing only one well) extracted in each image to obtain individual sequences for each well. Subsequently, for each well an average image over all images for this well was calculated and subtracted from each individual image for this well. On the resulting images, the maximum difference between the average image and each individual image could easily be identified. It corresponds to copepod position since the copepod is the only moving object within each well. During subsequent analysis, a copepod was only considered moving if it moved by at least 5 pixel (about one copepod length) to avoid random noise being interpreted as a copepod movement.
-
Videos need to be provided as an image sequence in .png format
-
wellFinder.py
- Localizes and separates individual wells
- python wells.py FOLDER
- FOLDER should be a folder containing the image sequences (each image sequence within a subfolder) to be analyzed
- Correct localization of wells can be verified by accessing the debug folder within FOLDER
- localizationMinDiff.py
- Localizes the position of each copepod in each image
- python localizationMinDiff.py FOLDER
- FOLDER should be a folder containing the image sequences (each image sequence within a subfolder) and, within each image sequence subfolder folders for each individual well and a debug folder created by wellFinder.py. There should be nothing else in these image sequence subfolders. Ideally, FOLDER is the same folder used by wellFinder.py with no subsequent manual changes.
- The results are written into .txt files within folder with one file returned for each well
- plotResults.py
- Plots the previously obtained position of each copepod onto each image for manual verification
- In the same directory that contains the folder with the previously analyzed images (FOLDER) create a new folder “check_results”.
- python plotResults.py FOLDER
- FOLDER should be a folder containing an individual subfolder for each image sequence and, within each image sequence subfolder folders for each individual well created by wellFinder.py as well as the .”txt” files generated by localizationMinDiff.py. Additionally it may contain the debug folder created by wellFinder.py and the original images of that sequence. Ideally, FOLDER is the same folder used by wellFinder.py and localizationMinDiff.py with no subsequent manual changes.
- Within the check_results folder, plotResults.py creates a WELLNAMEplot folder which contains the extracted well for each image within the provided sequence with the localized object annotated. This can be checked for correct localization visually
- Hafer, Nina. "Differences between populations in host manipulation by the tapeworm Schistocephalus solidus–is there local adaptation?." Parasitology 145.6 (2018): 762-769.
- Hafer-Hahmann, Nina. "Experimental evolution of parasitic host manipulation." Proceedings of the Royal Society B 286.1895 (2019): 20182413.