Possibilities of using a miniature fluorescence microscope

. The article discusses an approach to fluorescence microscopy using single-photon miniature fluorescence microscopes. The use of miniscopes allows you to expand the possibilities of their usage and solve many problems related to the need of fixing experimental material, insufficient scanning speed, complexity and high cost of usage. The authors developed a unique algorithm of correlations building based on cross-correlation of neuronal signals and implemented the opportunity to import experiment’s data in csv format. (as well as a utility for converting data from CNMF-E), which allows to import data from other sources. Special attention is paid to the methods of processing neural activity data: filtering the received frames from noise, compensating of image shifts and distortions.


Introduction
Research in the field of neuroscience allowed to develop various behavioral tests that provide a variety of related information. 35]. Besides, visualization methods allow to obtain structural and functional visualization of neural networks with cellular zoom [11,12]. But an important drawback of many such methods (for example, two-photon microscopy) was the need to fix the head of an experimental animal. This did not allow scientists to apply a large set of behavioral tests. In parallel, electrophysiological methods for studying the activity of neural ensembles with cellular zoom were developed [9,23]. However, these methods basically did not allow to identify cell types, populations of neurons, and covered only short periods of time. It was also difficult to apply these methods on experimental animals such as rats and mice. All of the above has led to the need to develop technologies that would allow images of previously inaccessible populations of brain neurons in free-moving animals.

Related Work
The literature under study describes methods of miniature fluorescence microscopy. Their capabilities mainly are crossed with the capabilities of classical electrophysiological methods. Classical approaches allow to record neural activity in vivo. But these methods have both advantages and disadvantages. An important advantage of electrophysiological methods is their high speed of registration. Unfortunately, the time scale of the miniscope is tens of milliseconds, which is much lower. At the same time, in vivo electrophysiological methods, as a rule, do not allow to identify cell types or populations of neurons when analyzing neural activity (for example, using a multi-electrode array). While, when using a miniscope, fluorescence is recorded from a certain group of cells that are transduced by a virus with a specific fluorescent marker. Recording of neural activity in vivo using electrophysiological methods is possible within a few days (weeks), and methods of miniature fluorescence microscopy give an opportunity to record it up to one month.
In General, the literature describes many attempts to study the functions of neural activity, as well as tools that can display this activity at the level of the neurons' population of free-moving animals [40]. For example, a fiber-optic array designed to visualize fluctuations of the membrane potential at the level of population of neurons in the cortex of free-moving animals [15]. Later [14,20,42] two-photon miniature microscopes were developed. They could already display the dynamics of brain blood flow and calcium fluctuations in small groups of neurons. [1][2]. In the same time, the field of genetically encoded calcium indicators [46] and CMOS-sensors of image for portable cameras and mobile phones was developed. This made it possible to use single-photon broadband visualization on free-moving animals [17,34]. As a result, the first miniature fluorescence microscopes were developed using these technologies.
To combine the best features Ephys-Miniscope was created [2], which combines all the features of a standard miniscope with the addition of tetrodes for neural activity registration.

