In tracking analysis, the movement of cargos by motor proteins in axons is often represented by a time-space plot termed a ‘kymograph’. Manual creation of kymographs is time-consuming and complicated for cell biologists. Therefore, we developed KYMOMAKER, a simple system that automatically creates a kymograph from a movie without generating multiple time-dissected movie stacks. In addition, KYMOMAKER can automatically extract faint vesicle traces, and can thereby effectively analyze cargos expressed at low levels in axons. A filter can be applied to remove traces of non-physiological movements and to extract meaningful traces of anterograde or retrograde cargo transport. For example, only cargos that move at a speed of >0.4 µm/second for a distance of >1 µm can be included. Another function of KYMOMAKER is to create a color kymograph in which the color of the trace varies according to the position of the fluorescent particle in the axis perpendicular to the long axis of the axon. Such positional information is completely lost in conventional kymographs. KYMOMAKER is an open access program that can be easily used to analyze vesicle transport in axons by cell biologists who do not have specific knowledge of bioimage informatics.
Differentiated neurons are highly polarized with a long axon and branched dendrites. These neurons have well-developed and well-organized systems to transport materials such as membrane vesicles, organelles and proteins . Perturbation of these systems causes neural dysfunction and neurodegenerative diseases such as Alzheimer's disease [2, 3]. Axonal transport in living neurons is often analyzed by performing total internal reflection fluorescence microscopy of cargo proteins labeled with a fluorescent probe such as green fluorescent protein (GFP) [4, 5]. Time-lapse movies of moving cargos have been used to determine several attributes of cargo movement such as velocity and the direction of transport .
A kymograph is a traditional and effective way of presenting vesicular movement in neurons and the transport of other intracellular materials. A kymograph represents a three-dimensional (i.e. spatiotemporal) microscopy image as a two-dimensional image. For example, to represent transport of a GFP-tagged protein in a neuron, the horizontal and vertical directions of the kymograph correspond to distance moved along the long axis of the axon and time, respectively. Thus, movement in the direction perpendicular to the long axis of the axon is not presented in traditional kymographs. In a kymograph, the movement of an individual cargo is shown as a trajectory (i.e. a locus). If there are multiple cargos, their movements are shown as multiple trajectories, which often intersect or overlap with each other. The most important attribute of a kymograph is that the movement of a target cargo can be analyzed by tracing its trajectory. A kymograph can be used to determine whether each cargo moved in an anterograde or retrograde direction, the distance it moved, the angle of its trajectory and thus its velocity. The number of cargos can be estimated by counting the number of trajectories.
However, generating kymographs is time-consuming for cell biologists and requires software programs. This means that cell biologists need to learn how to use these programs, launch these programs using an appropriate computer interface and manage the input and output image files. In addition, improved software programs are needed that generate kymographs of lowly expressed cargos. GFP-tagged proteins cannot be expressed at high levels when analyzing axonal transport in primary cultured neurons. This is because such high levels of a specific cargo protein might affect axonal transport and perturb anterograde and retrograde cargo movement. Consequently, the signal-to-noise ratio needs to be improved so that kymographs of lowly expressed cargos can be generated.
A more serious problem for cell biologists is manual tracing of trajectories . This is time-consuming and leads to subjective bias. Thus, automatic trace detection (i.e. automatic trajectory tracking) is necessary in the analysis of kymographs. There have been several trials of methods to automatically detect traces from kymographs [8-10]. These trials reported promising results with image processing techniques such as a line detector based on the Hough transform; however, these techniques are difficult for general cell biologists to implement. In addition, research on trace detection is ongoing, which indicates that methods still need to be refined to detect traces of cargos expressed at low levels.
In this article, we introduce an open access software program called ‘KYMOMAKER’ that can be used to easily create kymographs. Specifically, KYMOMAKER can create kymographs directly from a single movie simply by clicking several buttons on its graphical user interface. This means that multiple software programs are not required for different suboperations, such as preparing the movie stack and two-dimensional projection of the stack. Furthermore, the program is fully automated and no manual operations are required.
We evaluated the performance of this program using two movies in which a cargo protein was highly or lowly expressed. In one movie, a mouse central nervous system (CNS) catecholaminergic CAD cell expressing a high level of GFP-tagged Alzheimer's amyloid precursor β-protein (APP-GFP) was used. In the other movie, a primary cultured mouse cortical neuron expressing a low level of APP-GFP was used. APP is transported in an anterograde direction by kinesin-1 . APP and kinesin-1 bind each other either directly  or via JIP1b [6, 13, 14]. APP is a precursor of neurotoxic amyloid-β, which is neurotoxic and leads to aberrant axonal transport [6, 15]; therefore, detailed analysis of physiological APP axonal transport is important to understand the pathogenesis of Alzheimer's disease.
KYMOMAKER has five advantages over similar image analysis tools: (i) because of its filtering and thresholding functions for suppressing background noise, KYMOMAKER is better able to detect cargos expressed at low levels; (ii) KYMOMAKER can automatically detect vesicle traces on kymographs; (iii) if necessary, KYMOMAKER can extract fine structures from kymographs to enable traces to be better detected automatically; (iv) KYMOMAKER can create a color kymograph that provides more detailed information about the locations of individual vesicles, which is completely lost in conventional grayscale kymographs; and (v) multiple software programs are not required and the graphical user interface of KYMOMAKER allows the various functions to be controlled by simply clicking a few buttons.
Results and Discussion
General procedure used to create a kymograph
The general procedure used to create a kymograph is summarized in Figure 1. First, multiple consecutive frames of a movie are prepared. The x-axis and y-axis of the frames correspond to the long axis of the axon and the axis perpendicular to this, respectively. These frames are then assembled into a three-dimensional spatiotemporal stack in which the z-axis corresponds to the frame number, i.e. time. Finally, a kymograph is created by projecting the (x,y,z)-stack to the y-axis. Consequently, in a kymograph, one dimension corresponds to the long axis of the axon (x) and the other corresponds to time (z). During two-dimensional projection processing, the axis perpendicular to the long axis of the axon disappears. This is because movement in this direction is generally considered less important than movement along the long axis of the axon and time. During the projection, the brightest pixel value in the y-axis is selected as the pixel value at (x,z) of the kymograph. Temporal movement of a vesicle appears as a slanted line on the kymograph. The angle of the slant indicates the direction (anterograde or retrograde) and speed of vesicle movement.
Structure of KYMOMAKER
KYMOMAKER is a software program that can be used to create kymographs using only a few operations. In addition, other functions can be used to extract further information. Figure 2 shows the entire structure of KYMOMAKER. The first half is used to automatically generate a standard grayscale kymograph from a movie. One important function of this stage is image filtering, which comprises a Laplacian-of-Gaussian (LoG) filter and a fixed thresholding operation. This improves the ability of the program to detect cargos that are difficult to visualize. The latter half comprises optional functions to extract fine structures necessary to create a so-called detailed kymograph, and automatic detection of vesicle traces from a grayscale kymograph or a detailed kymograph. KYMOMAKER can also create color kymographs to visualize y-axis information (i.e. the position of a vesicle in the axis perpendicular to the long axis of the axon), which is lost in standard grayscale kymographs. Each of these functions will be described in further detail.
Improving the detection of cargos that are difficult to visualize
The LoG filter  is used to increase the signal-to-noise ratio by improving the visibility of a vesicle (a fluorescent spot) and suppressing background noise. The filter emphasizes the edges of vesicles and suppresses background noise, thereby making the vesicles more obvious. The fixed thresholding operation is applied to each filtered frame to further remove background noise, and the intensity of which has been reduced by the LoG filter. The resulting frames are then assembled into a spatiotemporal stack as shown in Figure 1.
Figure 3 shows the effects of this filtering and thresholding operation. The images in the upper panel show APP-GFP-labeled cargos in the axon of a mouse primary cultured neuron. To avoid disrupting axonal transport, APP-GFP was expressed at a low level. Consequently, the difference in fluorescence intensity between APP-GFP and the background is not large; thus, a kymograph generated using the conventional procedure (with ImageJ) does not show the movements of cargos clearly. By contrast, the kymograph generated using KYMOMAKER shows the movement of these cargos clearly, with far less brightness fluctuation due to the application of the LoG filter and the fixed threshold operation. In particular, four faint traces (arrowheads) and a strong trace (arrow) are clearly detected on the kymograph created by KYMOMAKER. The images in the lower panel of Figure 3 are kymographs of APP-GFP-labeled cargos moving in the neurite of a CAD cell. This cell expressed a high level of the marker and many moving vesicles are detected. In contrast to the upper panel, there are no marked differences between the kymograph generated using the conventional procedure and that generated using KYMOMAKER. This is because APP-GFP fluorescence was sufficiently intense in the original movie frames, meaning that the LoG filter had a minimal effect.
Automatic trace detection
As noted above, the angle of a slanted line on a kymograph indicates the direction and speed with which a vesicle moved. Therefore, automatic detection of traces is useful for further analysis of vesicle movement; however, this is not a simple task, even for recently developed sophisticated image processing technologies. This is because on a kymograph, the traces are blurred and intersect with each other and background noise suppression by the LoG filter is sometimes insufficient. In addition, traces of vesicles showing Brownian movement, which are visualized as near-vertical lines on a kymograph, are often not of interest and do not need to be detected.
To detect traces automatically as accurately as possible, given the aforementioned difficulties, we first used a linear structure detector specialized for kymographs. Specifically, a one-dimensional watershed algorithm was used, which is a one-dimensional version of the two-dimensional watershed algorithm . The one-dimensional watershed algorithm detects local peaks in fluorescent intensity at each x-position in a grayscale kymograph (Figure 4). This one-dimensional algorithm was used instead of the two-dimensional algorithm for simplicity and because kymographs have a special anisotropic property. Specifically, the horizontal direction represents spatial location, whereas the vertical direction represents time; thus, the horizontal and vertical directions of a kymograph provide different information. Therefore, it is not appropriate to extract watershed curves by treating both directions equally using the two-dimensional watershed algorithm. After this detection process, unwanted traces showing Brownian movement are filtered out based on their low speed. In KYMOMAKER, the user can specify the velocities of the traces that are to be included using the graphical user interface.
There have been several previous trials of automatic trace detection tools [9, 10]. These trials assumed that the traces have a piecewise linear structure (i.e. an approximate structure) and so used line detectors. By contrast, our trace detector makes no such assumption and thus traces of cargos can be detected without any approximation. Our method is also applicable to these previous trials because the one-dimensional watershed algorithm can be used prior to the detection of piecewise linear structures.
Figure 5 shows the result of this automatic trace detection using two grayscale kymographs. Even if a trace is not obvious on the kymograph, it can still be detected using the one-dimensional watershed algorithm. However, several traces are not detected owing to their low peak fluorescence intensities. Fortunately, this automatic trace detection can be further improved by extracting fine structures using a rotational watershed method, which is described in detail in the following section.
Extraction of fine structures using the rotational watershed method
A promising way to reduce the number of traces missed by the one-dimensional watershed algorithm is to use a new watershed algorithm called rotational watershed. First, the one-dimensional watershed algorithm is applied multiple times while the original grayscale kymograph is rotated from 0° to 180° at a certain angle interval (Figure 6). In this way, slightly different watershed images are obtained from the same grayscale kymograph. By applying averaging and thresholding operations to these multiple watershed images, they are integrated into a single image, i.e. the rotational watershed image. This integration operation is necessary to generate a watershed image without noise; it removes spurious and noisy watershed lines and detects finer watershed lines. A similar integration operation is used in rotational mathematical morphology . A smaller angle interval (i.e. more watershed images) results in a higher quality rotational watershed image; however, this effect plateaus at a certain angle interval (e.g. 5°) below which the quality of the rotational watershed image does not improve further.
Figure 7 shows the effect of this fine structure extraction. The bottom panel shows the automatic trace detection results using the original grayscale kymograph and the results generated using the fine structure extraction method. After fine structure extraction using the rotational watershed method, subtle linear structures are captured from the original kymograph (middle panel); therefore, the number of traces missed in the automatic trace detection is drastically reduced. The arrowheads indicate traces that are correctly detected (or connected) specifically using this fine structure extraction method.
Creation of a color kymograph
KYMOMAKER can generate a color kymograph in which the position of the brightest point in the axis perpendicular to the long axis of the axon (i.e. y-axis in the spatiotemporal stack) is indicated by color. This positional information is completely lost in original grayscale kymographs. Specifically, green, yellow and red indicate that the brightest pixel in an APP-GFP-labeled spot is located at the top, middle or bottom of this perpendicular axis, respectively. These colors allow the trajectory of an APP-GFP-labeled vesicle to be better understood on the kymograph.
Figure 8A shows an illustrative example of the usefulness of this color kymograph. In this example, two vesicles termed ‘A’ and ‘B’ move differently in the perpendicular axis direction. In the grayscale kymograph, these vesicles have identical (black) traces, meaning that this difference in movement is not detected. By contrast, in the color kymograph, the traces of vesicles A and B have different colors. The trace of vesicle A is completely green as its position in the perpendicular axis is constant. However, the trace of vesicle B exhibits different colors reflecting changes in its position in the perpendicular axis. Figure 8B shows a color kymograph and a grayscale kymograph generated from a real movie.
Operating KYMOMAKER using the graphical user interface
One of the most important merits of KYMOMAKER is that it is an all-in-one software that can create kymographs and detect traces automatically. Each of the functions described in Figure 2 can be simply performed by clicking several buttons on the graphical user interface. Furthermore, the user can set several parameters using this interface. The efficiency of this interface will be evaluated in the following section. First, we will describe the step-by-step operations necessary to create a kymograph. Figure 9 shows screenshots of these individual steps.
Step 1 (Load a movie): A movie file is loaded into KYMOMAKER (panel 1). As an example, we will use a 20-second movie of APP-GFP-labeled vesicles in a proximal axon. AVI and MOV files can be used.
Step 2 (Remove extra space: optional): If necessary, extra space in the y-direction (i.e. the top and bottom regions) of the movie can be removed using a trimming function. In this example, 20 and 10 pixels were removed from the top and bottom of the movie, respectively. Consequently, only the region containing the axon is shown in the window (panel 2).
Step 3 (Create the kymograph): Click the ‘Generate’ button to create a grayscale kymograph (panel 3). Similar to the conventional framework, this is done by selecting the brightest pixel value in the direction perpendicular to the long axis of the axon in the spatiotemporal stack. Importantly, after the movie is loaded, the grayscale kymograph is created by clicking a single button. The color kymograph is created at the same time.
Step 4 (Fine structure extraction: optional): If necessary, click the ‘Rotational Kymograph’ button to perform fine structure extraction from the grayscale kymograph using the rotational watershed method (panel 4).
Step 5 (Automatic trace detection: optional): Click the ‘Detection’ button to detect traces of vesicles from the original grayscale kymograph or from the detailed kymograph generated following fine structure extraction (panel 5). To remove unnecessary traces, filters can be applied stipulating the properties of the vesicles that are to be included. For example, to exclude traces of Brownian movement, which has a velocity slower than approximately 0.38 µm/second, only vesicles with a speed faster than 0.4 µm/second can be included. Similarly, to only extract anterograde or retrograde traces, the speed can be set to ‘0.4–7.0 µm/second’ or ‘−7.0 to −0.4 µm/second’ as shown in (A) and (B) of panel 5, respectively.
Efficiency of KYMOMAKER
Figure 10 shows the difference between a kymograph generated using the conventional procedure and that generated using KYMOMAKER. Here, we used a movie of APP-GFP-labeled vesicles in a CAD cell. For the conventional procedure, several software programs were used including ImageJ. Importantly, extra manual operations were required to launch these programs. In the conventional procedure, unwanted regions of the movie were first removed using trimming software such as AviUtl. Next, the 20-second movie was converted to 100 JPEG files. Then, the brightest points (moving vesicles) were extracted and the 100 files were stacked using ImageJ. This procedure required at least 5 min. By contrast, the stacked file can be created directly from the movie by clicking two buttons using KYMOMAKER and takes less than 20 seconds. The trace extraction operation was not included in this comparison.
Open access tool
KYMOMAKER is an open access tool (http://www.pharm.hokudai.ac.jp/shinkei/Kymomaker.html). This software will be helpful to many cell biologists who spend much time and effort on creating kymographs. KYMOMAKER is composed of nine files (Kymoanalysis.exe, msvcp110.dll, msvcr110.dll, opencv_core243.dll, opencv_ffmpeg243.dll, opencv_gpu243.dll, opencv_highgui243.dll, opencv_imgproc243.dll and opencv_objdetect243.dll), which can be downloaded into a single folder on a Windows computer. The sample movie (Movie S1, Supporting Information) can be used to trial the software.
Materials and Methods
Mouse CNS catecholaminergic CAD cells  that had been cultured and differentiated on poly-l-lysine-coated coverglass chamber slides were transfected with pcDNA3.1-hAPP695-GFP using Lipofectamine 2000 (Invitrogen) and cultured for 18 h. Primary culture of mouse (C57BL/6) cortical neurons was performed as previously described  with some minor modifications. In brief, the cortex of mice at embryonic day 15.5 was dissected and neurons were placed in a buffer containing papain. Then, the neurons were plated at a density of 5 × 104 cells/cm2 on poly-d-lysine-treated coverglass chamber slides in 25% (v/v) Nerve-Cell Culture Medium (DS Pharma Biomedical) and 75% (v/v) Neurobasal Medium containing B-27 Supplement (Invitrogen), GlutaMAX I (4 mM), heat-inactivated horse serum (5% v/v) and penicillin-streptomycin (Invitrogen). On day 4 of in vitro culture, the neurons were transfected with pcDNA3.1-hAPP695-GFP using Lipofectamine 2000 (Invitrogen) and cultured for 12 h. The neurons were observed using a total internal reflection fluorescence microscopy system (C1; Nikon) and movies were recorded using a CCD camera (Cascade 650; Photometrics Co.) as previously described [6, 20]. The animal studies were conducted in compliance with the guidelines of the Animal Studies Committee of Hokkaido University.
This work was supported in part by Grants-in-Aid for Scientific Research (22659011, 23390017, and 23113701 to T. S. and 21113522 and 23113722 to S. U.) from the Ministry of Education, Science, Culture, Sports and Technology, Japan.