{"id":19252314,"url":"https://github.com/sccn/practical_meeg","last_synced_at":"2025-04-21T13:30:55.717Z","repository":{"id":150759839,"uuid":"575215490","full_name":"sccn/practical_MEEG","owner":"sccn","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-04T09:26:54.000Z","size":1596,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T13:38:11.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sccn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-07T02:19:02.000Z","updated_at":"2024-02-13T11:05:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"630c4672-3c20-4a76-87b9-bc75d946299a","html_url":"https://github.com/sccn/practical_MEEG","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Fpractical_MEEG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Fpractical_MEEG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Fpractical_MEEG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2Fpractical_MEEG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sccn","download_url":"https://codeload.github.com/sccn/practical_MEEG/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064552,"owners_count":21368926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T18:26:20.994Z","updated_at":"2025-04-21T13:30:55.711Z","avatar_url":"https://github.com/sccn.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis repository is for the EEGLAB sessions of the [practical MEEG 2022 workshop](https://practicalmeeg2022.org/). There are 5 sessions:\n* Preprocessing\n* Single sensor analysis (ERP/ERF)\n* Single and distributed sources\n* Time-frequency domain\n* Group-level analysis\n\nFor each session, we have prepared a script detailed below.\n\n# Data\n\nWe will use data from the multimodal face recognition dat. BIDS dataset containing a pruned version of the OpenNeuro dataset ds000117. It is available [here](https://zenodo.org/record/7410278).\n\nThe dataset above only contains one subject. For group level analysis, please use the following BIDS repository [here](https://openneuro.org/datasets/ds002718/versions/1.0.5).\n\nThe scripts using the single subject data assume the datafiles are located in the folder (Data/sub-01) located in the parent folder of this repository in your file system. See below the code used in the scripts to locate the file:\n\n\tRootFolder = fileparts(pwd); % Getting root folder\n\tpath2data = fullfile(RootFolder,'Data', 'sub-01'); % Path to data \n\nFor Session 5, copy the data folder (please rename to 'ds002718') containing the ds002718 in the same 'Data' folder. These files will be distributed later on.\n\n# Preprocessing\n\nFor this presentation, we will first import the data with the [PracticalMEEG_Import_Data_Session_1.m](PracticalMEEG_Import_Data_Session_1.m) script. This script has 11 steps. \n\n* Step 1: Importing MEG data files with FileIO\n* Step 2: Adding fiducials and rotating montage\n* Step 3: Recomputing head center (for display only)\n* Step 4: Re-import events from STI101 channel (the original ones are incorect)\n* Step 5: Selecting EEG or MEG data \n* Step 6: Cleaning artefactual events (keep only valid event codes)\n* Step 7: Fix button press info\n* Step 8: Renaming button press events\n* Step 9: Correcting event latencies (events have a shift of 34 ms as per the authors)\n* Step 10: Replacing original imported channels\n* Step 11: Creating folder to save data if does not exist yet\n\nAfter importing the data, it is preprocessed using the [PracticalMEEG_Preprocess_Data_Session_1.m](PracticalMEEG_Preprocess_Data_Session_1.m) script. This script itself has several steps.\n\n* Re-Reference the data\n* Resampling the data (for speed)\n* Filter the data\n* Automatic rejection of bad channels\n* Re-Reference again\n* Repair bursts and reject bad portions of data\n* run ICA to detect brain and artifactual components\n* automatically classify Independent Components using IC Label\n* Save dataset\n\n# Single sensor analysis (ERP/ERF)\n\nFor this presentation, we will use different vizualization techniques using the [PracticalMEEG_ERP_Analysis_Session_2.m](PracticalMEEG_ERP_Analysis_Session_2.m) script. The script first further process the data as follow.\n\n* Extract data epochs for the famous, scrambled, and unfamiliar face stimuli\n* Remove the baseline from -1000 ms to 0 pre-stimulus\n* Apply a threshold methods to remove spurious epochs\n* Resave the data\n\nThen it plots the data using the following methods:\n\n* Plot ERP butterfly plot and scalp distribution at different latencies\n* Plot ICA component contribution to the ERP\n* Remove ICA artifactual components and replot\n* Plot series of scalp topography at different latencies\n* Plot conditions overlaid on each other\n* Plot ERPimages\n\n# Single and distributed sources\n\nFor this presentation, we will the script [PracticalMEEG_Source_Reconstruction_Session_4.m](PracticalMEEG_Source_Reconstruction_Session_4.m). It performs the following steps.\n\n* Definition of head model and source model\n* Localization of ICA components\n* Plotting of ICA components overlaid on 3-D template MRI\n\n# Time-frequency decomposition\n\nFor this presentation, we will the script [PracticalMEEG_Time_Frequency_Analysis_Session_3.m](PracticalMEEG_Time_Frequency_Analysis_Session_3.m). It performs the following steps.\n\n* Spectral analysis for each of the conditions\n* Time-frequency analysis for each of the conditions\n\n# Group-level analysis\n\nThe script [PracticalMEEG_ERP_Analysis_GroupAnalysis_support.m](PracticalMEEG_ERP_Analysis_GroupAnalysis_support.m) perform group analysis on a group of subjects.\n\n* Removing components flagged for rejection using ICLabel\n* Plotting grand average ERPs\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsccn%2Fpractical_meeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsccn%2Fpractical_meeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsccn%2Fpractical_meeg/lists"}