Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

where the first column is called fsid (containing all time points of all subjects) and the second column is fsid-base containing the within-subject template (=base) name, to group time points within subject. You can have many more columns such as gender, age, group, etc. Make sure you include the yearsfromBL column with an accurate measure of the time from the baseline scan for each time point (NOT the time from the previous timepoint). You can use the excel formula (=YEARFRAC) to get the time difference as a year fraction. If you are interested in including other variables in the model, add them into your longitudinal QDEC table. Make sure there are no spaces in the column headings as the file is space separated.

Then smooth the data from each qdec table using a script similar to the below. This example is for one qdec file and smooths to 15 and 20. You can repeat the mris_preproc and mri_surf2surf steps for multiple groups in the same script. Make sure you label the files with the group name if you have multiple qdec tables.

Expand
Code Block
#PBS -P 
#PBS -N assembleAndSmooth
#PBS -l select=1:ncpus=2:mem=32GB
#PBS -q=main
#PBS -l walltime=02:00:00

#PBS -q defaultQ

module load python/3.6.5
module load openmpi-gcc/3.1.3
module load cuda/10.0.130
module load mrtrix3tissue/5.2.7
module load singularity/3.5.3
module load fsl/6.0.3
module load ants/2.3.2
module load mrtrix3/3.0.1
module load freesurfer/6.0.0
source $FREESURFER_HOME/SetUpFreeSurfer.sh
export SUBJECTS_DIR=/scratch/Project/Data

cd $SUBJECTS_DIR

mris_preproc --qdec-long ../qdec/long.qdec.bvFTD.table.dat --target fsaverage --hemi lh --meas thickness --out lh.thickness.long.bvFTD.mgh
mris_preproc --qdec-long ../qdec/long.qdec.bvFTD.table.dat --target fsaverage --hemi rh --meas thickness --out rh.thickness.long.bvFTD.mgh
mri_surf2surf --hemi lh --s fsaverage --sval lh.thickness.long.bvFTD.mgh --tval lh.thickness.long.bvFTD_sm15.mgh --fwhm-trg 15 --cortex  --noreshape
mri_surf2surf --hemi rh --s fsaverage --sval rh.thickness.long.bvFTD.mgh --tval rh.thickness.long.bvFTD_sm15.mgh --fwhm-trg 15 --cortex  --noreshape
mri_surf2surf --hemi lh --s fsaverage --sval lh.thickness.long.bvFTD.mgh --tval lh.thickness.long.bvFTD_sm20.mgh --fwhm-trg 20 --cortex  --noreshape
mri_surf2surf --hemi rh --s fsaverage --sval rh.thickness.long.bvFTD.mgh --tval rh.thickness.long.bvFTD_sm20.mgh --fwhm-trg 20 --cortex  --noreshape

Once you have completed the smoothing you are ready to carry out the LinearMixedEffectsModels. Again, the analysis uses MATLAB so you may need to request access to Argus if you don’t have an installation of MATLAB with the required toolboxes. Alternatively you can follow the steps from the FreeSurfer Wiki on a local installation of MATLAB.