Singularity is a container technology (similar to Docker). We are using containers to allow for easy distribution of the analysis pipeline and analysis consistency. Singularity was chosen becuase it does not require administrative priveledges during runtime and can be run on an HPC system or local computing resources. Being a container, the analysis can be run on any platform (linux, mac, windows, ...) with singularity installed.
For more information visit: https://sylabs.io/singularity/
The singularity def file can be found at:
To build from scratch: sudo singularity build enigma_meg.sif enigma_meg.def
The pre-built singularity container can be downloaded from (recommended/easier):
The singularity container will be provided in a folder that also includes a ./bin folder The commands within the bin folder are links to functions in the container Commands can be called from the full path: e.g.) /home/jstout/enigma/bin/enigma_rel_power -i /data/my_meg_data/subj1_resting_state.ds Commands can be added to the path and run using the command name: for BASH, add this line to the /home/$USER/.bashrc file and save: export PATH=$PATH:/this/is/the/path/to/enigma/bin enigma_rel_power -i /data/my_meg_data/subj1_resting_state.ds
Freesurfer related operations require a license file (download from https://surfer.nmr.mgh.harvard.edu/fswiki/License). You will need to put your license file in the enigma folder and call it fs_license.txt
Resting State Analysis
The analysis routine has been implemented in MNE python (https://mne.tools/stable/index.html) and packaged into a singularity container. This guarantees that differences in software dependencies and operating system configurations have been eliminated. The analysis has been chunked into steps to make processing straightforward.
1) process_anatomical.py 2) process_meg.py
Surface models: Scalp, Outer Skull, Inner Skull, Pial Surface Coregistration of the MRI and MEG data Parcel extraction (freesurfer autorecon3) Subparcel calculation (mne ....) Source space BEM - single shell
Data Cleanup: (Based on MNE pipeline) (Goal - Remove bad channels, bad segments, correct EOG, correct ECG)
Perform ICA analysis to extract a heartbeat signal Extract heartbeats into epochs Autobad runs on evoked data: Run autobad on ECG epoched data to identify bad channels and bad epochs Perform ICA analysis after excluding bad data Use template to identify and exclude heartbeats and eyeblinks Remove bad ICAs **Save pre and post cleanup noise RMS for use in summary statistics
Source Analysis (and spectral analysis):
Calculate covariance matrix Load anatomical information (source space, bem, ...) Project data to cortical surface (MNE) Extract signal from ROIs Calculate spectrum from ROI and save to csv Calculate relative power by normalizing spectrum by all subject/frequency power
*Evaluate for outliers Compile the single subject CSV files to create a mean and standard deviation at each parcel Save the subject number N and noise level of data
The outputs of the analysis will result in a csv file A csv file for each subject will be created in the subfolder of the singularity directory A final command can be run to calculate the summary statistics
Submission of Results:
After calculating the local institutes summary statistics, the group csv file will be uploaded to the NIMH. The group csv will have mean and standard deviation for each parcel and frequency band A separate demographic csv will also be created with the demographic summary statistics
Statistical results will be produced using hierarchical meta-analysis to adjust for site-specific variance.
Data Harmonization (examples in MRI):
COMBAT - homepage:www.elsevier.com/locate/neuroimagehttp://dx.doi.org/10.1016/j.neuroimage.2017.08.047 Original Paper - (genetics) Adjusting batch effects in microarray expression data using empirical Bayes methods W.E. Johnson, C. Li and A. Rabinovic Biostatistics, 8 (2007), pp. 118-127 COMBAT Normalization in ENIGMA - https://doi.org/10.1016/j.neuroimage.2020.116956 Harmonization of large MRI datasets for the analysis of brain imaging patterns throughout the lifespan - https://www.sciencedirect.com/science/article/pii/S1053811919310419 DTI Harmonization using COMBAT - https://www.sciencedirect.com/science/article/pii/S1053811917306948?via%3Dihub#! Cortical Thickness Harmonization using COMBAT - https://www.sciencedirect.com/science/article/pii/S105381191730931X