Skip to content
Snippets Groups Projects

Generation, processing, and analysis of brain imaging confounds for UK Biobank

This repository has the whole toolset used for the work for the Generation, processing, and analysis of brain imaging confounds for UK Biobank.

The contents of the directories are:

  • data: Text files with confound names and IDP groupings. This directory will be fully populated once the scripts in generate_initial_data are run.
  • bash_scripts: Command line bash scripts that can be useful for general purpose.
  • generate_initial_data: Scripts to generate the confounds, IDPs, and non-IDPs data files that will be used in the main processing stages. Instructions on how to run them can be found in the README.md of that directory.
  • confound_processing: Main set of scripts (mostly in matlab) that perform the processing and analysis of the confounds as well as generate the main set of figures.
    • functions: Matlab functions that will be called in an SGE cluster.
    • scripts: Matlab / python / bash scripts that will perform the analysis. They are numbered by the order of execution.
    • common_matlab: Utilities to be used by matlab code. This includes libraries such as (FSLNETS).

An interactive version of the Figures can be found in this link.

These html files are also generated with the scripts in confound_processing.

Instructions

  • Download the FBP (Biobank Pipeline)
  • Activate bb_python virtual env.
  • Adapt the script init_vars to your system configuration and source it.
  • Add sh_utils directory to $PATH
  • Set $subjDir to the absolute path to the directory of all UKB subjects (a file subj.txt is needed as an index in that directory).
  • Each subject in $subjDir needs to be in UKB directory format. A DICOM directory is needed for each subject with the *.txt and *.dcm generated by FBP
  • Set $SUBJECTS_DIR to the absolute path to the directory of all UKB subjects Freesurfer results (a file subj.txt is needed as an index in that directory).
  • Change $MATLAB_BIN to the appropriate Matlab binary

Dependencies

  • FBP (UK Biobank Pipeline).
  • bb_python
  • Some functions in confound_processing run in parallel using SGE (SUN Grid Engine).
  • Matlab code was run with version 2017a.
  • R code was run with version 3.6.1
  • Python scripts will need the following libraries not included in bb_python:
    • plotly==3.10.0
    • fmrib-unpack==1.4.1