Pylatiuk. 2014. Automatic Zebrafish Heartbeat Detection and Analysis For Zebrafish Embryos

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

ZEBRAFISH

Volume 11, Number 4, 2014


ª Mary Ann Liebert, Inc.
DOI: 10.1089/zeb.2014.1002

Automatic Zebrafish Heartbeat Detection


and Analysis for Zebrafish Embryos

Christian Pylatiuk,1 Daniela Sanchez,1 Ralf Mikut,1 Rüdiger Alshut,1 Markus Reischl,1
Sofia Hirth,2 Wolfgang Rottbauer,2 and Steffen Just 2

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 to avoid movement of zebrafish embryos during videoing.


Adding compounds that prevent embryo movement such as

D uring the last decade, the zebrafish (Danio rerio) has


emerged as an indispensable vertebrate model organism
in drug discovery1 and drugs known to cause QT prolonga-
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 aga-
tion; hence, bradycardia in humans shows similar effects in rosegel before the video recording,11,14,15 which is a time-
zebrafish embryonic hearts.2 In addition, the zebrafish has consuming and tedious task. Additionally, the oxygen supply
also emerged as a powerful and reliable model organism in in agarose can differ from the one in water.15 Another method
large-scale forward and reverse functional genetics ap- for automatic detection of heartbeat can only be performed by
proaches, which has led to the identification of novel disease using a transgenic zebrafish line Tg(cmlc2:GFP) that ex-
genes and pathomechanisms of cardiac disease. Several of presses the green fluorescent protein (GFP) in the myocar-
these zebrafish mutant lines or morphants have become es- dium.8 Recording of the electrocardiogram of zebrafish
tablished vertebrate models for defined human cardiac dis- hearts has also been demonstrated.16 However, the method is
orders such as cardiomyopathies or arrhythmias.3–5 In this technically complex and not suited for HTS.
context, the knockdown of the short-stature homeobox gene 2 To improve the throughput of cardiotropic small-molecule
(shox2) results in severe cardiac dysfunction and bradycardia screens, methods to automatically evaluate the heart rate and
in the zebrafish model6 that is mediated by a loss of Islet1 in arrhythmias from video recordings of nonanesthetized and
cardiac pacemaker cells,5 establishing Shox2- and Islet1- nonfixed zebrafish embryos are needed.
deficient zebrafish as models for studies of human sick sinus
syndrome. The screening for bioactivity of small molecules Materials and Methods
and their therapeutic potential to modulate heart rate requires
Zebrafish strains
methods for high-throughput screening (HTS). Up to date, an
assessment of the heart rate is often practiced manually by Wild-type and transgenic zebrafish were maintained ac-
counting heartbeats from slow motion replay of videotape cording to Westerfield.17 Eggs were collected from pairwise
recordings, what is neither practical for large numbers of and batch crossings. Morpholino antisense oligonucleotide-
hearts to be analyzed nor is it accurate when determining mediated gene knockdown of Shox and Islet was performed,
beat-to-beat intervals as needed for detection of arrhyth- as described previously.5 For the morpholino injection pro-
mias.7 Existing software for semiautomated analysis of cedure, the TE4/6 wild-type strain was used. At 24 h post-
heartbeats7–13 has several limitations. One is that the embryos fertilization (hpf ), the embryos were treated with 0.003%
have to be anesthetized by adding Tricaine11,14 or MS-22212 PTU (1-phenyl-2-thiourea) to prevent pigment formation.

1
Institute for Applied Computer Science (IAI), Karlsruhe Institute of Technology (KIT), Eggenstein-Leopoldshafen, Germany.
2
Department of Internal Medicine II, University of Ulm, Ulm, Germany.

379
380 PYLATIUK ET AL.