Miniature fluorescent microscope
It was shown that broadband epifluorescence visualization can be achieved using miniature microscopes. [16]. Since that time, various versions of miniscopes were developed. But their cost was very high. In addition, there was a problem of their modification and adjustment to the requirements of researchers. [22]. A little later, flexible in terms of modifications, affordable broadband miniature microscopes were created, such as the UCLA Miniscope [7], FinchScope [25], CHendoscope [21] and MiniScope [50].
Using a GRIN (gradient refractive index) lens implanted in the brain, the device transmits light and allows to visualize the deep layers of the brain. A blue led is used as the light source. The led radiation passes through a collecting lens and a special filter, after it is refracted from a dichroic mirror, and then gets to the lens. After that, the radiation is focused on the deep layers of the studied part of the brain using a GRIN lens. As a result, the population of neurons, that express a fluorescent marker in the radiation field, begins to fluoresce. After that, the fluorescence from the sample passes through the lens, dichroic mirror, emission filter and achromatic dual lens, getting to the CMOS image sensor [17]. After that, the signal is transmitted over a flexible coaxial cable and enters the data acquisition system controller (DAQ). The DAQ connects to a personal computer via a USB 3.0 cable to transfer data over the USB Video Class (UVC) Protocol and control the CMOS-sensors of image of the miniscope.
The trigger for the development of miniature microscopes is their ability to register the activity of many neurons with a specific topology of an animal. The animal can display its natural innate behavior at this time. When the animal's head is fixed, an increased level of stress can be observed, affecting behavior. In addition, there is a restriction of the vestibular apparatus. All this affects the registered patterns of neural activity. As a result, we get deviations from the values that can be obtained in more natural states [45]. It is also important that miniscopes allow to analyze the neural activity, which underlie behavior in a wide range of behavioral analyses developed over the past decades [18,19,30,32]. As a result, precise behavior tracking and quantification [28,29,36,49] become important for understanding how recorded in target regions activity can be correlated with behavior.
Registration of neural activity in vivo is mainly performed by fluorescence of genetically encoded indicators of the GCaMP family [Mao et al., 2008]. Usage of calcium indicators is justified by the fact that the generation of action's potential and other cellular biological functions are accompanied by changes in the intracellular concentration of calcium ions. Delivery of genetically encoded indicators is proceeded through the injection of viral constructions to the brain of an experimental animal using a stereotactic operation.
GCamp is a green fluorescent protein (GFP) bound with calmodulin (a calcium-binding protein) and with the M13 peptide. In the presence of calcium, conformational rearrangements occur in GCaMP indicator in the CaM/M13 complex, leading to GFP fluorescence, which is detected by a miniscope. In the future, it is possible to reconstruct spike activity and analyze neural activity based on the registered signal.
Due to its low weight in few grams, and the use of a flexible coaxial cable, the miniature fluorescence microscope gives visualization with almost natural behavior. It is possible to analyze neural activity at the cellular level during behavioral testing with minimal deviation from physiological conditions. However, the use of flexible coaxial cable imposes a number of restrictions on testing due to the problems with cable twisting and fixed cable length. In this regard, a version of the miniscope with a wireless method of information transmitting was developed [3,4,6]. The wireless version of the miniscope, on the one hand, has an obvious advantage over the wired version, and on the othera significant disadvantage in the form of the mandatory presence of a heavy lithiumpolymer power source, which must be attached to the experimental animal (~1.5 gramsthe weight of the battery and ~2 -4.5 gramsthe weight of the miniscope). One of the most promising modifications of single photon miniature microscopes is NINscope, a miniscope with a reduced area and weight that allows to obtain images from several regions of the brain simultaneously with the parallel option of optogenetic stimulation using integrated probe [10].

Application of a miniature fluorescence microscope
The use of NINscope allowed to obtain data confirming the presence of the cerebellarthalamic-cortical pathway, as well as to establish the significance of these connections for adequate social behavior and the formation of cognitive functions. Using an external implantable optogenetic probe, the authors showed that stimulation of cerebellar neurons led to activation of neurons in the motor cortex of the cerebral hemispheres. Also, using a pair of NINscope miniscopes, neuronal activity was recorded in two areas simultaneously, namely, in the cells of the cerebellum and cortex. Simultaneous visualization of these areas, according to the authors, will help determine the role of their interaction during learning, memory formation, planning and performing complex motor acts [10].
In addition, the standard version of the miniscope recorded the activity of neurons in mice during memory recall [7]. The authors showed that while encoding various sequentially received information at short intervals, a common neural ensemble is formed that connects memories. Encoding of sequential events was accompanied by overlapping of forming neural pathways in the CA1 region of the hippocampus, and the degree of their overlap was higher, if the information was received within one day, than with a week interval. In parallel, similar studies were conducted on adult mice. As a result, the use of a miniature fluorescence microscope allowed to determine the cause of the weakening of cognitive functions during aging, namely, a violation of the formation of a common neural ensemble due to a decrease in the excitability of neurons [7].
In another study, usage of a miniscope showed that desynchronization of interneurons between CA1 and the dentate gyrus leads to instability of spatial memory, which persists only for a few minutes [44].
In addition to the above, the use of miniature fluorescence microscopy can help assess the effects of various pharmacological drugs, for example, reducing increased excitability in neurological brain diseases [48].
So, usage of the miniscope makes it possible to obtain images of previously inaccessible populations of neurons in the depths of the brain of freely moving animals [16,17,52].
Nevertheless, the processing of primary data obtained using the miniscope has a number of difficulties associated with the extraction of neural activity and its subsequent analysis.

