The study template expects input data to adhere to BIDS. You can check whether your data complies with the BIDS standard using the BIDS validator.
First, you need to make sure you have MNE-Python installed and working on your system. See the installation instructions. Once this is done, you should be able to run this in a terminal:
$ python -c "import mne; mne.sys_info()"
You can then install the following additional packages via
pip. Note that
the URL points to the bleeding edge version of
$ pip install https://github.com/mne-tools/mne-bids/zipball/master
Generally, there is a single
config.py file, which contains all parameters
for the analysis of the data. Many parameters are automatically inferred from
the BIDS structure of the data.
All other scripts should not be edited.
To ease interaction with the study template, there is a
make from the root of your study template to see a summary of what
you can do, or inspect the file directly.
For Windows users, it might be necessary to install GNU make.
Running on your own data
- Make sure your data is formatted in BIDS
- Set an environment variable
BIDS_ROOTto point to your dataset
- (optional) Set an environment variable
MNE_BIDS_STUDY_CONFIGto point to a custom
config_<dataset_name>.pyfile that you created to overwrite the standard parameters in the main
- Use the
Makefileto run your analyses
The following table provides a concise summary of each step in the pipeline.
|config.py||The only file you need to modify in principle. This file contain all your parameters.|
|01-import_and_filter.py||Read raw data and apply lowpass or/and highpass filtering.|
|02-apply_maxwell_filter.py||Run maxfilter and do lowpass filter at 40 Hz.|
|03-extract_events.py||Extract events or annotations or markers from the data and save it to disk. Uses events from stimulus channel STI101.|
|05a-run_ica.py||Run Independant Component Analysis (ICA) for artifact correction.|
|05b-run_ssp.py||Run Signal Subspace Projections (SSP) for artifact correction. These are often also referred to as PCA vectors.|
|06a-apply_ica.py||As an alternative to ICA, you can use SSP projections to correct for eye blink and heart artifacts. Use either 5a/6a, or 5b/6b.|
|06b-apply_ssp.py||Apply SSP projections and obtain the cleaned epochs.|
|07-make_evoked.py||Extract evoked data for each condition.|
|08-group_average_sensors.py||Make a group average of the time domain data.|
|09-sliding_estimator.py||Running a time-by-time decoder with sliding window.|
|10-time_frequency.py||Running a time-frequency analysis.|
|11-make_forward.py||Compute forward operators. You will need to have computed the coregistration to obtain the
|12-make_cov.py||Compute noise covariances for each subject.|
|13-make_inverse.py||Compute inverse problem to obtain source estimates.|
|14-group_average_source.py||Compute source estimates average over subjects.|
|99-make_reports.py||Compute HTML reports for each subject.|
The original pipeline for MEG/EEG data processing with MNE python was build jointly by the Cognition and Brain Dynamics Team and the MNE Python Team, based on scripts originally developed for this publication:
M. Jas, E. Larson, D. A. Engemann, J. Leppäkangas, S. Taulu, M. Hämäläinen, A. Gramfort (2018). A reproducible MEG/EEG group study with the MNE software: recommendations, quality assessments, and good practices. Frontiers in neuroscience, 12. https://doi.org/10.3389/fnins.2018.00530
The current iteration is based on BIDS and relies on the extensions to BIDS for EEG and MEG. See the following two references:
Pernet, C. R., Appelhoff, S., Gorgolewski, K. J., Flandin, G., Phillips, C., Delorme, A., Oostenveld, R. (2019). EEG-BIDS, an extension to the brain imaging data structure for electroencephalography. Scientific Data, 6, 103. https://doi.org/10.1038/s41597-019-0104-8
Niso, G., Gorgolewski, K. J., Bock, E., Brooks, T. L., Flandin, G., Gramfort, A., Henson, R. N., Jas, M., Litvak, V., Moreau, J., Oostenveld, R., Schoffelen, J., Tadel, F., Wexler, J., Baillet, S. (2018). MEG-BIDS, the brain imaging data structure extended to magnetoencephalography. Scientific Data, 5, 180110. https://doi.org/10.1038/sdata.2018.110