Additionally, the transgenic strain Tg(cmlc2:GFP) that ex- influence. In this color space, an image is represented by three
pressed GFP exclusively in the myocardium8 was used. matrices: brightness, a green-red, and a blue-yellow axis.
The present study was performed under institutional ap- Then, the change of brightness of two successive images is
provals that conform to the Guide for the Care and Use of compared and the absolute difference between two digital
Laboratory Animals published by the US National Institute of images represents pixels, whose intensity has changed, thus
Health (NIH Publication No. 85-23, revised 1996). indicating movement (Fig. 1B). All images are compared. As
each result is different from one frame to the other, to acquire
Imaging setup a unique region of the heart, all single segmentations are
summed up (Fig. 1C). By using a threshold value method and
Two different imaging setups were used: First, for evalu-
morphological operations for Figure 1C, irrelevant move-
ation of the heartbeat detection rate, series of overview im-
ments are removed and a unique area is found (Fig. 1D). The
ages of the front quarter of zebrafish embryos were
boundaries of the detected ROI are depicted in the original
automatically recorded with a frame rate of 30 frames per
image (Fig. 1E).
second by using an automated microscope.18 Videos were
The second algorithm aims at identifying red areas within
captured for 15 s. The image size was 640 · 480 pixels and
the zebrafish, which correspond to accumulations of eryth-
parts of the head and yolk sac were displayed next to the heart
rocytes in the zebrafish heart. During a heart contraction
of the zebrafish embryos on the images. Each image was
cycle, the red area within the heart’s ventricle alternately
labeled with a timestamp and the corresponding coordinate of
increases in the diastole and decreases in the systole. This
the 96-well plate. Recordings were performed at 28C. Em-
area is isolated from the digital image by a combination of
bryos that moved during video recording were discarded.
different segmentation operations. As red is the feature of
Second, an inverted microscope (Leica DMIL LED) was
interest, the green-red axis is selected (Fig. 1F). By a
used in combination with an objective of 20 · magnification
threshold value method and a median filter, pixels with the
to image the transgenic fluorescent strain and half of the
most relevant information are left (Fig. 1G). Several mor-
Shox2-MO and Isl1-MO zebrafish embryos. Videos of the
phological operations, such as dilatations and erosions, are
heart region were recorded with a digital camera (Leica DFC
implemented to remove small particles and obtain a non-
400) and the imaging software Leica Application Suite V3.7.
interrupted area (Fig. 1H). This procedure is implemented in
The original image resolution of 1392 · 1040 pixels was re-
each frame and the results are summed up as in the previous
duced to 640 · 480 pixels to decrease the time for image
method and can be used as a mask across the original image to
analysis. The frame rate was 30 frames per second and videos
show the heartbeat region of a frame (Fig. 1I).
were captured for 30 s. These zebrafish embryos were ori-
Both methods for detection of the zebrafish heart are
ented manually in 2.5% methylcellulose on a slide and re-
combined using an AND logical operation (Fig. 1J). How-
cordings were performed at room temperature (21C).
ever, in case an image sequence does not present red colors
(like most of the videos of the Islet1 and Shox2 morphants
Heart detection by digital motion analysis
used in the experiment), the color segmentation, evidently,
Two different movement detection algorithms written in does not yield any results. Hence, the heartbeat area is de-
Matlab (The MathWorks, Inc., Natick, MA) have been termined only by the motion detection algorithm. In both
combined to accurately detect the zebrafish heart as the re- cases, if more than one object results as the heartbeat area, the
gion of interest (ROI), as shown in Figure 1. First, all images largest object is chosen as the expected heartbeat area.
of a series (Fig. 1A) are transformed in the CIE 1976 (L*, a*,
b*) color space (CIELAB standard of the International
Heartbeat detection
Commission on Illumination). The CIELAB includes all
perceivable colors and its coordinates are based on a cube The standard deviation of the ROI in each frame is cal-
root transformation of the color data to avoid light intensity culated. The calculation of this feature yields a time series

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.
AUTOMATIC ZEBRAFISH HEARTBEAT DETECTION AND ANALYSIS 381

FIG. 2. Example of detected


heartbeats of an Isl1-deficient em-
bryo with frequent pauses in the
cardiac contraction. The graph il-
lustrates the dynamic change of
pixel intensity in the ROI. Peaks
indicate individual heart contrac-
tions (highlighted by asterisks). In
this example, the first pause (P)
occurs after nine heartbeats and
lasts for 2.2 s.