Extraction of neural activity
From the point of view of primary data processing, which are video files, it is difficult to extract the activity of separate neurons due to very large background fluctuations and big spatial overlaps. Processing such data can be divided into several stages: filtration of received frames from noise, compensation of image shifts and distortions, and selection and analyze of active neurons.
Data from a single photon miniscope is almost always accompanied by a constantly changing noisy background, which is usually bounded with changes in the neurons' activity or with the gradual burnout of the fluorescent indicator. For this reason, for more accurate identification of neuronal activity, it is necessary to use complex background comparison models that give more accurate determination of non-neuronal dynamics [51]. Another problem in data processing is the shifts and distortions that are typical for behavioral experiments [47]. For subsequent data processing, it is important to correct all shifts and distortions, i.e. align the frames during the entire record of neuronal activity. To solve this problem, various methods are used, for example, an approach where video frames are registered through pattern matching based on the assumption that the main form of movement is translational movement [13,26]. The final stage after correcting noise and shifts is the process of identifying the activity of neurons [26]. Currently, improvement of image processing algorithms and reduction of noises in data gotten during experiments are in work [8].
The main methods (approaches) that were initially used for processing data gotten from miniscope were: semi-manual ROI analysis [3,4,24,37] and PCA/ICA analysis [31]. Unfortunately, both approaches had commonly known drawbacks [41]. For example, ROI analysis did not allow to separate efficiently ion of signals from neurons that were overlapped in space. In addition, ROI analysis was a time-consuming process when it came to process a lot of neurons. It is also important to notice that in many cases, background noise was not corrected properly, which led to the noisiness of the extracted signals and to partial or complete inability to analyze them later. As for PCA/ICA analysis, this is a linear method of signal separation, which in most cases is ineffective due to the presence of spatial overlaps [38,39] in the data gotten from the miniscope. In this regard, to solve problems with background changes and big spatial overlaps, a restricted non-negative matrix factorization (CNMF) method was proposed for simultaneous noise detection, deconvolution, and signal separation from neuronal activity visualization data [38]. However, modern realizations of the CNMF approach were optimized for two photon and light microscopy, where the background has a simpler space-time structure, what negatively affected the processing of the obtained data. Since strong background signals are mostly unavoidable in the context of single photon imaging, insufficient background removal can lead to problematic conclusions in subsequent analysis. For this reason, an extended approach (method) of restricted non-negative matrix factorization (CNMF-E) was developed [51], which is one of the main methods (approaches) for extracting the activity of separate neurons from in vivo data gotten from a miniscope. Its distinctive feature in comparison with CNMF and other methods is a more accurate removal of clogging background components, as well as the possibility of using both automatic and semiautomatic mode, what leads to a significant improvement in the analysis' accuracy comparing with previous methods.
Along with the CNMF_E method, its improved version, MIN1PIPE, is also actively used, which has a range of advantages over the above-mentioned algorithms for processing single-photon microscopy video recordings [26]. A distinctive feature of the MIN1PIPE method in comparison with the PCA/ICA and CNMF-E methods, which rely more on a stable image field, is the presence of an improved motion correction module. The motion correction module presented by the authors is able to register any deformations in sight, and also exceed existing methods, such as NoRMCorre [39]. Another feature of this method is unnecessity to enter a large amount of input data, for example, the number of neurons. Another great advantage of MIN1PIPE compared to other methods is the high accuracy of determining the ROI of neurons. The data obtained after processing by CNMF_E or MIN1PIPE are discrete signals of neuronal fluorescence throughout all frames of the video sequence. For further analysis, it is necessary to extract significant parameters of this signal [33]. The parameter values may vary depending on the area under study and the signal-to-noise ratio. Dynamic programming algorithms, time convolution, machine learning techniques, and various highand low-frequency filters can be used to filter the signal [33].

Results
Despite the success achieved with the miniscope, the simplified analysis of the data obtained does not allow to reveal the full potential of the information and, as a result, to draw more complete conclusions, what is bounded with lack or complexity of processing tools. Simplified analysis refers to the comparison of neural activity before and after impact on an experimental animal using the so-called overlay, when maps of active neurons are combined with each other and analyzed for the formation of new or loss of old connections, interactions between neurons. To solve this problem, it is possible to use high-level analysis, which presents the definition of changes in the activity of both separate correlating neurons and their groups during a series of experiments.
To solve this problem, first it is needed to find a match between neurons on several video sequences. One of the algorithms that calculates this relationship is the CellReg algorithm [27,43], which consists of three stages: image alignment, probability model calculation, and clustering of results. At the first stage of image alignment, all neurons from a series of experiments are superimposed. By applying shift transformations and rotation of each layer, the maximum cross-correlation between the centroids of neurons is achieved. The next step is calculation of probability estimation by Bayes ' theorem. The mentioned CellReg algorithm is a separate tool presented as a MATLAB script and available for use.
As a result, the authors developed an algorithm for building correlations based on crosscorrelation of neuronal signals, as well as an algorithm for building correlations using data on spike activity or "calc" (that is, an unprocessed signal, which the CNMF-E or MIN1PIPE algorithm produced) activity of the neuron signal. The algorithm allows to filter the signal according to the following parameters: meanThresholdthreshold signal value, expressed as a percentage from the average value of the signal, the warmUpperiod when the signal must exceed meanThreshold for fixing the beginning of the "activity" of the neuron, coolDownthe period when the signal must be below meanThreshold for fixing the end of the "activity" of the neuron. (several screenshots). Figure 1 shows the SignalCrossCorrMax algorithm (for two signals, the maximum value is taken from their cross-correlation).  In addition, the authors implemented the ability to import data about the experiment in csv format (as well as a utility for converting data from CNMF-E). It gives an opportunity to import data from other sources and makes the plugin more versatile.
The graphical interface has also been changed for convenience of usage. Figure 3 shows the user interface when selecting the ThresWarmCool algorithm: occurs a window of algorithm settings. Also, the frame selection range is converted to seconds (33 secondsthe entire video file with a frequency of 33 frames per second, 1000 frames).

