memobc / memolab-fmri-qa

Scripts for doing general QA on fMRI data, including ArtRepair
MIT License
8 stars 6 forks source link

MemoLab fMRI QA

SPM-based scripts for doing general QA on fMRI data, including identification of suspect timepoints with ArtRepair and generation of several diagnostic plots. QA can be run on several subjects at once.

Requirements:

Note that any toolboxes placed in a folder called vendor within the repository will be automatically added to the Matlab path (and ignored by GitHub).

Features:

Usage:

  1. Edit the top section of memolab_batch_qa.m to specify your input paths, variables, etc. All inputs are described in detail within the script.
  2. Run the memolab_batch_qa script. It will run all steps detailed below.
  3. If you need to run the script again, you can do so and it will skip over steps that have already been run (if you want it to).

Processing steps:

  1. Add SPM path
  2. Begin loop over subjects
  3. Check whether QA has already been run for a subject by checking the existence of the resulting files – gives user the option to stop if it’s been run
  4. Convert DICOM images or find Nifti images by SPM functions: convert_dicom.m or find_nii.m
  5. Run realignment to generate motion parameters: batch_spm_realign.m
    • Check whether motion parameters file exists for only the first run – gives user the option to skip this step if it’s already been run
    • Save motion parameters file for each run: rp*.txt
  6. Run ArtRepair to identify bad timepoints: run_art_global.m
  7. Calculate temporal SNR and spatial SNR: compute_snr.m
    • Check whether files exist: (6 in total) – gives user the option to overwrite
    • Apply the ArtifactMask.nii generated from ArtRepair to mask out non-brain data
    • Temporal SNR
    • Spatial SNR
  8. Create Power et al. 2016's voxplot: run_theplot.m
  9. Create spike regressors for late addition to a GLM: create_spike_regs.m
  10. Save out summary information for each subject (cell array format): save_sum_info.m
    • Frame displacement
    • Temporal SNR
    • Temporal SNR midslice
    • Spatial SNR

Output:

Plots

Other files

More information:

References

Authors & Contributors