with a periodic behavior, which corresponds to the periodic Measurement of heartbeat regularity
heartbeat. From this periodicity, a frequency can be deter- According to the guidelines of the European Society of
mined. For this, a function of the Matlab toolbox Gait-CAD Cardiology and the North American Society of Pacing and
[http://sourceforge.net/projects/gait-cad/files/] was applied. Electrophysiology,19 the root mean square of successive
This function determines the relevant local maxima of a differences (RMSSD) is a time-domain method that can be
curve and their respective times of occurrence. The period of applied for the short-term assessment of heart rate variability
time between two maxima corresponds to the beat-to-beat (HRV). The RMSSD is calculated by the square root of the
interval of the zebrafish heart. The median value for all de- mean of the sum of the squares of the successive differences
tected beat-to-beat intervals is calculated and its reciprocal between adjacent beat-to-beat (RR) intervals:
value (heart frequency) is also computed and multiplied with
60 representing the heartbeats per minute (bpm). All detected sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
n1
beat-to-beat intervals and the heartbeat rate are saved to- +i ¼ 1 (RRi  RRi þ 1 )2
gether with a graphic display of the data (Fig. 2) and an image RMSSD ¼
n1
of the identified ROI (Fig. 3 and Supplementary Video;
Supplementary Data are available online at www.liebertpub Where n indicates the total number of RR interval terms
.com/zeb). The data can be imported into spreadsheet pro- and i the duration of the i-th interval.
grams for further analysis. To improve the ease of use, we There is a lack of normative data for short-term measures
have implemented the Matlab software into LabVIEW (Na- of HRV, but elevated RMSSD values indicate arrhythmic
tional Instruments, Austin, TX) that provides a Graphical events.19 To compare RMSSD values of two different mor-
User Interface. phants with sinus bradycardia and frequent pauses in cardiac

FIG. 3. Different orienta-


tions of zebrafish and detected
ROI: (left): dorsoventral posi-
tion, (right): lateral position.
382 PYLATIUK ET AL.

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 lg/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 60–72 hpf 95% (69/73) R = 0.98
pauses in the cardiac contraction
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.

contraction (Islet1-Mo and Shox2-Mo) with a wild-type heart rate of embryos treated with lidocaine 50 lg/mL was
control group, the RMSSD values were averaged for each 152.2 bpm (SD: 12.2 bpm) and lidocaine 100 lg/mL was
individual and standard errors were calculated. These mean 133 bpm (SD: 8.3 bpm), respectively. Moreover, the beat-
values were tested for significance in comparison to the to-beat interval variability increased as shown by an increase
control group. in RMSSD values in one third of the treated embryos. Fur-
thermore, videos from supplementary material given in other
Validation of the heartbeat detection rate publications11,16 were analyzed. In all cases, the heart rate
was automatically detected and significant decreases were
Validity of the method for automatic detection of the heart
found in treated embryos.
rate was performed by a comparison with visual counting of
On first pass, the method scored 100% heart rates of the
slow-motion videos. Wild-type zebrafish embryos 60–72 hpf
fluorescence videos from heartbeats of a transgenic strain
were dispensed in a 96-well plate, and volume was leveled to
[Tg(cmlc2:GFP)] that expressed the GFP exclusively in the
50 lL with an E3 buffer solution containing lidocaine at
myocardium.8 Additionally, videos of fluorescent embryonic
two different concentrations (50 and 100 lg/mL). Embryos
zebrafish hearts from supplementary material given in20 were
were exposed for 15 min before a heart rate assessment.
also detected automatically.
Additionally, heartbeats of two different morphants were
Heartbeats were also detected automatically in videos of
analyzed and compared with controls. Shox2 deficiency in-
two different zebrafish morphants with sinus bradycardia and
terferes with the pacemaking function in zebrafish em-
frequent pauses in cardiac contraction. The mean heart rate
bryos.10 Injection of Shox2-MO leads to sinus bradycardia,
was the slowest in the Islet1-MO group with 73.1 bpm
and Isl1-deficient embryos also exhibit frequent pauses in the
( – 16 bpm), followed by the Shox2-MO group with 95.5 bpm
cardiac contraction.
( – 11.1 bpm), whereas it was 140.7 bpm ( – 11.8) in the control
group. A comparison of the mean RMSSD values from con-
Statistical analysis trols with those of Shox2 morphants exhibited significant dif-
Statistical analysis was performed with MatLab and Mi- ferences ( p = 0.0001). Correspondingly, this also applies for a
crosoft Excel. Comparisons between means of two groups comparison of the mean RMSSD values from controls with
were performed using the unpaired t test. Differences were those of Islet1 morphants ( p = 0.0002) (see Fig. 4).
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).
Although the orientation of the zebrafish was random be-
tween 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 mea-
surements 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 bra- FIG. 4. Mean root mean square of successive differences
dycardia in zebrafish.2,20 A significant decrease in heart rate (RMSSD) values and standard errors of Islet1-Mo, Shox2-
with increasing concentrations of lidocaine was found Mo and the control group. ***Indicates highly significant
( p < 0.01). The mean heart rate in untreated zebrafish em- differences between the RMSSD values of the control group
bryos 72 hpf was 170.6 bpm (SD: 13.9), whereas the mean and those of the morphants ( p < = 0.001).
AUTOMATIC ZEBRAFISH HEARTBEAT DETECTION AND ANALYSIS 383

The method described here demonstrates the feasibility of 6. Blaschke RJ, et al. Targeted mutation reveals essential
fully automatic analysis of zebrafish embryo heartbeats for functions of the homeodomain transcription factor Shox2 in
application in small-molecule HTS or in toxicological assays. sinoatrial and pacemaking development. Circulation
However, a number of factors that can influence the auto- 2007;115:1830–1838.
matic detection have been identified. These are as follows: 7. Fink M, et al. A new method for detection and quantifi-
cation of heartbeat parameters in Drosophila, zebrafish, and
 Movements of the zebrafish. embryonic mouse hearts. BioTechniques 2009;46:101–113.
 Movement of erythrocytes in large blood vessels such 8. Burns CG, et al. High-throughput assay for small molecules
