Auditory brainstem responses are routinely collected to determine hearing thresholds. The ABR waveform contains additional information on brainstem activity, but previously, many researchers have had to analyze these manually. R scripts work with R software in the RStudio framework to semi-automate ABR waveform analysis.
They are free and easy to use. Our hope is that routine analysis of the ABR waveform will enable later studies to assess the relevance of this pre-cognitive auditory processing in diagnosis. To begin, export the auditory brainstem response or ABR recording as an ASCII file.
For IHS, open the computer program, load the file of interest and display the desired waveforms on one page. Under the data Tab, select Save Page as ASCII to obtain a txt file. After naming the data file appropriately with an ID, record the ID and subject information in a metadata file named info.
csv, ensuring not to include any information such as the genotype, sex, age, or treatment in the ID.Repeat the steps with all the files to be analyzed as separate ID files and obtain the metadata. Download and install the R and RStudio programs from their respective websites. Then install the required libraries, tidyverse, Shiny, Plotly, and Zoo, with the required commands in the command window of RStudio.
Next, download the scripts findpeaks. r and see_trace_click. r from the White Lab GitHub, as well as the associated file time.csv.
Create a new folder named Test Folder to place all the ASCII files, info. csv, and time.csv. Within the Test Folder, create a subfolder named ASCII Folder and place the ASCII files.
Open the findpeaks. r script in RStudio by right-clicking on the tab for the script in the toolbar to select the set working directory and set it to Test Folder. In the script window, click Source on the upper right-hand side of the toolbar to load the program.
Then in the command window, use the commands to analyze the waveforms in individual and batch processing modes. Load the the waveform data for the specific individual using the command. Next, in the opened window of see_trace_click.
r script in RStudio, click the Run App button in the header and wait for a new interactive window to appear. In the box on the top left, input the sound level for the waveform that requires revision and look for the waveform displayed in the window. Move the cursor around the waveform to reveal the latency and amplitude at any point.
To record the latency and amplitude data, click on the correct peak and then copy/paste the data into the csv file. Repeat the process to record the data for the trough following an immediate peak and calculate the amplitude measurement by subtracting the trough amplitude from the peak amplitude in the spreadsheet cell. Transfer the verified.
csv files to a new subfolder named Peak Data in the Test Folder to append the data. Next, combine the metadata by executing the command. To perform statistical analysis on the compiled data, use a test for normality such as the Shapiro-Wilk test to assess the distribution of the data by executing the function.
If the Shapiro-Wilk test is not significant, it means the dataset has a normal distribution. Hence, assess the data with a parametric test such as ANOVA by executing the function. If the Shapiro-Wilk test is less than P equals to 0.05, use the Kruskal-Wallis rank-sum test or another appropriate non-parametric measure.
Finally, display the average waveforms by executing the command. In the waveform response of 75 decibels click stimulus for a young F1 mouse, the peaks and troughs were automatically identified with findpeaks.r. The waveforms between 5 and 75 decibels obtained from the manually identified peaks and findpeaks.
r were compared. The averages are plotted as heavy lines with the shaded region representing one standard deviation and the results obtained by findpeaks. r correlates strongly with the manual results.
When attempting this procedure, remember to set the working directory as it is highly crucial. R script designates peaks and troughs based on the latency windows for the mouse ABR implemented with the time. csv file.
This may be modified by users to quantify other EEG waveforms.