DOI: 10.6084/m9.figshare.27605184
title: <b>Low-frequency deep brain stimulation in NREM sleep modifies memory retention in Parkinson’s disease: Scripts and data.</b>

description: This code analyses behavioural and electrophysiological data from a group of 18 Parkinson patients performing a memory test before and after frequency-specific deep brain stimulation (DBS) during the first non-rapid eye movement (NREM) sleep after sleep onset. One group (n=9) received 25 min (5 blocks of 5 min each) of high frequency (HF) DBS at 130 Hz, while the other group received low frequency (LF) DBS at 4 Hz. For the remained of the night and following morning all patients received clinical HF DBS. The main outcome is change in recalled words after LF vs. HF DBS. Secondary outcomes are low frequency oscillatory (LFO) power (2-8 Hz; extracted from four 1 min rest recordings in between each stimulation block) after LF vs. HF DBS and correlation between LFO power and change in recalled words. Multiple clinical variables were compared between groups to assess any clinical differences.<br>The code has been tested on a MacBook Pro, macOS Catalina 10.15.7 except from preprocessing of EEG data, which was run on a Windows server (NeuroImaging Center, Mainz, Germany). All data were analysed in Matlab (2023a on MacBook, 2021b on Windows server; requires a software license) and FieldTrip. The correlation between LFP power and change in recalled words was illustrated using R software. Installation guides can be found on: https://matlab.mathworks.com/, https://www.fieldtriptoolbox.org/download/ and https://cran.r-project.org. Installation times vary between the softwares. Run times of the individual scripts is short (seconds) for most analyses except from preprocessing of EEG data, which might take ~10-20 min for all participants.<br>All data is provided after the preprocessing stage (clinical variables, recalled words, LFO power and power spectral densities for each participant).Data:“PatientData.csv” contains the clinical variables, recalled words and LFO power.“PSD.mat” contains individual power spectral densities from 1-30 Hz.<br>Scripts:Raw EEG data were preprocessed using “MemoryPreprocessing.m” and mean power spectral densities extracted using “MemoryGroupAnalysis.m”. The latter saves the file PSD.mat.<br>“ClinicalStats.m”: Compares all clinical variables between groups using Wilcoxon tests and shows the corresponding P- and z-values.Binary data is compared using Fisher’s exact test.“Fig1b_MemoryStats.m”: Compares change in recalled words and baseline differences using Wilcoxon tests and shows the corresponding P- and z-values. It also plots change in recalled words for both groups separately corresponding to figure 1B.“Fig1c_PSDStats.m” compares LFO power using Wilcoxon tests and shows the corresponding P- and z-values, runs a Spearman correlation between change in recalled words and LFP power for each group and lists the corresponding P- and rho-values, and plots individual LFP power corresponding to figure 1C.“Fig1d_Plotcorrelation_ranked.R” is an R script illustrating the non-parametric correlation between change in recalled words and LFO power in the LF DBS group corresponding to figure 1D.<br><br>