Wednesday, 12 March 2014

TBSS Multiple Regression

   Set up and Analysis
   
   All subjects in one group

     - Navigate into the 'mytbss' folder.
     - Set up text files containing all of the information you wish to include in the analysis e.g. group membership, age, gender, clinical scores. All  other covariates will need to be de-meaned. As all subjects are assessed as one group in this analysis you will just need one column for group. (this is generally easier to set up in excel and copy into a text file in linux)

      ID   Group    Age   H&Y score
      1       1          0.24   0


% Glm
Select Higher level 
Inputs (number of subjects)
Number of mains EV’s (number of columns in your text file - do not include subject ID)
Open a new terminal and have the text file open, ready to copy
Select the paste button in the Glm screen above the main EV's – clear the file that opens and copy the text file into this new empty file – to paste click on the wheel on the mouse.
Fill in the EV’s titles–column titles
Select the contrasts and F-tests  tab > to add a correlation contrast a 1 should be place in the column of the variable that we are looking to correlate with FA or MD in all groups.
GLM set up – save
Save as – exit – close everything – should have new files with the given name inside stats directory.

To run the analyses:

% randomise_parallel –i all_FA_skeletonised –o tbssGRP1 –m mean_FA_skeleton_mask –d GRPcomp1.mat –t GRPcomp1.con –n 5000 --T2

(5000 iterations- uncertainty value of 0.001 is good)
(--T2 = use of Threshold-Free Cluster Enhancement - this is similar to cluster based thresholding but generally more robust)

Viewing results

% fslview
- firstly open the Mean_FA file and set intensity to 0-1.5
- then open the Mean_FA_skeletonised and again set intensity to 0-1.5
- at this point you might like to use the other terminal and move all contrasts with 'corrp' in the title, into another directory just to make it simpler to select the right ones.
- open the contrast you wish to view (this should be the file with corrp)
- you can change the max intensity to 1 and the min to 0.95 (this corresponds to a p-value of 0.05, voxel-wise correction) 
- you will need to calculate the multiple comparisons correction for tests (if necessary) e.g. bonferroni, and further alter this minimum intensity accordingly to account for this,
- The intensity value at the bottom is the significance level of a given voxel (to calculate p value, substract this from 1)
- You can also use one of the atlases in FSL e.g. JHU white-matter labels, to label your results.


Thursday, 6 March 2014

TBSS between-group analysis

All data should be in NIFTI format and corrected for the effects of eddy current distortions and head motion.

Make directories called 'TBSSmain' and inside that 'mytbss'

Navigate into 'mytbss'

Preprocessing


-         % tbss_2_reg -T
-         %  tbss_3_postreg –S

-          %  tbss_4_prestats 0.2

n    These commands perform a non-linear registration and affine transformation into MNI space using the non-linear registration tool. This creates mean FA and skeletonised images.
S   See TBSS UserGuide for other options.
   
     Set up and Analysis

     - Navigate into the 'mytbss' folder.
     - Set up text files containing all of the information you wish to include in the analysis e.g. group membership, age, gender. Age/gender and any other covariates will need to be de-meaned. You will also need a column for each group containing a 1 where the subject belongs to that group. (this is generally easier to set up in excel and copy into a text file in linux)

      

HC PD MSA PSP Age Gender
5 0 0 1 0 -9.18429 0.47619
6 0 0 1 0 2.71571 0.47619
7 0 1 1 1 -5.43429 0.47619
8 0 0 1 0 -10.3143 -0.52381
9 0 0 0 1 -12.1043 -0.52381


% Glm
Select Higher level 
Inputs (number of subjects)
Number of mains EV’s (number of columns in your text file - do not include subject ID)
Open a new terminal and have the text file open, ready to copy
Select the paste button in the Glm screen above the main EV's – clear the file that opens and copy the text file into this new empty file – to paste click on the wheel on the mouse.
Fill in the EV’s titles–column titles
Select the contrasts and F-tests  tab > add all contrasts (1 -1 0, -1 1 0)(1 where higher values expected, -1 where lower values expected and 0 where a variable should be controlled for but not included in the analysis) - name these contrasts accordingly.
GLM set up – save
Save as – exit – close everything – should have new files with the given name inside stats directory.

To run the analyses:

% randomise_parallel –i all_FA_skeletonised –o tbssGRP1 –m mean_FA_skeleton_mask –d GRPcomp1.mat –t GRPcomp1.con –n 5000 --T2

(5000 iterations- uncertainty value of 0.001 is good)
(--T2 = use of Threshold-Free Cluster Enhancement - this is similar to cluster based thresholding but generally more robust)

Viewing results

% fslview
- firstly open the Mean_FA file and set intensity to 0-1.5
- then open the Mean_FA_skeletonised and again set intensity to 0-1.5
- at this point you might like to use the other terminal and move all contrasts with 'corrp' in the title, into another directory just to make it simpler to select the right ones.
- open the contrast you wish to view (this should be the file with corrp)
- you can change the max intensity to 1 and the min to 0.95 (this corresponds to a p-value of 0.05, uncorrected) - you will need to calculate the multiple comparisons correction e.g. bonferroni, and alter this minimum intensity accordinglyl.
- The intensity value at the bottom is the significance level of a given voxel (to calculate p value, substract this from 1)
- You can also use one of the atlases in FSL e.g. JHU white-matter labels, to label your results.