as the aorta or the vena cava. that modulate zebrafish embryonic heart rate. Nat Chem
 Strokes of the pectoral fins in the first second of the Biol 2005;1:263–264.
video, where the ROI is identified. 9. Chan PK, Lin CC, Cheng SH. Noninvasive technique for
 High-image resolution ( > 640 · 480 pixels) signifi- measurement of heartbeat regularity in zebrafish (Danio
cantly slows down the detection procedure and reduces rerio) embryos. BMC Biotechnol 2009;9:11.
the number of sequential images that can be analyzed. 10. Taylor JM, et al. Real-time Optical Gating for Three-
 Low-image resolution ( < 160 · 120 pixels) reduces the dimensional Beating Heart Imaging. J Biomed Optics 2011;
number of image information and consequently the 16:116021–1160218.
number of correctly identified ROIs. 11. Ocorr K, Fink M, Cammarato A, Bernstein S, Bodmer R.
 Pigmentation of the zebrafish can superimpose the heart Semi-automated optical heartbeat analysis of small hearts. J
region and consequently no heart movement will be Visual Exp 2009;31:pii: 1435.
detected. 12. Yozzo KL, Isales GM, Raftery TD, Volz DC. High-content
screening assay for identification of chemicals impacting
At the moment, only heart rate and beat-to-beat variability cardiovascular function in zebrafish embryos. Environ Sci
can be assessed automatically. More detailed assessments of Technol 2013;47:11302–11310.
cardiac function, such as automatic analysis of the ejection 13. Mikut R, et al. Automated processing of zebrafish imaging
fraction, remain challenging. However, the development of data—a survey. Zebrafish 2013;10:401–421.
automated assays will accelerate both the search for active 14. Peravali R, et al. Automated feature detection and imaging
compounds that may milder cardiac diseases and the identi- for high-resolution screening of zebrafish embryos. Bio-
fication of toxicological levels of compounds. We are cur- techniques 2011;50:319–324.
rently applying the technology to zebrafish embryos in both 15. Schwerte T, Überbacher D, Pelster B. Non-invasive imag-
applications. ing of blood cell concentration and blood distribution in
zebrafish Danio rerio incubated in hypoxic conditions
Acknowledgments in vivo. J Exp Biol 2003;206(Pt 8):1299–1307.
16. Dhillon SS, et al. Optimisation of embryonic and larval
Funding was provided by the Helmholtz Association pro- ECG measurement in zebrafish for quantifying the effect of
gramme ‘‘BioInterfaces: Molecular and Cellular Interactions QT prolonging drugs. PLOS One 2013;8:e60552.
at Functional Interfaces’’ and by the European Union (EU 17. Westerfield M. The Zebrafish Book. A Guide for the La-
COST Action BM0804: ‘‘EuFishBioMed’’). boratory Use of Zebrafish (Danio rerio). Eugene, OR:
University of Oregon Press, 2000.
Disclosure Statement 18. Spomer W, et al. High-throughput screening of zebrafish
embryos using automated heart detection and imaging. J
The authors declare that they have no competing financial Lab Autom 2012;17:435–442.
interests. 19. Malik M, et al. Heart rate variability. Standards of mea-
surement, physiological interpretation, and clinical use.
References Circulation 1996;93:1043–1065.
20. Letamendia A, et al. Development and validation of an
1. Zon LI, Peterson RT. In vivo drug discovery in the zebra-
automated high-throughput system for zebrafish in vivo
fish. Nat Rev Drug Discov 2005;4:35–44.
screenings. PLoS One 2012;7:e36690.
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.
3. Hassel D, et al. Nexilin mutations destabilize cardiac Z- Address correspondence to:
disks and lead to dilated cardiomyopathy. Nat Med Prof. Christian Pylatiuk
2009;15:1281–1288. Institute for Applied Computer Science (IAI)
4. Meder B, et al. Reconstitution of defective protein traf- Karlsruhe Institute of Technology (KIT)
ficking rescues long-qt syndrome in zebrafish. Biochem Hermann-von-Helmholtz-Platz 1
Biophys Res Commun 2011;408:218–224. 76344 Eggenstein-Leopoldshafen
5. Hoffmann S, et al. Islet1 is a direct transcriptional target of the Germany
homeodomain transcription factor Shox2 and rescues the
Shox2-mediated bradycardia. Basic Res Cardiol 2013;108:339. E-mail: pylatiuk@kit.edu

You might also like