Skip to content

This repository contains basic local field potential analysis scripts and functions for the paper 'Closed-loop recruitment of striatal interneurons prevents compulsive-like grooming behaviours'

License

Notifications You must be signed in to change notification settings

LizbethMG/NatureNeuroscience_2024_LFP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Mondragon-Gonzalez et al., 2024, Nature Neuroscience

LFP analysis

This repository contains basic local field potential analysis scripts and functions.
Link to article »

Table of Contents

1 System Requirements

  • MATLAB version: The code was developped using Matlab R2017b and also tested using Matlab R2019b and R2023b.
  • Operating System: The code was developped and tested under Windows 7 and 10.
  • MATLAB Toolboxes: Curve Fitting Toolbox, Signal processing toolbox, Wavelet Toolbox ( and helperCWTTimeFreqPlot.m from R2016a, included in the repository)
  • Third-party MATLAB functions: Kelly Kearney (2024). 'boundedline.m', GitHub. Retrieved March 25, 2024. Brandon Kuczenski (2024). 'vline.m', MATLAB Central File Exchange. Retrieved March 25, 2024.

2 Installation Guide

  1. Clone the repository to your local machine:
    git clone https://github.com/LizbethMG/NatureNeuroscience_2024_LFP.git
  2. Navigate to the cloned directory:
    cd NatureNeuroscience_2024_LFP
  3. Download the data used for the analysis and add it to your 'Data' project's folder.
  4. Add the project folder to your MATLAB path. You can do this in two ways:
  5. Using the MATLAB Command Window
    • Open MATLAB.
    • In the Command Window, type the following command, replacing yourpath with the path to your project:
      addpath('yourpath');
      savepath;
    Using the MATLAB Set Path Dialog
    • Open MATLAB.
    • On the Home tab, in the Environment section, click Set Path.
    • Click Add with Subfolders.
    • Browse to the project folder and click OK.
    • Click Save and then Close to save the changes.
  6. Install (if not already done) the Matlab Toolboxes mentioned in "1 System Requirements"
Typical install time: 10 min.

3 Description of Code's Functionality


→ Basic analysis scripts to explore LFP signals around grooming events. The complete description can be found in the Methods section of the paper.
♦ For more detailed information, users can refer to the in-code comments within the script and its functions.

INPUT

  • config.m configuration file of the experiment(s)
  • data files copied in the Data/ folder

Data processing Wavelet analysis

  • slmg_waveletn.m
    • Loads data for each experiment, and prepares it for further analysis. It ensures that the data is standardized across events and sessions to facilitate consistent analysis.
    • Low pass filtering
    • Wavelet analysis
    • Compute power within a specified frequency band
    • Compute maximum wavelet power within specified frequency band

Visualization

  • plotWaveletContour Creates a contour plot of continuous wavelet transform (cwt) coefficients over time and frequency.

OUTPUT

  • Generates different plots within a frequency band:
    • Wavelet contour
    • Power vs time
    • Power vs frequency
  • maxPower Maximum power and its corresponding time and frequency values

4 Instructions for Use

Working with the demo data

  • Ensure you added the project folder to your MATLAB path and set it as the current folder. In Matlab Command Window type pwd the result should be 'YOUR_PATH\NatureNeuroscience_2024_LFP'
  • Run the Live Script file LFP_Analysis.m. It will run the code for the data folder selected in config.m line confWV.animalList = {M#ID}; .

Working with Dataset 2

It features the electrophysiological recordings in the mice's orbitofrontal cortex around grooming events. The data is available at the Open Science Framework DOI: 10.17605/OSF.IO/KDMJT

  • Download dataset 2.
  • Add the downloaded folder to your MATLAB path containing the code inside the Data\extractedData folder.
  • To analyze data from subject 1 you would have the source data file as: YOUR_PATH\NatureNeuroscience_2024_LFP\Data\extractedData\M1\datasource_M1.mat
    Each sub-folder in the data set 1 corresponds to a single subject (SAPAP3-KO). Each experiment has its configuration information in the config.m

♦ Expected run time for demo: For one subject (20 grooming events, 4 channels) like the one on dataset2 (M1), on a general-purpose computer expect the following approximately runtimes:
~ 14 s -- CPU: Intel Core i9-7960X @ 2.8 GHz, RAM: 32 GB, Operating System: Windows 10 64-bit, Matlab 2019b.

5 Citation

If you use this code or data we kindly ask you to cite our work.

  • Data:

(APA style) Mondragón-González, S. L. (2024, March 26). 2024_Mondragon-Gonzalez_NatureNeuroscience. https://doi.org/10.17605/OSF.IO/KDMJT

@article{Mondragon2024, title = {Closed-loop recruitment of striatal interneurons prevents compulsive-like grooming behaviours}, author = {Sirenia Lizbeth Mondragón-González and Christiane Schreiweis and Eric Burguière}, journal = {Nature Neuroscience}, year = {2024}, url = { https://www.nature.com/articles/s41593-024-01633-3 }}

6 License

Copyright <2024> <COPYRIGHT Sirenia Lizbeth Mondragón-González>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

This repository contains basic local field potential analysis scripts and functions for the paper 'Closed-loop recruitment of striatal interneurons prevents compulsive-like grooming behaviours'

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages