Skip to content

restrepd/drgMaster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drgMaster

drgMaster is a pacakge of MATLAB code that does local field potential (LFP) and spike analysis for data recorded using multiple electrodes in awake behaving animals.

Manuscripts

The code in GitHub/drgMaster was used to analyze the data in the following manuscripts:

Losacco et al. elife

Learning improves decoding of odor identity with phase-referenced oscillations in the olfactory bulb. Justin Losacco, Daniel Ramirez-Gordillo, Jesse Gilmer and Diego Restrepo published in eLife in 2020 (https://elifesciences.org/articles/52583).

The data have been deposited in the GigaScience Database, http://doi.org/10.5524/100699

Losacco et al. submitted to Frontiers in Cellular and Molecular Neurosciences

The olfactory bulb facilitates use of category bounds for classification of odorants in different intensity groups. Justin Losacco, Nicholas George, Naoki Hiratani and Diego Restrepo.

The data will be provided upon user request.

Toolboxes

You should install the following MATLAB toolboxes:

Bioinformatics toolbox (for the “suptitle” command)

Curve Fitting Wavelet Signal Processing Statistics and Machine Learning Wavelet

In addition, you will need the following downloads:

Circular Statistics Toolbox (https://www.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox-directional-statistics)

ROC_calc (https://www.mathworks.com/matlabcentral/fileexchange/69883-roc_calc)

boundedline.m (https://www.mathworks.com/matlabcentral/fileexchange/27485-boundedline-m)

Code used in Losacco et al. eLife

Below is a brief explanation of how the data for each of the figures in the Losacco, Ramirez-Gordillo et al. manuscript that were analyzed using MATLAB code deposited here.

The LFP data are found in Giga DB (http://gigadb.org/). The files included are raw data of LFP recordings for each go-no go session stored in two formats: 1) name.rhd files generated by INTAN RHD2000 or 2) name.dg files generated by Data Translation DT3010. Each of these files is accompanied by a header file jt_times_name .mat file information on events (odorant, date, trial time, trial numbers, event: S+ or S-, Hit, Miss, CR, FA, etc). We also deposited intermediary .mat data files.

Figure 1-figure supplement 1 is generated with drgPID.m using 20180618_sharpie_spmc_PID_180618_160444.rhd

Figure 1-figure supplement 2 is generated by drgMaster by choosing either “PAC peak at 180, S+ High MI, S- lo…” or “8Hz, 40Hz, 20 dB” for the drop down menu entitled “Process data or simulation”.

Figure 2A,C-F is an example of phase amplitude coupling (PAC) calculated with drgMaster, a GUI to perform basic analysis of LFP data for each session. This file was generated opening jt_times_ M5_spm_iso_ace_170810_085523.mat in drgMaster and processing “Phase Amplitude Coupling” (a choice the third dropdown menu on the right in drgMaster) with the following choices in the GUI: Trial No: 1 to 99, phase reference frequency: 6-14 Hz (theta), amplitude frequency: 65-95 Hz (high gamma), start/end times: 0.5-2.5 sec, LFP channel (electrode number): 2, S+ or S-, all other choices default.

Figure 2B is the behavioral performance for the same session. This file was generated opening jt_times_ M5_spm_iso_ace_170810_085523.mat in drgMaster and processing “Percent correct per tirial” (a choice the first dropdown menu on the right in drgMaster) with the following choices in the GUI: Trial No: 1 to 99, all other choices default.

Figures 2G-H. First we batch-analyzed PAC parameters for all the files in Exp1 and Exp2 in separate runs of drgRunBatchLFPPar.m using the following choices/output files:

Exp1: drgbChoicesDanielOlfacEAPADRmod04202019.m Olfactorypaper04202019.mat

Exp2: drgbChoicesJustin_LFP_spm_PACpower04172019 spm_LFP_PACpower04172019.mat

To generate Figure 2G we ran drgAnalysisBatchLFP with choices under drgLFPBatchAnalPars_spm_daniel_fig2g.m using the files for APEB forward.

Figure 2H is generated by drgSummaryBatchPAC.m

Figure 2-figure supplement 1 is an example of PAC generated using jt_times_T0_spm_iso_ace_180130_111647.mat with drgMaster as described above for Figure 2A, C-F.

Figure 2-figure supplement 2 is generated by drgSummaryBatchPAC.m

Figure 3A is an example of a wavelet broadband LFP spectrogram calculated with drgMaster. This file was generated opening jt_times_M5_spm_iso_ace_170810_085523.mat in drgMaster and processing “LFP phase-referenced wavelet power” (a choice the third dropdown menu on the right in drgMaster) with the following choices in the GUI: Trial No: 79 to 79, amplitude frequency: 4-100 Hz, start/end times: -2 to 5 sec, subtract reference on, Start/End reference (s):LFP channel (electrode number): 1, S+, all other choices default.

Figure 3Ci is an example of phase-referenced power (PRP) obtained with the same settings in drgMaster with the exception that the Amplitude frequency was 65-95 Hz and PAC reference peak/trough angles were 108 and 0. Figure 3Cii is processed with the same settings except that we include all trials (1 to 97).

Figures 3D-F. First we batch-analyzed PAC parameters for all the files in Exp1 and Exp2 in separate runs of drgRunBatchLFPPar.m using the following choices/output files:

Exp1: drgbChoicesDanielOlfacEAPADRmod04202019.m Olfactorypaper04202019.mat

Exp2: drgbChoicesJustin_LFP_spm_wavephasepower04202019.m spm_LFP_wavephasepower04202019.mat

To generate Figure 3D we ran drgAnalysisBatchLFP with choices under drgLFPBatchAnalPars_Justin_spmwave_dr.musing the files for IAAP forward.

To generate Figures 3E-F we ran d drgSummaryBatchWavPwr.m that loads files with intermediary data generated by drgAnalysisBatchLFP.

Figure 4A is the behavioral performance for three sessions: Forward 4i and Reversed (4ii and 4iii).

The figures can be generated by drgMaster and processing “Percent correct per tirial” (a choice the first dropdown menu on the right in drgMaster) using the following files:

Figure 4Ai: jt_times_T0_spm_iso_ace_180130_111647.mat Figure 4Aii: jt_times_T0_spmr_ace_iso_180131_103513.mat Figure 4Aiii: jt_times_T0_spmr_ace_iso_180201_104706.mat

Figures 4B and C are generated by drgSummaryBatchWavPwrRev.m using data generated by drgAnalysisBatchLFP.m

Figure 5. A batch analysis of LDA and PCA was performed by drgLFPDiscriminantBatch.m using the following choices files:

Exp1: drgbChoicesDiscriminantDanielolfa_spmcall_PCA_LFP_iso42919.m drgbChoicesDiscriminantDanielolfa_spmcall_PCA_LFP_EAPA42919.m drgbChoicesDiscriminantDanielolfa_spmcall_PCA_LFP_Aceto42919.m

Exp2: drgbChoicesDiscriminantJustin_spm_wavephase_04252019_IsoAA_mo.m drgbChoicesDiscriminantJustin_spm_wavephase_05172019_IAAP.m drgbChoicesDiscriminantJustin_spm_wavephase_04252019_EAPA.m

Output files for drgLFPDiscriminantBatch.m:

Exp1: Discriminant_spmc_discriminantolfac_all_PCA_LFP_iso42919.mat Discriminant_spmc_discriminantolfac_all_PCA_LFP_EAPA42919.mat Discriminant_spmc_discriminantolfac_all_PCA_LFP_aceto42919.mat

Exp2: Discriminant_spm_discriminant_LFP_wavephase_04252019_IsoAA_mo.mat Discriminant_spm_discriminant_LFP_wavephase_05172019_IAAP.mat Discriminant_spm_discriminant_LFP_wavephase_04252019_EAPA.mat

Figures 5A and B are generated from this output using drgAnalyzeLFPDiscriminantBatch.m using Discriminant_spmc_discriminantolfac_all_PCA_LFP_aceto42919.mat

Figures 5C and D are generated from these output files using drgAnalyzeLFPDiscriminantMultiBatch.m and load drgbDiscParJustinDanielLDApeaktrough.m

Figure 5E was generated by drgAnalyzeLFPDiscriminantMultiBatch with choices in drgbDiscParJustinDanielLDApeaktrough.m

Figure 6. Decision times.

drgLFPDiscriminantBatchAllMice was run using the following choices files:

Exp1: drgbChoicesDiscriminantDanielolfa_spm_all_mice_iso06082019.m drgbChoicesDiscriminantDanielolfa_spm_all_mice_EAPA06062019.m drgbChoicesDiscriminantDanielolfa_sp_all_mice_Aceto42919.m

Exp2: drgbChoicesDiscriminantJustin_spm_all_mouse_06102019_IsoAA_mo .m drgbChoicesDiscriminantJL_spm_wavep_allm_05312019_IAAP.m drgbChoicesDiscriminantJL_spm_wavep_allm_06062019_EAPA.m

Output files for drgLFPDiscriminantBatchAllMice:

Exp1: Discriminant_spm_discriminantolfac_all_mice_iso06082019.mat Discriminant_spmc_discriminantolfac_all_mice_EAPA06062019.mat Discriminant_spm_discriminantolfac_all_mice_aceto060519.mat

Exp2: Discriminant_spm_discriminant_LFP_all_mouse_06102019_IsoAA_mo.mat Discriminant_spm_discriminant_LFP_wp_all_mouse_05312019_IAAP.mat Discriminant_spm_discriminantJL_spm_wavep_allm_06062019_EAPA.mat

These output files were then processed by drgLFPDiscriminantAllMiceSubset.m to generate the final output files:

Exp1: Discriminant_2spm_discriminantolfac_all_mice_aceto060519.mat Discriminant_2spmc_discriminantolfac_all_mice_EAPA06062019.mat Discriminant_2spm_discriminantolfac_all_mice_iso06082019.mat

Exp2: Discriminant_2spm_discriminantJL_spm_wavep_allm_06062019_EAPA.mat Discriminant_2spm_discriminant_LFP_wp_all_mouse_05312019_IAAP.mat Discriminant_2spm_discriminant_LFP_all_mouse_06102019_IsoAA_mo.mat

At that point drgAnalyzeLFPDiscriminantAllMice does the final analysis of the data generated by drgLFPDiscriminantBatchAllMice/ drgLFPDiscriminantAllMiceSubset

all_mouse_decision_time_summary.m generates the final summary figure

Figure 6-figure supplement 1 is also generated by all_mouse_decision_time_summary.m

Figure 7A is a PCA generated as described above for Figure 5A by running drgAnalyzeDimsLFPDiscriminantAllMice.m with Discriminant_2 inputs.

Figures 7B and C are generated from Discriminant_2 inputs using new_all_mouse_dim_summary.m

Figure 7-figure supplement 1A is generated by per_mouse_dim_summary.m

Figure 7-figure supplement 1B is generated by new_per_mouse_dim_summary.m

Code used in Losacco et al. Frontiers

Figure S1. Ran drgRunBatchBehavior.m with drgbChoicesJustinspmcbeh08232020.m

In order to estimate the contamination when the previous concentration is the 10% dilution we used drgRunBatchInterTrialConc.m with drgbChoicesDiscriminantJustin_LFP_phase_spmc_12282019.m

Figure 1D was generated with drgMaster using the choice "percent correct per trial" in the behavior pull down menu using the following files:

jt_times_M5_spmc_170517_070610.mat jt_times_M5_spmc_170518_072342.mat jt_times_M5_spmcr_170620_071900.mat jt_times_M5_spmcr_170629_084015.mat

Figures 1E and 1F with examples of raw trace, etc were generated with drgMaster using the choice “Phase Amplitude Coupling” in the LFP analysis pull down menu after uncommenting the last few lines in drgGetThetaAmpPhase. The data used was jt_times_M4_spmc_170518_095813.mat.

Figures 2 A-D, an example for PAC were generated with drgMaster using the choice “PAC concentrations” in the LFP analysis pull down menu. The data used was jt_times_M4_spmc_170518_095813.mat.

For Figures 2E-H the INTAN output data were processed with drgRunBatchLFPpar.m drgbChoicesJustinspmc09232019.m generating the output file Justinspmc11082019.mat. This output file was processed with drgAnalysisBatchLFPconc.m using drgLFPBatchAnalPars_Justin_spmc_dr.m.

For Figure 3 examples of per-trial time course of wavelet power and PRP were generated using drgMaster using the choice “LFP phase-related wavelet power” in the LFP analysis pull down menu.

The data used are:

Figures 3A-B: jt_times_R2_spmc_ace_180517_103013.mat Figures 3C-D: jt_times_R2_spmc_ace_180615_111924.mat Figures 3E-F: jt_times_R2_spmc_ace_180516_103013.mat Figures 3G-H: jt_times_R2_spmc_ace_180514_111924.mat

For Figure 4 the data generated by INTAN were processed with drgRunBatchLFPpar.m using drgbChoicesJustinspmc_prp_10082019.m. The output was Justinspmc_prp10082019.mat.

The output of drgRunBatchLFPpar.m was then processed with drgAnalysisBatchLFPconc.m using drgLFPBatchAnalPars_Justin_spmc_dr.m

For Figure 5 the data generated by INTAN were processed with drgRunBatchLFPpar.m using drgbChoicesJustinspmc_prp_10082019.m. The output was Justinspmc_prp10082019.mat.

The output of drgRunBatchLFPpar.m was then processed with drgAnalysisBatchLFPconc.m using drgLFPBatchAnalPars_Justin_spmc_dr.m

For Figure 6 the data generated by INTAN were processed by drgLFPDiscriminantBatch with drgbChoicesDiscriminantJustin_LFP_prp_spmc_08022020.m yielding the output file Discriminant_spm_discriminant_LFP_prp_spmc_08022020.mat. The output file was post-processed with drgAnalyzeLFPDiscriminantBatchConc.m

Figure 7 was generated by running drgAnalyzeLFPDiscriminantBatchConc.m with Discriminant_spm_discriminant_LFP_prp_spmc_08022020.mat

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%