Abstract
A fully automatic detection and analysis method of heartbeats in videos of nonfixed and nonanesthetized zebrafish embryos is presented. This method reduces the manual workload and time needed for preparation and imaging of the zebrafish embryos, as well as for evaluating heartbeat parameters such as frequency, beat-to-beat intervals, and arrhythmicity. The method is validated by a comparison of the results from automatic and manual detection of the heart rates of wild-type zebrafish embryos 36–120 h postfertilization and of embryonic hearts with bradycardia and pauses in the cardiac contraction.
Introduction
During the last decade, the zebrafish (Danio rerio) has emerged as an indispensable vertebrate model organism in drug discovery1 and drugs known to cause QT prolongation; hence, bradycardia in humans shows similar effects in zebrafish embryonic hearts.2 In addition, the zebrafish has also emerged as a powerful and reliable model organism in large-scale forward and reverse functional genetics approaches, which has led to the identification of novel disease genes and pathomechanisms of cardiac disease. Several of these zebrafish mutant lines or morphants have become established vertebrate models for defined human cardiac disorders such as cardiomyopathies or arrhythmias.3–5 In this context, the knockdown of the short-stature homeobox gene 2 (shox2) results in severe cardiac dysfunction and bradycardia in the zebrafish model6 that is mediated by a loss of Islet1 in cardiac pacemaker cells,5 establishing Shox2- and Islet1-deficient zebrafish as models for studies of human sick sinus syndrome. The screening for bioactivity of small molecules and their therapeutic potential to modulate heart rate requires methods for high-throughput screening (HTS). Up to date, an assessment of the heart rate is often practiced manually by counting heartbeats from slow motion replay of videotape recordings, what is neither practical for large numbers of hearts to be analyzed nor is it accurate when determining beat-to-beat intervals as needed for detection of arrhythmias.7 Existing software for semiautomated analysis of heartbeats7–13 has several limitations. One is that the embryos have to be anesthetized by adding Tricaine11,14 or MS-22212 to avoid movement of zebrafish embryos during videoing. Adding compounds that prevent embryo movement such as anesthetics, sedatives, or neuromuscular junction blockers can alter the heart rate.8 A second limitation is that the embryos have to be fixed and oriented manually in an agarosegel before the video recording,11,14,15 which is a time-consuming and tedious task. Additionally, the oxygen supply in agarose can differ from the one in water.15 Another method for automatic detection of heartbeat can only be performed by using a transgenic zebrafish line Tg(cmlc2:GFP) that expresses the green fluorescent protein (GFP) in the myocardium.8 Recording of the electrocardiogram of zebrafish hearts has also been demonstrated.16 However, the method is technically complex and not suited for HTS.
To improve the throughput of cardiotropic small-molecule screens, methods to automatically evaluate the heart rate and arrhythmias from video recordings of nonanesthetized and nonfixed zebrafish embryos are needed.
Materials and Methods
Zebrafish strains
Wild-type and transgenic zebrafish were maintained according to Westerfield.17 Eggs were collected from pairwise and batch crossings. Morpholino antisense oligonucleotide-mediated gene knockdown of Shox and Islet was performed, as described previously.5 For the morpholino injection procedure, the TE4/6 wild-type strain was used. At 24 h postfertilization (hpf ), the embryos were treated with 0.003% PTU (1-phenyl-2-thiourea) to prevent pigment formation. Additionally, the transgenic strain Tg(cmlc2:GFP) that expressed GFP exclusively in the myocardium8 was used.
The present study was performed under institutional approvals that conform to the Guide for the Care and Use of Laboratory Animals published by the US National Institute of Health (NIH Publication No. 85-23, revised 1996).
Imaging setup
Two different imaging setups were used: First, for evaluation of the heartbeat detection rate, series of overview images of the front quarter of zebrafish embryos were automatically recorded with a frame rate of 30 frames per second by using an automated microscope.18 Videos were captured for 15 s. The image size was 640×480 pixels and parts of the head and yolk sac were displayed next to the heart of the zebrafish embryos on the images. Each image was labeled with a timestamp and the corresponding coordinate of the 96-well plate. Recordings were performed at 28°C. Embryos that moved during video recording were discarded.
Second, an inverted microscope (Leica DMIL LED) was used in combination with an objective of 20×magnification to image the transgenic fluorescent strain and half of the Shox2-MO and Isl1-MO zebrafish embryos. Videos of the heart region were recorded with a digital camera (Leica DFC 400) and the imaging software Leica Application Suite V3.7. The original image resolution of 1392×1040 pixels was reduced to 640×480 pixels to decrease the time for image analysis. The frame rate was 30 frames per second and videos were captured for 30 s. These zebrafish embryos were oriented manually in 2.5% methylcellulose on a slide and recordings were performed at room temperature (21°C).
Heart detection by digital motion analysis
Two different movement detection algorithms written in Matlab® (The MathWorks, Inc., Natick, MA) have been combined to accurately detect the zebrafish heart as the region of interest (ROI), as shown in Figure 1. First, all images of a series (Fig. 1A) are transformed in the CIE 1976 (L*, a*, b*) color space (CIELAB standard of the International Commission on Illumination). The CIELAB includes all perceivable colors and its coordinates are based on a cube root transformation of the color data to avoid light intensity influence. In this color space, an image is represented by three matrices: brightness, a green-red, and a blue-yellow axis. Then, the change of brightness of two successive images is compared and the absolute difference between two digital images represents pixels, whose intensity has changed, thus indicating movement (Fig. 1B). All images are compared. As each result is different from one frame to the other, to acquire a unique region of the heart, all single segmentations are summed up (Fig. 1C). By using a threshold value method and morphological operations for Figure 1C, irrelevant movements are removed and a unique area is found (Fig. 1D). The boundaries of the detected ROI are depicted in the original image (Fig. 1E).
FIG. 1.
Heart region detection by combining two methods: upper row: method to detect change of pixel intensity: (A) native digital image, (B) differential image of two successive images, (C) sum of all differential images, (D) image after threshold adjustment, erosion, and dilatation, (E) original image with marked detected region of interest (ROI). Lower row: method to detect the heart region by color segmentation: (F) a matrix of the CIELAB color space, (G) image after threshold adjustment, (H) image after median filtering, erosion, and dilatation, (I) original image with marked detected ROI after masking and summing all detected ROIs, (J) original image with combined detected ROI.
The second algorithm aims at identifying red areas within the zebrafish, which correspond to accumulations of erythrocytes in the zebrafish heart. During a heart contraction cycle, the red area within the heart's ventricle alternately increases in the diastole and decreases in the systole. This area is isolated from the digital image by a combination of different segmentation operations. As red is the feature of interest, the green-red axis is selected (Fig. 1F). By a threshold value method and a median filter, pixels with the most relevant information are left (Fig. 1G). Several morphological operations, such as dilatations and erosions, are implemented to remove small particles and obtain a noninterrupted area (Fig. 1H). This procedure is implemented in each frame and the results are summed up as in the previous method and can be used as a mask across the original image to show the heartbeat region of a frame (Fig. 1I).
Both methods for detection of the zebrafish heart are combined using an AND logical operation (Fig. 1J). However, in case an image sequence does not present red colors (like most of the videos of the Islet1 and Shox2 morphants used in the experiment), the color segmentation, evidently, does not yield any results. Hence, the heartbeat area is determined only by the motion detection algorithm. In both cases, if more than one object results as the heartbeat area, the largest object is chosen as the expected heartbeat area.
Heartbeat detection
The standard deviation of the ROI in each frame is calculated. The calculation of this feature yields a time series with a periodic behavior, which corresponds to the periodic heartbeat. From this periodicity, a frequency can be determined. For this, a function of the Matlab toolbox Gait-CAD [http://sourceforge.net/projects/gait-cad/files/] was applied. This function determines the relevant local maxima of a curve and their respective times of occurrence. The period of time between two maxima corresponds to the beat-to-beat interval of the zebrafish heart. The median value for all detected beat-to-beat intervals is calculated and its reciprocal value (heart frequency) is also computed and multiplied with 60 representing the heartbeats per minute (bpm). All detected beat-to-beat intervals and the heartbeat rate are saved together with a graphic display of the data (Fig. 2) and an image of the identified ROI (Fig. 3 and Supplementary Video; Supplementary Data are available online at www.liebertpub.com/zeb). The data can be imported into spreadsheet programs for further analysis. To improve the ease of use, we have implemented the Matlab software into LabVIEW (National Instruments, Austin, TX) that provides a Graphical User Interface.
FIG. 2.
Example of detected heartbeats of an Isl1-deficient embryo with frequent pauses in the cardiac contraction. The graph illustrates the dynamic change of pixel intensity in the ROI. Peaks indicate individual heart contractions (highlighted by asterisks). In this example, the first pause (P) occurs after nine heartbeats and lasts for 2.2 s.
FIG. 3.
Different orientations of zebrafish and detected ROI: (left): dorsoventral position, (right): lateral position.
Measurement of heartbeat regularity
According to the guidelines of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology,19 the root mean square of successive differences (RMSSD) is a time-domain method that can be applied for the short-term assessment of heart rate variability (HRV). The RMSSD is calculated by the square root of the mean of the sum of the squares of the successive differences between adjacent beat-to-beat (RR) intervals:
![]() |
Where n indicates the total number of RR interval terms and i the duration of the i-th interval.
There is a lack of normative data for short-term measures of HRV, but elevated RMSSD values indicate arrhythmic events.19 To compare RMSSD values of two different morphants with sinus bradycardia and frequent pauses in cardiac contraction (Islet1-Mo and Shox2-Mo) with a wild-type control group, the RMSSD values were averaged for each individual and standard errors were calculated. These mean values were tested for significance in comparison to the control group.
Validation of the heartbeat detection rate
Validity of the method for automatic detection of the heart rate was performed by a comparison with visual counting of slow-motion videos. Wild-type zebrafish embryos 60–72 hpf were dispensed in a 96-well plate, and volume was leveled to 50 μL with an E3 buffer solution containing lidocaine at two different concentrations (50 and 100 μg/mL). Embryos were exposed for 15 min before a heart rate assessment. Additionally, heartbeats of two different morphants were analyzed and compared with controls. Shox2 deficiency interferes with the pacemaking function in zebrafish embryos.10 Injection of Shox2-MO leads to sinus bradycardia, and Isl1-deficient embryos also exhibit frequent pauses in the cardiac contraction.
Statistical analysis
Statistical analysis was performed with MatLab and Microsoft Excel®. Comparisons between means of two groups were performed using the unpaired t test. Differences were considered significant at p<0.05. Correlations between two datasets were calculated with Pearson's correlation coefficient. In this case, R=1 is a total positive correlation, R=0 is no correlation, and R=−1 is a negative correlation.
Results and Discussion
The heartbeat detection rate of the software was evaluated with different wild-type (WT), induced morphants, and transgenic zebrafish embryos at 36–120 h postfertilization (hpf ) (Table 1).
Table 1.
Results of Automatic Heartbeat Detection
| Object | Age of development | Detection rate | Correlation with visual counting |
|---|---|---|---|
| WT embryos | 36–120 hpf | 96% (204/213) | R=0.99 |
| WT embryos in lidocaine 50 and 100 μg/mL | 60–72 hpf | 95% (88/93) | R>0.97 |
| Transgenic fluorescent strain | 72 hpf | 100% (14/14) | R=0.99 |
| Morphants with bradycardia and frequent pauses in the cardiac contraction | 60–72 hpf | 95% (69/73) | R=0.98 |
Rates of automatic heartbeat detection and correlations with visual counting are given for wild-type (WT) zebrafish embryos, WT embryos in two different concentrations of the cardiotoxic drug lidocaine, a transgenic fluorescent strain, and two different morphants.
Although the orientation of the zebrafish was random between dorsoventral to lateral, in 95% or more of all videos, the heartbeat was detected automatically by our software and the heart rate determined by the algorithm correlated highly with the result found by visual counting. Repeated measurements of the heart rate with our method in the same animal were in the range of 2%. In addition, the detection method was validated by adding a known cardiotoxic drug, the sodium channel blocker lidocaine, which induces bradycardia in zebrafish.2,20 A significant decrease in heart rate with increasing concentrations of lidocaine was found (p<0.01). The mean heart rate in untreated zebrafish embryos 72 hpf was 170.6 bpm (SD: 13.9), whereas the mean heart rate of embryos treated with lidocaine 50 μg/mL was 152.2 bpm (SD: 12.2 bpm) and lidocaine 100 μg/mL was 133 bpm (SD: 8.3 bpm), respectively. Moreover, the beat-to-beat interval variability increased as shown by an increase in RMSSD values in one third of the treated embryos. Furthermore, videos from supplementary material given in other publications11,16 were analyzed. In all cases, the heart rate was automatically detected and significant decreases were found in treated embryos.
On first pass, the method scored 100% heart rates of the fluorescence videos from heartbeats of a transgenic strain [Tg(cmlc2:GFP)] that expressed the GFP exclusively in the myocardium.8 Additionally, videos of fluorescent embryonic zebrafish hearts from supplementary material given in20 were also detected automatically.
Heartbeats were also detected automatically in videos of two different zebrafish morphants with sinus bradycardia and frequent pauses in cardiac contraction. The mean heart rate was the slowest in the Islet1-MO group with 73.1 bpm (±16 bpm), followed by the Shox2-MO group with 95.5 bpm (±11.1 bpm), whereas it was 140.7 bpm (±11.8) in the control group. A comparison of the mean RMSSD values from controls with those of Shox2 morphants exhibited significant differences (p=0.0001). Correspondingly, this also applies for a comparison of the mean RMSSD values from controls with those of Islet1 morphants (p=0.0002) (see Fig. 4).
FIG. 4.
Mean root mean square of successive differences (RMSSD) values and standard errors of Islet1-Mo, Shox2-Mo and the control group. ***Indicates highly significant differences between the RMSSD values of the control group and those of the morphants (p<=0.001).
The method described here demonstrates the feasibility of fully automatic analysis of zebrafish embryo heartbeats for application in small-molecule HTS or in toxicological assays. However, a number of factors that can influence the automatic detection have been identified. These are as follows:
• Movements of the zebrafish.
• Movement of erythrocytes in large blood vessels such as the aorta or the vena cava.
• Strokes of the pectoral fins in the first second of the video, where the ROI is identified.
• High-image resolution (>640×480 pixels) significantly slows down the detection procedure and reduces the number of sequential images that can be analyzed.
• Low-image resolution (<160×120 pixels) reduces the number of image information and consequently the number of correctly identified ROIs.
• Pigmentation of the zebrafish can superimpose the heart region and consequently no heart movement will be detected.
At the moment, only heart rate and beat-to-beat variability can be assessed automatically. More detailed assessments of cardiac function, such as automatic analysis of the ejection fraction, remain challenging. However, the development of automated assays will accelerate both the search for active compounds that may milder cardiac diseases and the identification of toxicological levels of compounds. We are currently applying the technology to zebrafish embryos in both applications.
Supplementary Material
Acknowledgments
Funding was provided by the Helmholtz Association programme “BioInterfaces: Molecular and Cellular Interactions at Functional Interfaces” and by the European Union (EU COST Action BM0804: “EuFishBioMed”).
Disclosure Statement
The authors declare that they have no competing financial interests.
References
- 1.Zon LI, Peterson RT. In vivo drug discovery in the zebrafish. Nat Rev Drug Discov 2005;4:35–44 [DOI] [PubMed] [Google Scholar]
- 2.Milan DJ, Peterson TA, Ruskin JN, Peterson RT, MacRae CA. Drugs that induce repolarization abnormalities cause bradycardia in zebrafish. Circulation 2003;107:1355–1358 [DOI] [PubMed] [Google Scholar]
- 3.Hassel D, et al. Nexilin mutations destabilize cardiac Z-disks and lead to dilated cardiomyopathy. Nat Med 2009;15:1281–1288 [DOI] [PubMed] [Google Scholar]
- 4.Meder B, et al. Reconstitution of defective protein trafficking rescues long-qt syndrome in zebrafish. Biochem Biophys Res Commun 2011;408:218–224 [DOI] [PubMed] [Google Scholar]
- 5.Hoffmann S, et al. Islet1 is a direct transcriptional target of the homeodomain transcription factor Shox2 and rescues the Shox2-mediated bradycardia. Basic Res Cardiol 2013;108:339. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Blaschke RJ, et al. Targeted mutation reveals essential functions of the homeodomain transcription factor Shox2 in sinoatrial and pacemaking development. Circulation 2007;115:1830–1838 [DOI] [PubMed] [Google Scholar]
- 7.Fink M, et al. A new method for detection and quantification of heartbeat parameters in Drosophila, zebrafish, and embryonic mouse hearts. BioTechniques 2009;46:101–113 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Burns CG, et al. High-throughput assay for small molecules that modulate zebrafish embryonic heart rate. Nat Chem Biol 2005;1:263–264 [DOI] [PubMed] [Google Scholar]
- 9.Chan PK, Lin CC, Cheng SH. Noninvasive technique for measurement of heartbeat regularity in zebrafish (Danio rerio) embryos. BMC Biotechnol 2009;9:11. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Taylor JM, et al. Real-time Optical Gating for Three-dimensional Beating Heart Imaging. J Biomed Optics 2011;16:116021–1160218 [DOI] [PubMed] [Google Scholar]
- 11.Ocorr K, Fink M, Cammarato A, Bernstein S, Bodmer R. Semi-automated optical heartbeat analysis of small hearts. J Visual Exp 2009;31:pii: [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Yozzo KL, Isales GM, Raftery TD, Volz DC. High-content screening assay for identification of chemicals impacting cardiovascular function in zebrafish embryos. Environ Sci Technol 2013;47:11302–11310 [DOI] [PubMed] [Google Scholar]
- 13.Mikut R, et al. Automated processing of zebrafish imaging data—a survey. Zebrafish 2013;10:401–421 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Peravali R, et al. Automated feature detection and imaging for high-resolution screening of zebrafish embryos. Biotechniques 2011;50:319–324 [DOI] [PubMed] [Google Scholar]
- 15.Schwerte T, Überbacher D, Pelster B. Non-invasive imaging of blood cell concentration and blood distribution in zebrafish Danio rerio incubated in hypoxic conditions in vivo. J Exp Biol 2003;206(Pt 8):1299–1307 [DOI] [PubMed] [Google Scholar]
- 16.Dhillon SS, et al. Optimisation of embryonic and larval ECG measurement in zebrafish for quantifying the effect of QT prolonging drugs. PLOS One 2013;8:e60552. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Westerfield M. The Zebrafish Book. A Guide for the Laboratory Use of Zebrafish (Danio rerio). Eugene, OR: University of Oregon Press, 2000 [Google Scholar]
- 18.Spomer W, et al. High-throughput screening of zebrafish embryos using automated heart detection and imaging. J Lab Autom 2012;17:435–442 [DOI] [PubMed] [Google Scholar]
- 19.Malik M, et al. Heart rate variability. Standards of measurement, physiological interpretation, and clinical use. Circulation 1996;93:1043–1065 [PubMed] [Google Scholar]
- 20.Letamendia A, et al. Development and validation of an automated high-throughput system for zebrafish in vivo screenings. PLoS One 2012;7:e36690. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.





