Skip to content

Commit 31e4d2e

Browse files
committed
latest update
1 parent 44ea7a7 commit 31e4d2e

File tree

114 files changed

+881
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+881
-170
lines changed

code/plugins/reformat_plugin.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def reformat_wiki_pages(filepath, filename, parent, output_file, wiki_input_dir=
1717
layout: default
1818
parent: {parent}
1919
grand_parent: Plugins
20+
render_with_liquid: false
2021
'''.format(filename=filename, parent=parent)
2122

2223
print(f"Reformatting {filename} of {parent}...")
@@ -45,7 +46,6 @@ def reformat_wiki_pages(filepath, filename, parent, output_file, wiki_input_dir=
4546
append_text += '''
4647
title: {title}
4748
long_title: {title}
48-
render_with_liquid: false
4949
'''.format(title=title)
5050

5151
append_text += 'nav_order: {order}\n'.format(order=order+1)
@@ -86,7 +86,7 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, formatted_name, order, li
8686
shutil.copytree(os.path.join(plugin_input_dir, 'images'), os.path.join(plugin_output_dir, 'images'), dirs_exist_ok=True)
8787
# copy all .jpg and .png files from input to output dir
8888
for file in os.listdir(plugin_input_dir):
89-
if file.endswith('.jpg') or file.endswith('.png'):
89+
if file.endswith(('.png', '.jpg', '.gif')):
9090
shutil.copyfile(os.path.join(plugin_input_dir, file), os.path.join(plugin_output_dir, file))
9191

9292
# if plugin is 'imat', copy the Docs directory recursively to the output directory
@@ -99,7 +99,8 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, formatted_name, order, li
9999
layout: default
100100
title: {plugin_name}
101101
long_title: {plugin_name}
102-
parent: Plugins'''.format(plugin_name=formatted_name)
102+
parent: Plugins
103+
render_with_liquid: false'''.format(plugin_name=formatted_name)
103104

104105
if plugin_type == 'wiki':
105106
append_text += '\nhas_children: true'
@@ -110,14 +111,14 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, formatted_name, order, li
110111
shutil.copytree(os.path.join(wiki_plugin_input_dir, 'images'), os.path.join(plugin_output_dir, 'images'), dirs_exist_ok=True)
111112
# copy all .jpg and .png files from wiki input to output dir
112113
for file in os.listdir(wiki_plugin_input_dir):
113-
if file.endswith('.jpg') or file.endswith('.png'):
114+
if file.endswith('.jpg') or file.endswith(('.png', '.jpg', '.gif')):
114115
shutil.copyfile(os.path.join(wiki_plugin_input_dir, file), os.path.join(plugin_output_dir, file))
115116

116117

117118
for root, dirs, files in os.walk(wiki_plugin_input_dir):
118119
for file in files:
119120
if file.endswith('.md') and not file.startswith('index') and not file.startswith('Home'):
120-
reformat_wiki_pages(os.path.join(wiki_plugin_input_dir, file), file.strip('.md'), formatted_name, os.path.join(plugin_output_dir, file), wiki_plugin_input_dir)
121+
reformat_wiki_pages(os.path.join(wiki_plugin_input_dir, file), file.replace('.md', ''), formatted_name, os.path.join(plugin_output_dir, file), wiki_plugin_input_dir)
121122

122123

123124
with open(index_file) as f:

plugins/ARfitStudio/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ layout: default
33
title: ARfitStudio
44
long_title: ARfitStudio
55
parent: Plugins
6-
nav_order: 18
6+
render_with_liquid: false
7+
nav_order: 20
78
---
89
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/ARfitStudio).
910

plugins/BVA-io/index.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: default
3+
title: BVA-io
4+
long_title: BVA-io
5+
parent: Plugins
6+
render_with_liquid: false
7+
nav_order: 28
8+
---
9+
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/bva-io).
10+
11+
# BVA-io for Brain Vision Analyzer format
12+
13+
This repository is a plugin for EEGLAB to import/export
14+
Brain Vision Analyzer EEG data files.
15+
16+
# Version history
17+
v1.73 - Writing data now in MULTIPLEXED format as a new option; show warning when VMRK file is missing
18+
19+
v1.72 - Avoid crashing when event file is absent
20+
21+
v1.71 - Allow to import .ahdr files
22+
23+
v1.7 - Better handling of VMRK and EEG file non-consistant witht the header VHDR file; allow empty marker info section; allow importing truncated binary file
1.06 MB
Loading
2.18 MB
Loading

plugins/BrainBeats/index.md

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
layout: default
3+
title: BrainBeats
4+
long_title: BrainBeats
5+
parent: Plugins
6+
render_with_liquid: false
7+
nav_order: 9
8+
---
9+
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/amisepa/BrainBeats).
10+
11+
<!-- <p align="center"> -->
12+
# BrainBeats
13+
<!-- </p> -->
14+
15+
<p align="center" width="100%">
16+
<img width="30%" src="https://github.com/amisepa/BrainBeats/blob/main/brainbeats_logo2.png">
17+
</p>
18+
19+
The BrainBeats toolbox, implemented as an EEGLAB plugin, allows joint processing and analysis of EEG and cardiovascular signals (ECG and PPG) for brain-heart interplay research. Both the general user interface (GUI) and command line are supported (see tutorial). BrainBeats currently supports: 1) Heartbeat-evoked potentials (HEP) and oscillations (HEO); 2) Extraction of EEG and HRV features; 3) Extraction of heart artifacts from EEG signals; 4) brain-heart coherence.
20+
21+
22+
## THREE METHODS AVAILABLE
23+
24+
<p align="center" width="100%">
25+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/diagram.png">
26+
</p>
27+
28+
1) Process EEG data for heartbeat-evoked potentials (HEP) analysis using ECG or PPG signals. Steps include signal processing of EEG and cardiovascular signals, inserting R-peak markers into the EEG data, segmentation around the R-peaks with optimal window length, time-frequency decomposition.
29+
30+
31+
<p align="center">
32+
Example of HEP at the subject level, obtained from simultaneous EEG-ECG signals
33+
</p>
34+
<p align="center" width="100%">
35+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/fig11.png">
36+
</p>
37+
38+
<p align="center">
39+
Example of HEP at the subject level, obtained from simultaneous EEG-PPG signals
40+
</p>
41+
<p align="center" width="100%">
42+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/fig17.png">
43+
</p>
44+
45+
2) Extract EEG and HRV features from continuous data in the time, frequency, and nonlinear domains.
46+
- HRV time domain: SDNN, RMSSD, pNN50.
47+
- HRV frequency domain: VLF-power, ULF-power, LF-power, HF-power, LF:HF ratio, Total power.
48+
- HRV nonlinear domain: Poincare, fuzzy entropy, fractal dimension, PRSA.
49+
50+
- EEG frequency domain: average band power (delta, theta, alpha, beta, gamma), individual alpha frequency (IAF), alpha asymmetry.
51+
- EEG nonlinear domain: fuzzy entropy, fractal dimension
52+
53+
54+
<p align="center">
55+
Example of power spectral density (PSD) estimated from HRV and EEG data
56+
</p>
57+
<p align="center" width="100%">
58+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/fig21.png">
59+
</p>
60+
61+
<p align="center">
62+
Example of EEG features extracted from sample dataset
63+
</p>
64+
<p align="center" width="100%">
65+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/fig22.png">
66+
</p>
67+
68+
69+
3) Remove heart components from EEG signals using ICA and ICLabel.
70+
71+
<p align="center">
72+
Example of extraction of cardiovascular components from EEG signals
73+
</p>
74+
<p align="center" width="100%">
75+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/fig27.png">
76+
</p>
77+
78+
79+
4) Compute brain-heart coherence (beta version, please test and give feedback)
80+
81+
<p align="center">
82+
Example of several brain-heart coherence measures computed with BrainBeats from simultaneous EEG and ECG signals
83+
</p>
84+
<p align="center" width="100%">
85+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/coherence_allfreqs.png">
86+
</p>
87+
88+
<p align="center">
89+
Scalp topography showing scalp regions coherent with ECG signal for each frequency band
90+
</p>
91+
<p align="center" width="100%">
92+
<img width="50%" src="https://github.com/amisepa/BrainBeats/blob/main/figures/coherence_topo.png">
93+
</p>
94+
95+
## Requirements
96+
97+
- MATLAB installed (https://www.mathworks.com/downloads)
98+
- EEGLAB installed (https://github.com/sccn/eeglab)
99+
- Some data containing EEG and cardiovascular signals (ECG or PPG) within the same file (i.e. recorded simultaneously).
100+
Or use the tutorial dataset provided in this repository located in the "sample_data" folder.
101+
102+
## Step-by-step tutorial
103+
104+
See our publication for a step-by-step tutorial using the sample dataset: https://www.jove.com/t/65829/brainbeats-as-an-open-source-eeglab-plugin-to-jointly-analyze-eeg
105+
106+
Full-text preprint: https://www.biorxiv.org/content/10.1101/2023.06.01.543272v3.full
107+
108+
## Version history
109+
110+
v1.5 (5/2/2024) - METHOD 4 (brain-heart coherence) added
111+
112+
v1.4 (4/1/2024) - publication JoVE (methods 1, 2, 3)

plugins/EEG-BIDS/EEG‐BIDS-docs.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
layout: default
3-
title: EEG-BIDS
4-
long_title: EEG-BIDS
53
parent: EEG-BIDS
64
grand_parent: Plugins
5+
render_with_liquid: false
6+
7+
title: EEG‐BIDS-docs
8+
long_title: EEG‐BIDS-docs
79
---
810
# Documentation and tutorial videos
911

plugins/EEG-BIDS/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ layout: default
33
title: EEG-BIDS
44
long_title: EEG-BIDS
55
parent: Plugins
6+
render_with_liquid: false
67
has_children: true
7-
nav_order: 2
8+
nav_order: 26
89
---
910
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/EEG-BIDS).
1011

plugins/ICLabel/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ layout: default
33
title: ICLabel
44
long_title: ICLabel
55
parent: Plugins
6+
render_with_liquid: false
67
nav_order: 0
78
---
89
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/ICLabel).
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: default
3+
parent: MFF-matlab-io
4+
grand_parent: Plugins
5+
render_with_liquid: false
6+
7+
title: 1.-Plugin-install
8+
long_title: 1.-Plugin-install
9+
---
10+
Select EEGLAB menu item **File > Import data > Using EEGLAB functions and plugins > From EGI/Phillips .mff file** as shown below.
11+
12+
![](EEGLAB_install2.png)
13+
14+
If the MFFmatlabio plugin has not be installed, EEGLAB will prompt you to install it (see also [plugin installation](Plugin-installation)). After this, MFFmatlabio will prompt an interface to select an MFF ressource as shown below.
15+
16+
![](mff_import.png)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: default
3+
parent: MFF-matlab-io
4+
grand_parent: Plugins
5+
render_with_liquid: false
6+
7+
title: 2.-Import-MFF-in-EEGLAB
8+
long_title: 2.-Import-MFF-in-EEGLAB
9+
---
10+
Select EEGLAB menu item **File > Import data > Using EEGLAB functions and plugins > From EGI/Phillips .mff file** as shown below.
11+
12+
![](EEGLAB_install2.png)
13+
14+
If the MFFmatlabio plugin has not be installed, EEGLAB will prompt you to install it (see also [plugin installation](Plugin-installation)). After this, MFFmatlabio will prompt an interface to select an MFF ressource as shown below.
15+
16+
![](mff_import.png)
17+
18+
Select a file and press **Open**. The import function will then prompt you about which MFF field or key should be mapped to EEGLAB data type. The selection will depend on your experiment and how you are collecting information during raw data collection. The field MFF event **Code** usually contains relevant information that may be used for EEGLAB type. Note that a combination of fields or keys may be selected. If you select more than one field, the import function will concatenate the field for each event.
19+
20+
![](mff_import_code_select.png)
21+
22+
Once you press OK, the import function will import the data and show the result in the main EEGLAB graphic interface.
23+
24+
![](mff_import_info.png)
25+
26+
You may then use EEGLAB as you would with any other dataset. Refer to the [EEGLAB tutorial](https://sccn.ucsd.edu/wiki/EEGLAB_Wiki) for more information.
27+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: default
3+
parent: MFF-matlab-io
4+
grand_parent: Plugins
5+
render_with_liquid: false
6+
7+
title: 3.-Export-to-Netstation
8+
long_title: 3.-Export-to-Netstation
9+
---
10+
Note that this section assumes that you have an EEGLAB dataset loaded in EEGLAB.
11+
12+
To export data files to MFF format, use menu item **File > Export data > Export Phillips/EGI .mff file**.
13+
14+
![](mff_export.png)
15+
16+
Then enter a file name to export.
17+
18+
![](mff_export_browse.png)
19+
20+
Once the file has been exported, it can imported using Netstation as shown below.
21+
22+
![](netstation.png)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
layout: default
3+
parent: MFF-matlab-io
4+
grand_parent: Plugins
5+
render_with_liquid: false
6+
7+
title: 4.-Exporting-to-BIDS
8+
long_title: 4.-Exporting-to-BIDS
9+
---
10+
In this tutorial, we will see how to export a collection of .mff files to BIDS.
11+
12+
First the [bids-matlab-tools](https://github.com/sccn/bids-matlab-tools) plugin of EEGLAB must be installed. This can be done from the EEGLAB plugin manager (EEGLAB menu item "File > Manage EEGLAB extensions").
13+
14+
Once the plugin has been installed, an EEGLAB study must be created. We will be using [this collection](xxxxx) of 20 MFF files (the final BIDS exported version that contain all documentation about this experiment is available on [Openneuro](xxxx)).
15+
16+
After downloading the files above (the version of the files before conversion to BIDS, we need to import them in EEGLAB and create a STUDY).
17+
18+
Use EEGLAB menu item **File > Import data > Using EEGLAB functions and plugins > From EGI/Phillips .mff file**. Select a collection of files as shown below. Note that selecting a collection of file is only possible when they are in the same folder.
19+
20+
![](bids_mff_folder.png)
21+
22+
Because more than one file is being selected, the import function will then ask you if you want to automatically save datasets. Answer "Yes" to that question, otherwise you will not be able to create a valid EEGLAB STUDY using these datasets.
23+
24+
![](bids_mff_save.png)
25+
26+
A second shown below pops up to ask how to map the MFF fields to the EEGLAB type field. See also [plugin import](2.-Import-MFF-in-EEGLAB) for more information.
27+
28+
![](mff_import_code_select.png)
29+
30+
Then the EEGLAB main interface shows the first dataset imported as shown below.
31+
32+
![](bids_multiple_datasets.png)
33+
34+
The second step is to create a STUDY using all imported datasets. For this, select EEGLAB menu item **File > Create STUDY > Using all loaded datasets** as shown below.
35+
36+
![](bids_create_study.png)
37+
38+
If you have not set up memory options to retain at most one dataset in memory, the following warning message may appear. Simply press OK.
39+
40+
![](bids_study_warming.png)
41+
42+
The following interface will pop up. In this interface, you must enter an ID for each participant if it is not already present (if you fail to enter an ID for each participant, the STUDY interface will ask you to do so). When you are done, press **OK**. Note that if your datasets are missing channel labels, EEGLAB may ask you if you automatically want to create channel labels (answer yes to that question).
43+
44+
![](bids_edit_study.png)
45+
46+
Once the EEGLAB STUDY has been created, the EEGLAB interface will be updated as shown below.
47+
48+
![](bids_study.png)
49+
50+
Exporting STUDY to BIDS require that you install the [bids-matlab-tools](https://github.com/sccn/bids-matlab-tools) plugin of EEGLAB. Use the EEGLAB plugin manager (menu item **File > Plugin manager**) to do so. You may then export this STUDY to BIDS using menu item **File > Export > To BIDS folder structure** as shown below.
51+
52+
![](bids_export.png)
53+
54+
The BIDS interface shown below will pop up. The first input box will indicate the name of the folder to export BIDS data to, then the name of the study, reference and link, authors, distribution license information, README and CHANGE comments. You may enter a description of the experiment in the README section, and a list of authors. These are information which will generate warning messages if you do not include them. Press **OK** when done.
55+
56+
![](bids_interface.png)
57+
58+
Once the data has been exported, it can be validated using the online BIDS validator. This validator does not upload the data, simply scan the files and check for problem. This is the [validator home page](https://bids-standard.github.io/bids-validator/) below.
59+
60+
![](bids_validate1.png)
61+
62+
Select the folder where the data was exported and press OK. The validator will check all the data files and indicate if it encounters problems with the data.
63+
64+
![](bids_validate2.png)
65+
66+
There is much more concerning the generation of BIDS compliant datasets such as individual dataset information, event and channel information that can be fine tuned. These topics are addressed in the [bids-matlab-tools](https://github.com/sccn/bids-matlab-tools) plugin of EEGLAB.

0 commit comments

Comments
 (0)