Apple | Motion 1.0.1 | Installation and User Manual for MouseRec Version 1.0.1 High

Installation and User Manual for
MouseRec Version 1.0.1
February 2012
High-Throughput Pressure and Motion Recording Software
with Real-Time Classification and Monitoring of Mouse
Sleep-Wake Behavior
Signal Solutions, LLC, Lexington, KY, www.sigsoln.com Copyright 2012
1
Installation and User Manual for MouseRec
Version 1.0.1
Peter Ferland and Kevin D. Donohue
February 2012
Contents
1. Introduction ....................................................................................................................................................... 2 A. Installation ..................................................................................................................................................... 2 2. Data Acquisition and Monitoring ....................................................................................................................... 3 A. Start a Data Acquisition Session .................................................................................................................... 3 B. Selecting and Monitoring a Channel Signal (Raw Data Tab) .......................................................................... 6 C. Monitoring Decision Statistics for Selected Channel (Decision History Tab) ................................................. 8 D. Monitoring Decision Statistic Histogram of Selected Channel (Histogram Tab) ........................................... 9 E. Monitoring Percent Sleep for All Active Channels (Summary Tab) ............................................................. 10 F. Current File Information and Real‐Time Settings (Settings/Information Tab) ............................................ 10 G. Monitoring Decision Statistics for All Active Channels (Histogram Panel Tab) ........................................... 11 H. Monitoring Sensor Signals for All Active Channels (Graph Panel Tab) ........................................................ 13 3. File Information ................................................................................................................................................ 13 2
1. Introduction
The MouseRec software was written and compiled in LabVIEW (National Instruments, Austin,
TX) to monitor and record high-throughput behavior tracking experiments with mice. The
program saves motion data from multiple mouse cages with piezoelectric sensors at 128 samples
per second (*.bin files). It also computes signal features over short-time intervals related to
sleep-wake behavior and saves the feature vector values every 2 seconds (*.FeatVec files) as
well as sleep-wake decision statistics computed from a linear discriminate weight vector (*.Feat
files). The graphical user interface provides a variety of signal graphs, statistical summaries, and
current sleep-wake states to monitor the data collection and results during the experiment.
The MouseRec software supports the use of either PCI or USB NI data acquisition devices (NIDAQ) for simultaneous recording and monitoring of multiple channels. Examples of DAQ
devices are:







The NI-PCI6225 DAQ records 1 to 40 input channels
The NI-PCI6224 DAQ records 1 to 32 input channels
The NI-PCI6220 DAQ records 1 to 16 input channels
The NI-USB6009 DAQ records 1 to 8 input channels
The NI-USB6218 DAQ records 1 to 16 input channels
The NI-USB6229 DAQ records 1 to 32 input channels
The NI-USB6225 DAQ records 1 to 80 input channels
The software described in this document automatically detects the DAQ configured on your PC.
Software will run on a PC with Windows 7 or Windows XP operating systems (32 or 64 bit) and
an available PCI slot (for NI-PCI DAQs) or a USB port (for the NI-USB DAQs). The
installation of the MouseRec software automatically installs drivers for the NI DAQ, if they are
not already installed. Updated drivers and the runtime engine required to run MouseRec are
freely available from National Instruments at http://www.ni.com/drivers/
A. Installation
1. To install the real-time sleep-wake monitoring software and supporting National
Instruments software, download and unzip the installation package via instructions given
with your purchase.
2. Transfer the file to the hard drive of the computer where data will be collected and unzip
the file. Once unzipped, the directory MouseRec_101 should have been created. Inside
this directory is an application file named setup. Double click (execute) this file to start
the installation process. Follow the instructions in the prompts to complete the
installation.
3. Once the installation process is complete, two programs should be listed in the installed
programs list: MouseRec, which is the data acquisition program, and National
Instruments Software, which consists of several packages that manage the device drivers
3
for the DAQ hardware and provide a library of functions that MouseRec requires. When
removing this software, these two programs can be identified in the PROGRAM option
under the CONTROL PANNEL from the PC menus and removed. By default, the Start
Menu shows National Instruments products under the National Instruments heading and
the MouseRec program under the mouse_project heading.
4. If you have a USB DAQ, plug it in after the software installation is complete. If you have
a PCI card, turn off the computer now and install it. Turn the computer back on for the
next step.
2. DataAcquisitionandMonitoring
A. StartaDataAcquisitionSession
1. Launch MouseRec either from the start menu or from the location where it was
saved/installed on the hard drive. The window shown in Fig. 1 appears after launching
the program. If the window does not look like this, it may be displaying another tab. You
can click on the Settings/Information tab in that case. The text boxes under this tab are
inactive until the START button is clicked. The information for these boxes is provided
through a series of prompts. The only exception is the Active NI-DAQ Device list. If
more than one NI DAQ capable of voltage measurements is available on the computer,
you will have to select the correct device here before clicking the START button. In this
case the NI-DAQ USB-6225 has been detected and will be used.
Figure 1. Starting window for MouseRec program.
4
2. Click the START button in the upper right corner to begin an acquisition session, which
starts with a prompt for a file name shown in Fig. 2. Mouse motion/pressure data will be
saved to this file for later processing. It is recommended that this file be given a
descriptive name that identifies the nature of the experiment or mice and the date the
experiment began. It is also recommended that NO extension be given to the file name,
since MouseRec adds its own extensions that are used in later programs (the bin extension
is given to the files with the raw sensor data). The software that analyzes data after the
experiment uses the base name to look for processed files and opens them automatically.
If they have different names and extensions, the automatic loading will not work and you
will be prompted to search for them with a file/directory navigator.
Figure 2. Prompt to enter a filename where data is to be stored during the
experiment.
3. Next the program prompts for the number of active channels with the dialog box shown
in Fig. 3. This is done so that only the necessary channels will be recorded. The
maximum number of channels is based on the DAQ capabilities and is listed in the
prompt. Type in the maximum number of channels if all cages are being used in the
experiment. If fewer channels than the maximum will be used, then the number of active
channels can be entered to save data file storage space. For example, if only four mice are
to be monitored in a single quad-cage unit (cages 1 to 4), then 4 should be entered as the
number of active channels. In this case the mice should be placed sequentially in the
cages (i.e. the first one in cage 1, the next in cage 2 …). If a cage needs to be skipped,
then enter the number of channels corresponding to the highest cage number containing a
mouse. For example if mice are in cages 1, 2, 5, and 6, then 6 should be entered for the
number of active channels. Channels 3 and 4 in this case will be recorded, but they will
contain only noise and should be marked as empty on the channel labels so they can be
ignored in future analyses.
5
Figure 3. Prompt to enter number of sequential channels to be
recorded.
4. After you enter the number of active channels, the dialog box shown in Fig. 4 appears,
asking if you wish to import mouse ID names from an Excel spreadsheet. If you have a
spreadsheet file with the mouse IDs, the format should be a series of names (text format)
under column A, and the number of rows should be equal to the number of active
channels selected. If you select “No”, then you have the option to enter IDs manually for
each active channel or use the default channel labels.
Figure 4. Import request for spreadsheet.
5. After the spreadsheet prompt is complete (or dismissed), another dialog box will pop up
as shown in Fig. 5. The dark-to-light and light-to-dark transition times can be entered in
the designated area, where the times are in military format (0 to 24). These time values
are stored in the data file headers and used in a later analysis program to compare sleep
behavior during the light and dark periods. If light and dark onset times are not critical,
then these can be left in their default settings and disregarded or changed in the analysis
program. This entry will not affect the data acquisition. In this same window, the mouse
IDs can also be changed to meaningful labels if desired. These ID labels are also stored in
the header so subsequent analysis programs can identify each channel with these labels.
When finished entering this information, click OK or hit enter on the keyboard to
proceed.
6
Figure 5. Prompt to enter labels for recorded channels and the light and
dark transition times used during the experiment
6. The program should now initialize and start recording. After a few seconds waveforms
and statistics should begin to appear in the panels under each tab, which are explained in
the following paragraphs. Data acquisition is now underway.
7. When data collection is finished, click the STOP button located directly beneath the
START button in the upper right corner of the window. A new test can then be started, or
the program can be terminated by clicking the X in the upper right corner to close the
window.
B. SelectingandMonitoringaChannelSignal(RawDataTab)
The most recent 6 seconds of the recorded signal for an individual channel can be viewed in the
Raw Data tab shown in Fig. 6. To view a particular channel, the channel number can be typed
into the Channel-to-Analyze text box or incremented up and down with the arrows to the left of
the text box. The y-axis is set to automatic scale by default, causing the signal to span across the
full dynamic range of the plot grid (the y-axis scales to the maximum signal magnitude within
the 6 second window). This can be disabled/enabled by right clicking on the graph axis and
removing/restoring the checkmark beside Autoscale Y.
7
(a)
(b)
Figure 6. Raw Data panel examples (a) Showing typical wake signal dynamics (b)
Showing typical sleep signal dynamics.
8
C. MonitoringDecisionStatisticsforSelectedChannel(DecisionHistory
Tab)
The MouseRec program extracts signal features and computes the decision statistic every 2
seconds so sleep and wake behavior can be observed in real time. The Decision History tab
shown in Fig. 7 plots the decision statistics corresponding to the channel selected in the Raw
Data panel. This panel also shows the current sleep-wake state via the green LED, which
indicates detected sleep when lit. Detection is based on comparing the decision statistics to a
sleep threshold, which by default is 0, but can be changed under the Settings/Information tab.
Larger positive decision statistics indicate a greater likelihood of sleep, while negative decision
statistics indicate a greater likelihood of wake. These decision statistics are stored in a file with
the Feat extension. An analysis program uses histograms such as these to set adaptive thresholds
for each channel to compensate for minor variations in sleep and wake behaviors between mice.
The active channel number is shown in this panel, but it cannot be changed here. It must be
changed in the Raw Data panel. This panel always shows results for the channel selected in the
Raw Data channel tab.
Figure 7. Decision History panel for Channel 2. Each dot represents the decision statistic
computed over a 2 second interval. Positive values indicate sleep more likely, while negative
values indicate wake more likely. Decision threshold set to 0 by default.
9
D. MonitoringDecisionStatisticHistogramofSelectedChannel(Histogram
Tab)
The histogram of decisions statistics can be viewed in the panel under the Histogram tab. An
example is shown in Fig. 8. The blue vertical line superimposed on the histogram is the current
decision threshold. After 24 hours a clear bimodal distribution should appear as a result of
mapping sleep signal dynamics into positive values and wake signal dynamics into negative
values. If the histogram is not bimodal, it could be the result of noise or weak signals, for which
there are a number of causes:
 an electrically or mechanically noisy environment
 poor mouse contact with the piezoelectric sensor on the floor of the cage (sometimes
cause by too much bedding)
 faulty amplifier or sensor
 unusual mouse behavior not observed in the training phase of the classifier (i.e. mouse is
ill, dead, escaped, or has a very unusual respiratory pattern during sleep)
The bimodal pattern in the histogram below is exploited by adaptive thresholding, used in later
analysis programs, which seeks a minimum point between the clusters (modes) of decision
statistics. Real-time analysis is limited in that it uses the same threshold over all channels and
can vary by as much as 8% from the later analysis using an adaptive threshold. The primary
purpose of real-time monitoring in the acquisition program is to alert those monitoring the
experiment. If problems arise, they can be verified (by direct observation of the mouse) or
corrected during the experiment. More accurate sleep and wake parameters are generated with
the sleepstats() program in the MouseRecDataTools toolbox.
(a)
(b)
Figure 8. Histogram of sleep-wake statistics. (a) Several days with mouse in typical sleep and wake
cycles. (b) Empty channel, noise-only.
10
E. MonitoringPercentSleepforAllActiveChannels(SummaryTab)
The percentage sleep for each channel can be observed at any point during the recording in the
Summary panel shown in Fig. 9. The percentage is based on the sleep threshold and the
histogram formed from the accumulating data. The threshold can be changed during the
experiment, which will change these numbers accordingly. The example shown below is for
noise only channels with sleep percentages all less than 1%. Outliers can be identified here early
in the experiment and can be followed up with direct observation of the mouse or checking the
function of the sensor (e.g. ensure cable is plugged in).
Figure 9. Sleep percentage summary.
F. CurrentFileInformationandReal‐TimeSettings(Settings/Information
Tab)
After data collection has begun, current information and settings will appear on the
Settings/Information tab shown in Fig. 10. The information in the following text boxes cannot be
changed: Number of active channels, Start Time, File Path, and Active NI-DAQ Device. These
were set earlier when the data acquisition session began. The start time is stored in the data file
header so it is saved with the data to create an absolute time axis for computing statistics related
to the light and dark periods, as well as confirming the date the experiment began. The last line
can be changed and is described below.
Sleep Threshold: The classifier maps features extracted from the signal dynamics related to
sleep to greater (positive) values and those related to wake to lesser (negative) values. Since
these dynamics vary for different mice, the decision statistics will likewise shift depending on
the degree to which the mice follow the average patterns derived from the examples used during
the development of the algorithm . The sleep signal dynamics have less variability than the wake
11
signal dynamics. Therefore, the decision statistics for sleep tend be more consistent, with a small
standard deviation as observed in the modal peaks of Fig. 11a, clustered around 6. Note that
changing the threshold during runtime does not affect how data are saved and their subsequent
analysis; however, it does change the sleep-wake statistics reported during the experiment. The
Sleep Summary table updates the sleep percentages based on the changed threshold. The default
value is zero and independent tests have shown that this threshold minimizes the error over a
wide variety of mice (error less than 10%). In general, thresholds between -1 and 1 tend to work
well. It is recommended that this threshold be left at 0 unless unusual behavior or histograms are
observed (and it makes sense to change this). The sleep threshold can also be changed after the
experiment during data analysis in the MouseRecDataTools toolbox.
Figure 10. Settings/Information panel after the program has started data acquisition.
G. MonitoringDecisionStatisticsforAllActiveChannels(HistogramPanel
Tab)
To view histograms of the sleep-wake decision statistics, click the Histogram Panel tab. The
Histogram Panel shows histograms for 4 active channels at a time, as illustrated in Fig. 11. If
there are more than 4 active channels, the Page text box can be incremented to view results from
the rest of the channels. This provides a quick way to examine the data collection and sleep-wake
12
behavior over the experiment. Unusual behaviors or data collection problems can be identified
while the experiment is running, which can be addressed by direct observation of the mouse.
(a)
(b)
Figure 11. Histogram Panel showing 4 channels simultaneously. The Page box can be used to switch to
other active channels if more than 4 channels are active. (a) From cages with typical sleep-wake patterns.
(b) Noise-only channels (no mice in cages).
13
H. MonitoringSensorSignalsforAllActiveChannels(GraphPanelTab)
To view simultaneous sensor signals for the active channels, click the Graph Panel tab. The
Graph Panel will appear, as shown in Fig. 12, and display 4 active channel signals over the last 8
seconds. If there are more than 4 active channels, the Page text box can be incremented to page
through the rest of the channels. The thin green bar (virtual LED) above each plot on the Graph
Panel is the sleep indicator. A lit indicator implies detected sleep. The y-axes of the graphs on
the Graph Panel are fixed from -1 to 1. These graphs by default do not autoscale the signal like
the graphs on the Raw Data panel so relative amplitudes can be observed. The primary purpose
of these graphs is to view all the cage signals quickly to see if there are problems (broken
connections, amplifiers not plugged in, dead mice, etc.). However, by right clicking on the yaxes of these graphs, you can turn on the autoscale to see more detail for weaker signals. There is
a 2 second delay between what is happening in the cage and what appears on the screen.
3. FileInformation
MouseRec saves three data files. The file with a base name (provided at the beginning of the data
acquisition session) and the bin extension, stores the raw data from the sensors. The file with the
Feat extension stores the real-time sleep-decision statistics, and the file with the FeatVec
extension stores the feature vector used to calculate the sleep statistics. The FeatVec file is used
by the analysis programs in the MouseRecDataTools toolbox developed by Signal Solutions.
These files are updated to the disk at least once every 2 seconds during the data acquisition
session. Therefore, if the system crashes due to a power failure, data up to the point when the
computer system failed are saved.
The program samples the piezoelectric signals at 128 Hz and 16 bits (2 bytes) per sample per
channel. A 16-channel recording will write 354 MB of data per day. If disk storage is limited, it
may be necessary to periodically stop data collection, remove existing data files, and restart the
recording with a new file. This, however, complicates file and data management. It is best to
have a computer with sufficient hard disk space and removable media to transport the large files
to other systems for archiving and analysis.
The size of the raw data file can be estimated in terms of the number of days and active channels
by the following formula:
(2  24  60 2  128)  d  C
B
 22.12dC ,
10 6
where d is the number of days, C is the number of active channels, and B is the file size in
megabytes (MB).
The Feat and FeatVec files are considerably smaller. The Feat file consumes about 346 kB/day
and the FeatVec file consumes roughly 1.4 MB/day for each channel.
14
(a)
(b)
Figure 12. Graph Panel displaying piezoelectric sensor signals for 4 active channels.
The Page box is used to switch to other active channels when more than 4 channels
are active. (a) y-axis fixed (default) with typical sleep signals in channels 1, 2, and 4,
and wake signal in channel 3. (b) y-axis switched to autoscale with typical sleep
signals in channels 1 and 4, and wake signals in channels 2 and 3.
Download PDF