Development of a software module for high-level analysis of neural activity
Due to the fact that in open sources cannot be found a tool that allows to proceed the highlevel analysis of neural activity [5], the authors of this review was developed their own software tool that combines the capabilities of primary processing of video records using CNMF_E or MIN1PIPE algorithms, a procedure of neurons registration for several experiments (matching search) using the CellReg algorithm [43], as well as a high-level analysis of changes in neuronal activity from experiment to experiment.
The MATLAB environment (MathWorks) was chosen as a development platform, which allows, on the one hand, to easily combine algorithms and their implementations by other researchers, and on the other hand, to use the developed tool and its source code for further research. The current version of the software module allows to import data of processing video sequences of one experiment, perform correlation analysis, and present the result in graphical form. To test the software module, the results gotten by the authors in experiments on wild-type mice at the age of 3 months were used. To visualize neural activity, mice were injected with the AAV2/9-CamKII-Camp6f-WPRE-pA virus into the CA1 region of the hippocampus using stereotax according to the standard Protocol. Three weeks after the injection of the viral construct, the animal was anesthetized with isoflurane. In the head area, the hair was shaved off and the skin was cut, after which the skull was washed with hydrogen peroxide and phosphate buffer (PBS). Using stereotax, the place for the GRIN lens implant was defined, where, using a dental drill, 4 guide holes were made to create a circular craniotomy and a fragment of the skull was removed. After that, using an aspirator and a syringe with a blunt end, the cortical layers above the hippocampus were selected, while the selection area was periodically filled with PBS. The selection process was carried out until the white fibers of the callosum were appeared. In case of bleeding, the implantation area was additionally washed with a phosphate buffer and filled with a hemostatic sponge. Using a special attachment, the GRIN lens was attached to the stereotax and put down on 1.35 mm below the top part of the skull into the pre-formed implantation area. Using cyanoacrylate glue, the outer surface of the GRIN lens was connected to the skull until the glue was completely dry. After that, the GRIN lens holder was removed, and the skull was covered with dental cement. Immediately after implantation of the GRIN lens or after 7 days, the miniscope support platform was implanted and the activity of neurons was recorded. To do this, the miniscope was connected to the DAC and special software was initialized on the personal computer. The support platform was fixed on the lower part of the miniscope using magnets and a set screw. Then, using a special mount, this structure was fixed to the stereotax and put down until the miniscope was completely aligned with the GRIN lens. To visualize neural activity, the maximum intensification and low brightness of the led were set, and the image focus was adjusted. After the appearance of a stable image of neurons, the support platform was fixed on the animal's skull using dental cement. Next, neural activity was recorded.

Conclusion
A miniature fluorescent microscope is a promising tool for visualizing the activity of neurons. The developed methods for analyzing data gotten from the miniscope allow to obtain new information about neural activity in general, as well as about the interaction of neurons with each other. The authors developed algorithms for building correlations based on cross-correlation of neuronal signals, as well as using data on spike activity or "calc" (i.e., unprocessed signal, which the CNMF-E or MIN1PIPE algorithm produced) activity of the neuron signal. Also, a prototype of a software module is presented that allows to import data from processing of video sequences of a single experiment, perform correlation analysis of neural activity, and present the results in graphical form. In future versions of the presented software module, it is planned to add an option to compare the neural activity recorded from one experimental animal between several experiments, as well as to conduct a high-level analysis.
The program to increase the competitiveness of leading Russian universities among leading scientificeducational centers (Project 5-100-2020).