Beauchamp:RAVE:Condition Explorer

From OpenWetWare
Jump to navigationJump to search
Brain picture
Beauchamp Lab



R Analysis and Visualization of ECOG Data (RAVE)

Return to list of tutorials.


Time Frequency Analysis with Condition Explorer Module

Condition explorer is a module designed to test individual electrodes for differences in power over time across specified frequency ranges under different experimental conditions. Experimental trials are split into two groups based on the presence or absence of a user specified experimental condition. Heat maps are created for each group, with color representing power (mean % signal change) across time (x-axis) and frequency (y-axis). Based on the heat maps, the user can then specify ranges of time and frequency to compare differences in signal change based on experimental condition. The mean of the signal change in the selected frequency range for each condition is graphed over time. Additionally a windowed comparison graph with t-test of difference in mean % signal change (at the selected time window and in selected frequency range) is computed to determine statistical significance. Finally, heat maps of mean % signal change in the given frequency range are plotted over time for each experimental trial.

  1. Import data (see getting started for details)
  2. Once data is imported, click on 'Condition Explorer' in the left column.
    • note, to make left column with module names go away, click 'Modules' on the top purple bar. Clicking again will make the list of modules reappear.
  3. Start with the 'Global Variables' in the left column.
    • First type in names of your conditions under 'Condition A Name' and Condition B Name'. These names can be anything, and are used for labeling graph outputs.
    • Under 'Choose Group A Conditions', click on the text box and a dropdown of conditions will appear. These conditions are from the 'trials.csv' file in the /meta folder, and are listed as 'stimulus'_'type' based on the data in the 'Stimulus' and 'Type' columns for each trial. Click on a condition to add it to group A conditions. Once a condition is added, you can click it and press 'delete' on the keyboard to remove it.
    • Use the same process to populate 'Choose Group B Conditions'. Note you can have overlapping conditions in group A and group B if desired.
    • Under 'Frequencies', use the slider to select the desired frequency range for calculation.
    • Under 'Baseline Range', use the slider to select what time range to use for baseline correction (usually prior to stimulus onset).
    • Under 'Analysis Range', use the slider to select over what time range the mean % signal change will be compared between condition A and condition B.
    • Note when you change 'Frequencies', 'Baseline Range', and 'Analysis Range', white boxes on the heat maps adjust corresponding to the ranges selected.
  4. On the right (main area) of the page, the basic visualization tab has multiple images, the output of RAFE. These images update automatically as the global and local variables are adjusted. To turn off automatic updating, click 'Controls' in the upper right corner on the purple bar, then click 'Auto-Calculation' so that it reads 'Auto-Calculation OFF'.
    • Heat Map: time is on the x-axis; frequency is on y-axis; color represents mean % signal change at each time and frequency; when group A and group B conditions are both assigned, the heat map on the left is for the averaged group A conditions, and the heat map on the right is for the averaged group B conditions.
    • Mean over Frequency, over trials:
    • Windowed Comparison:
    • Trials (mean over frequency):
  5. You can view this data in the SUMA portion of AFNI. Click 'Push to SUMA' to perform the above analysis on every electrode, and visualized the electrodes projected over the brain in 3-dimensions. The electrodes are color coded based on the results of the statistical comparison.
  6. Clicking 'Export Module' exports the code with above parameters set. Adjustments can then be made to generate images for publication.



Return to list of tutorials.