Difference between revisions of "Suggested Pipelines"

From MEG Core
Jump to navigation Jump to search
Line 198: Line 198:
{{#mermaid:graph LR
marks --> Covariance;
subgraph MEG Preprocessing
raw[Raw MEG data] --> filter[Basic Filtering];
adc[Raw ADC/PPT<br>data] --> ThresholdDetect;
ThresholdDetect --> marks[Create Markers];
filter --> meg[MEG Data];
subgraph MEG Data Statistics
meg --> Filter[Band-pass<br>filter];
Filter --> Covariance;
{{#mermaid:graph LR
subgraph Synthetic Aperture Magnetometry
Covariance --> Beamformer;
head[Head Model] --> Beamformer;
Beamformer --> image["3D Images"];
{{#mermaid:graph LR
subgraph SAM Workflow
sam_cov --> sam_wts;
sam_wts --> sam_3d;
sam_3d --> AFNI;
AFNI --> sam_wts;
AFNI --> sam_cov;
style sam_cov fill:#fcf
click sam_cov "https://megcore.nih.gov/index.php/Sam_cov" "sam documentation"
style sam_wts fill:#fcf
click sam_wts "https://megcore.nih.gov/index.php/Sam_wts" "sam documentation"
style sam_3d fill:#fcf
click sam_3d "https://megcore.nih.gov/index.php/Sam_3d" "sam documentation"
style AFNI fill:#fcf
click AFNI "https://afni.nimh.nih.gov/" "The AFNI website"
# Create covariance matrices using sam_cov.
# Compute beamformer weights with sam_wts.
# sam_3d uses the weights to compute volumetric images of activity estimates.
# View them with AFNI.
# It didn't work, go back and try again.
# Nope, still didn't work, try this instead.

Latest revision as of 15:29, 20 March 2019

Master Pipeline

Basic MRI Pre-Processing Workflow

For any experiment where you wish to localize data to the brain, the first step is MRI pre-processing. First, MEG data must be co-registered to the space of the MRI, either by manually placing fiducial points on the MRI, or through a semi-automated method where a digital head shape is aligned with a head surface. (Other algorithmic techniques are possible, these will be discussed later). For the purpose of source space reconstruction, the head can be modeled either as a collection of spheres, one per channel, (MultiSphere) or in a realistic fashion using the Nolte model.

Basic Resting State MEG processing

Basic preprocessing of resting state MEG data includes filtering, and possibly artifact removal. Removing artifacts could consist of eliminating bad segments, or a more comprehensive process like ICA. When examining resting state data, the end goals is usually to examine either static measures of power, or connectivity. For connectivity, the output of SAM is a continuous time series, usually the Hilbert envelope of a band limited signal. Following calculation of this time series, other routines (such as ICA, seed based correlation, etc.) can be used to derive connectivity between regions.

Basic Task Based MEG Pipeline

In a task based analysis, you start with raw MEG data, as wells as data from the ADC channels - triggers, stimuli, and responses. Both of these must be pre-processed. Once your MEG data is marked appropriately, you can begin a SAM analysis. If you are interested in time-locked (evoked or event-related) signals, you can use either sam_4d or sam_4dc or sam_ers or sam_ersc, depending on exactly what you want as output. Alternatively, if you do not expect your signals to be time-locked, you can examine changes in induced power using sam_3d or sam_3dc.

Localizing Epileptiform Activity

This describes localizing epileptiform activity from continuous datasets using excess kurtosis. First, a SAM analysis is performed with a relatively narrow bandwidth, 20-70Hz. The program sam_epi is used to produce images of kurtosis, and NIFTIpeak is used to find extrema in the images that may indicate voxels which contain spikes. Once targets are identified, the SAM analysis is essentially run again, this time with a wide bandwidth, on only those specific targets. DataEditor can read the weights for those targets and compute "virtual sensors" at those voxel locations. The epileptologist can then examine the time series and mark epileptic spikes.

Advanced Coregistration SAM Pipeline

There is a limit to the accuracy with which MEG and MRI data can be coregistered using fiducial markers alone. One significant confounding issue is that the brain will be in a slightly different position inside the head in a seated position vs. a supine position. This pipeline describes using sam_coreg to refine the approximate fiducial placements. Once sam_coreg has been performed, the user can either do a traditional analysis using the SAM tools discussed previously, or make use of the programs that leverage the cortical data (patch_wts and roi_wts).