Make a directory to put all of the analysis information into (e.g. mkdir HC_PAT)
This example is for a GM comparison between healthy controls and patients.
- Select 'Basic Models' and choose the directory that you wish the save the analysis into (e.g. HC_PAT)
- Under 'Design' select 'Two sample t-test'
- Then select group 1 and group 2 scans (smwc1* files)
- Click 'covariates' and add 'new: covariate' - call this covariate 'Total Grey Matter Volume' and for the vector click 'edit value' and type in 'spm_load()' which will allow you to select a file to upload. Select the Grey matter volume text file that was created earlier.
- Scroll down to 'Threshold masking', select 'Absolute' (you can choose according to which results you would like to see). Click on 'Threshold' and 'edit value' change the threshold from 100 to 0.05.
- Save this batch so that you can run it again with different groups if you need.
- Run the batch.
- When this is finished click on the 'Estimate' button and select the 'SPM.mat' file within the directory for the analysis (HC_PAT), click done.
- When estimation is complete click the 'Results' button, again select the 'SPM.mat' file and then define new contrast. The first contrast would be named 'HC > PAT' with the vector '1 -1 0', and the second would be PAT > HC' with the vector '-1 1 0'. Select done.
- A series of requests will appear on the left of the screen click 'none' for apply masking, none for p-value, say yes to p<0.001 (this can be changed later) and set the extent threshold to 0.
- To view a stats table, select 'whole brain'.
- If you wanted to add a covariate for age for example, you can repeat this process including another covariate and create a text file with ages (in the exact same order). To account for this in the analysis but without looking for correlations include an extra 0 in the contrast.
Monday, 2 December 2013
Voxel-based morphometry preprocessing for group comparison
Preparations
- Data needs to be in nifti (.nii) format before running anything in SPM.
- Save the script (.m file) that will save total grey matter volumes to your system
Open spm
% spm-8-4290
- it is useful to save each batch as you make it so that you can repeat on a different data set in the same way if necessary.
Step 1: Spatial normalisation
- Select 'Estimate and Write' on the spm buttons panel.
- Upload each subjects file into the 'Source Image' and 'Images to Write' options
- Select T1.nii as 'Template Image'
- Run
- These files save with a 'w' prefix
Step 2: Segmentation
- Under 'Output files' are grey matter, white matter and cerebrospinal fluid - for each select 'Native + Modulated and Unmodulated'
- Under clean up any partitions select 'Thorough Clean'
- This will save files with different prefixes (c1, c2, c3 - grey, white, CSF) and w - normalised, m-modulated -- use the 'wm' prefix for step 3.
- Before moving on to the smoothing step, you will need to write the GM volumes (for grey matter analysis) of each subject into a text file. To do this click the 'utils' tab and select all mwc1* files and then select 'save to txt file'. The files need to be selected in the same order as the design matrix to ensure the volumes correspond to the correct subject. (you may then want to edit the text file and delete everything except the volume measures).
Step 3: Smoothing
- Click the smoothing button, and select files with mwc1 (modulated, normalised grey matter) prefix.
- Keep default settings (i.e. 8mm FWHM)
- Press play button
Finally, you may also like to create a txt file with the vector for groups, e.g. 1 for patients, 0 for controls - ensure the same order as GM volume file and subject selection.
- Data needs to be in nifti (.nii) format before running anything in SPM.
- Save the script (.m file) that will save total grey matter volumes to your system
Open spm
% spm-8-4290
- it is useful to save each batch as you make it so that you can repeat on a different data set in the same way if necessary.
Step 1: Spatial normalisation
- Select 'Estimate and Write' on the spm buttons panel.
- Upload each subjects file into the 'Source Image' and 'Images to Write' options
- Select T1.nii as 'Template Image'
- Run
- These files save with a 'w' prefix
Step 2: Segmentation
- Under 'Output files' are grey matter, white matter and cerebrospinal fluid - for each select 'Native + Modulated and Unmodulated'
- Under clean up any partitions select 'Thorough Clean'
- This will save files with different prefixes (c1, c2, c3 - grey, white, CSF) and w - normalised, m-modulated -- use the 'wm' prefix for step 3.
- Before moving on to the smoothing step, you will need to write the GM volumes (for grey matter analysis) of each subject into a text file. To do this click the 'utils' tab and select all mwc1* files and then select 'save to txt file'. The files need to be selected in the same order as the design matrix to ensure the volumes correspond to the correct subject. (you may then want to edit the text file and delete everything except the volume measures).
Step 3: Smoothing
- Click the smoothing button, and select files with mwc1 (modulated, normalised grey matter) prefix.
- Keep default settings (i.e. 8mm FWHM)
- Press play button
Finally, you may also like to create a txt file with the vector for groups, e.g. 1 for patients, 0 for controls - ensure the same order as GM volume file and subject selection.
Subscribe to:
Posts (Atom)