Your SlideShare is downloading. ×
0
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
XBAM Tutorial (June 08)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

XBAM Tutorial (June 08)

529

Published on

Walkthrough the XBAM (v4) fMRI analysis software

Walkthrough the XBAM (v4) fMRI analysis software

Published in: Health & Medicine, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
529
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. XBAM tutorial June 08 1 http://brainmap.it
  • 2.   About the tutorial and XBAM 3   Downloading fMRI data 13   Data conversion 18   Motion correction 25   First level analysis in native space (IBAM) 32   First level analysis in Talairach space (TBAM) 46   Second level: group mapping (GBAM) 60   Second level: analysis of variance (ABAM) 75   Second level: correlation analysis (BBAM) 93   Extracting average time series / BOLD response 110   Extracting statistical values from ROI 121 TABLE OF CONTENTS XBAM tutorial June 2008 2
  • 3. XBAM tutorial About the tutorial and XBAM http://brainmap.it XBAM tutorial June 2008 3
  • 4.   This document is a self-paced tutorial to XBAM   This tutorial is a walkthrough aiming to teach you how to analyse fMRI data from pre-processing raw data to extracting statistical values from XBAM result maps   This tutorial will show you one of the many ways to analyse your data with XBAM.   If a feature/method that you are interested in is not in the tutorial, it does not mean that XBAM cannot do it! Please ask us if you have any questions/requests! ABOUT THIS TUTORIAL XBAM tutorial June 2008 4
  • 5.   Unix-like operating system (e.g. Solaris, Linux, Mac OS X) or PC Unix emulator (e.g. Cygwin)   Basic knowledge of Unix (you need to know how to create files and folders, copy, rename, move, edit files…)   If you are using your own computer: you need at least 1 GB of free disk space   If you are using a centralised setup, like at the IoP: you need a Unix/Linux account with at least 1 GB of free disk quota   The latest version of XBAM_v4, which you can download from http://brainmap.it (no need if you are at the IoP)   The tutorial dataset, which you can download at http:// brainmap.it/XBAM_DATA.tar.gz (no need if you are at the IoP) PREREQUISITES XBAM tutorial June 2008 5
  • 6.   Keywords, keyboard keys, program & command names are shown in bold and italic in the text   Everything that appears in a Terminal window is shown in the Courier font within a light gray box   Things that programs and the Unix shell return appear in bold   Things that you need to type in the Terminal window appear in bordeaux and bold   Slides in which you need to type in something have a PINK ITALIC bottom title rather than a STRAIGHT WHITE one   XBAM_v4 > 1 > 3 means “start XBAM_v4, choose option 1 and then option 3” TEXT CONVENTIONS XBAM tutorial June 2008 6
  • 7.   Default values for the various analysis parameters are shown between square brackets [ ], e.g.: Number of randomisations ? [20]   To accept the default value, simply press the Return key on your keyboard   If you do not want to use the default, type in your desired value before pressing the Return key on your keyboard   During the conversion, pre-processing and first level analysis steps you can process several subjects at once by entering the folder names separated by a space, e.g.: Directory containing the images to convert ? DIR1 DIR2 XBAM CONVENTIONS XBAM tutorial June 2008 7
  • 8.   XBAM generates plain text .log files   Those can be viewed   In a Terminal window with the more or less commands   In a separate popup window with nedit   In real-time in a Terminal window with tail -f (type CTRL+C to quit this mode)   The log file of a successful analysis always indicates that the analysis is finished Finished conversion at Thu Jan 24 15:32:34 GMT 2008 --------------------------------------------------   The log file of an unsuccessful analysis contains ERROR or WARNING messages ERROR ERROR ERROR ERROR ERROR ERROR No FEAR01_REGISTRATION.log in FEAR01 Make sure that you have registered the dataset ERROR ERROR ERROR ERROR ERROR ERROR XBAM LOGS XBAM tutorial June 2008 8
  • 9.  At the IoP, XBAM analysis jobs are placed in a queuing system and run in the background (i.e. you can log off once you have started the analysis) ##### BACKGROUND PROCESSING ##### ##### BACKGROUND PROCESSING ##### ##### BACKGROUND PROCESSING ##### This job is number 42 and it has been placed in a batch queue. To check the state of the queue, type: atq If job 42 does not appear on the queue, DO NOT RESTART IT, it is probably already running To remove this job from the queue, type: atrm 42 To check the progress of this job, type: tail -f EMOTIVE03/EMOTIVE03_CONVERSION.log XBAM JOB QUEUE XBAM tutorial June 2008 9
  • 10.   If you are running XBAM on your own computer, the analysis jobs will by default run in the foreground (i.e. you should not log off while an analysis is running) Started conversion at Thu Jan 24 15:24:05 GMT 2008 --------------------------------------------------   Ask us about what to type to enable the queuing system in XBAM   If you submit multiple analysis jobs at the same time from the same Terminal window, they will run one after another   If you submit multiple analysis jobs at the same time from different Terminal windows, they will run at the same time, but will share the available resources XBAM JOB QUEUE XBAM tutorial June 2008 10
  • 11.   The brain maps produced by XBAM are available in several formats:   Blob-only files in Analyze format that can be used as an overlay, for example in MRIcro (e.g FEAR01_MASS_POSa2.img )   Blobs overlayed on a background brain files in Analyze format (e.g. FEAR01_MASS_POSa2out.img )   .gif or .ppm pictures that can be opened with any graphic program (e.g. FEAR01_MASS_POSa2out.gif )   postscript files that have be used when printing from the command line (e.g. FEAR01_MASS_POSa2out.ps )   The text files produced by XBAM are plain text .txt or .dat files that can be opened with any text editor (e.g. FEAR01_allclusters_POSa2.dat ). These can be printed directly from the command line and prettified (for printing) versions are also available as .ps postscript files XBAM OUTPUT FILES XBAM tutorial June 2008 11
  • 12.   3 subjects: EMOTIVE01 to 03   1 event-related task: fearful Ekman faces   3 active conditions: neutral, 50% and 100% fear   Baseline: fixation cross   TR: 2 s   180 T2* volumes   16 slices, matrix size 64x64   In-plane voxel size 3.75 mm   Slice thickness 7.7 mm (including slice gap)   Interleaved acquisition, starting from bottom   2 high resolution (GE T2* and IR) structural volumes to use for Talairach normalisation Thank you to Simon Surguladze for the data THE EXPERIMENT TO ANALYZE XBAM tutorial June 2008 12
  • 13. XBAM tutorial Downloading fMRI data http://brainmap.it XBAM tutorial June 2008 13
  • 14.   Check the size of the files to download [mirabelle% du -hs /home/mri_data/EMOTIVE0[1-3] 15M /home/mri_data/EMOTIVE01 15M /home/mri_data/EMOTIVE02 15M /home/mri_data/EMOTIVE03   Check how much space is left in your IoP Unix account mirabelle% pquota Biostats: --------- Total: 50.00G Used: 8.71G Free: 41.29G   If you are using your own computer for analysis, find out how much space is left on the hard drive mirabelle% df -h ~ Filesystem Size Used Avail Capacity Mounted on /dev/disk0s2 149G 130G 19G 87% / DOWNLOADING FMRI DATA XBAM tutorial June 2008 14
  • 15.  In this case the combined size of the three raw datasets is 45 MB and you have only used about 9 GB out of a 50 GB quota limit  There is therefore ample space to download the files (remember that 1 GB = 1024 MB)  Create a new folder to store the tutorial data mirabelle% mkdir ~/EMOTIVE  Download the fMRI data to this new folder mirabelle% cp -r /home/mri_data/EMOTIVE0[1-3] ~/EMOTIVE  Check that the files have been successfully copied mirabelle% diff -r /home/mri_data/EMOTIVE01 ~/EMOTIVE/EMOTIVE01 mirabelle% diff -r /home/mri_data/EMOTIVE02 ~/EMOTIVE/EMOTIVE02 mirabelle% diff -r /home/mri_data/EMOTIVE03 ~/EMOTIVE/EMOTIVE03 DOWNLOADING FMRI DATA XBAM tutorial June 2008 15
  • 16.   The fMRI images are in UNC (University of North Carolina) format   Typical UNC file name: S_K.06441.008.s000.Z where:   S_K are the subject’s initials for Mapother House data (CNSA for CNS 1.5 T data, CNSB for CNS 3 T)   06441 is the unique experiment ID   008 is the series number (e.g. 001 localiser, 002 high resolution structural image, 008 n-back fMRI…)   s000 means slice #0 of fMRI data (structural, localiser and template images do not have this s??? field)  When present, the last name field indicates which kind of compression was used on the image: Z means that the file has been compressed with the Unix compress program, gz with gzip, and bz2 with bzip2   For each subject, check (using your logbook) that all the scanned series are there and verify that you have the correct number of fMRI slices for each experiment (everything is fine with the tutorial data) DOWNLOADING FMRI DATA XBAM tutorial June 2008 16
  • 17.  Look at some of the images to make sure that they are not distorted and that there is no missing data (e.g. missing time point) mirabelle% cd ~/EMOTIVE/EMOTIVE01 mirabelle% ls S_K.06441.001.Z S_K.06441.008.s003.Z S_K.06441.008.s010.Z S_K.06441.003.Z S_K.06441.008.s004.Z S_K.06441.008.s011.Z S_K.06441.004.Z S_K.06441.008.s005.Z S_K.06441.008.s012.Z S_K.06441.008.Z S_K.06441.008.s006.Z S_K.06441.008.s013.Z S_K.06441.008.s000.Z S_K.06441.008.s007.Z S_K.06441.008.s014.Z S_K.06441.008.s001.Z S_K.06441.008.s008.Z S_K.06441.008.s015.Z S_K.06441.008.s002.Z S_K.06441.008.s009.Z mirabelle% gunzip S_K.06441.008.s007.Z mirabelle% imagej S_K.06441.008.s007 DOWNLOADING FMRI DATA XBAM tutorial June 2008 17
  • 18. XBAM tutorial Data conversion http://brainmap.it XBAM tutorial June 2008 18
  • 19.   XBAM requires the fMRI images to be in the Analyze 7.5 format, created by the Mayo Foundation (for the rest of the tutorial, this will simply be called Analyze)   The first thing that XBAM needs to do is to convert the fMRI files from the raw UNC to the Analyze format   In the raw UNC format, each file contains both the header and the data part of the image   In Analyze format, the header and the data come as two separate files:   a .hdr file for the header   a .img file for the data   For example, once converted to Analyze the UNC file S_K.06441.008.s000 becomes sl0.hdr and sl0.img   The conversion is lossless for image data, but the MR specific header information is lost DATA CONVERSION XBAM tutorial June 2008 19
  • 20.  XBAM requires the following directory/file structure:   Each subject fMRI experiment should be in its own folder   Each slice of data should be in its own folder, called sl?, in which the Analyze image file has to be called sl?.img and sl?.hdr   The first slice is number 0 (i.e. the Analyze files for this slice are sl0.img and sl0.hdr in the sl0 folder)   The structural image has to be called struct.img & struct.hdr and should be placed within the experiment folder   The model file used for statistical analysis should also be placed in the experiment folder and has to be called either infile.dat (for block design or TR-locked event-related design), newstarts.dat (for event-related design), or model.dat (for correlation analysis) EMOTIVE01 struct.img struct.hdr newstarts.dat sl0 sl1 sl... sl0.hdr sl0.img sl1.hdr sl1.img DATA CONVERSION XBAM tutorial June 2008 20
  • 21.   Run XBAM_v4 > 1 > 1 to automatically convert your images from the UNC to the Analyze format mirabelle% cd ~/EMOTIVE mirabelle% ls EMOTIVE01 EMOTIVE02 EMOTIVE03 mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 1 DATA CONVERSION XBAM tutorial June 2008 21
  • 22. ##### DATA CONVERSION ##### Choose from the following options: 1 - UNC to XBAM data format & file hierarchy 2 - SPM/XYT-Z/4D/REC to XBAM data format & file hierarchy 3 - Quit What is your choice? 1 ------------------oOo------------------ XBAM - Conversion from UNC to Analyze ------------------oOo------------------ What is the name of the directory containing the images to convert ? EMOTIVE01 EMOTIVE02 EMOTIVE03 Number of subjects -> 3   The conversion log file is called _CONVERSION.log and it can be found within each subject folder, e.g. mirabelle% nedit ~/EMOTIVE/EMOTIVE01/EMOTIVE01_CONVERSION.log DATA CONVERSION XBAM tutorial June 2008 22
  • 23.   After conversion, each fMRI experiment is in its own folder named experimentID.seriesNb (e.g. 06441.008)   Give this folder a new short and easily recognisable name mirabelle% cd ~/EMOTIVE/EMOTIVE01 mirabelle% ls 06441.008 OTHER_FILES EMOTIVE01_CONVERSION.log struct mirabelle% mv 06441.008 FEAR01 mirabelle% ls FEAR01 S_K.06441.008.s000 S_K.06441.008.s013 sl3 S_K.06441.008.s001 S_K.06441.008.s014 sl4 S_K.06441.008.s002 S_K.06441.008.s015 sl5 S_K.06441.008.s003 TR.dat sl6 S_K.06441.008.s004 sl0 sl7 S_K.06441.008.s005 sl1 sl8 S_K.06441.008.s006 sl10 sl9 S_K.06441.008.s007 sl11 struct.hdr S_K.06441.008.s008 sl12 struct.img S_K.06441.008.s009 sl13 struct_003_GE.hdr S_K.06441.008.s010 sl14 struct_003_GE.img S_K.06441.008.s011 sl15 struct_004_IR.hdr S_K.06441.008.s012 sl2 struct_004_IR.img mirabelle% ls FEAR01/sl0 sl0.hdr sl0.img DATA CONVERSION XBAM tutorial June 2008 23
  • 24.  Rename the fMRI experiments of the two other subjects mirabelle% cd ../EMOTIVE02 mirabelle% ls 06504.005 OTHER_FILES EMOTIVE02_CONVERSION.log struct mirabelle% mv 06504.005 FEAR02 mirabelle% cd ../EMOTIVE03 mirabelle% ls 07460.007 OTHER_FILES EMOTIVE03_CONVERSION.log struct mirabelle% mv 07460.007 FEAR03  Create a new folder called FEAR to hold the fMRI experiments   Move the three renamed fMRI experiments to this new folder in order to have all the data at the same level mirabelle% cd ~/EMOTIVE mirabelle% mkdir FEAR mirabelle% ls EMOTIVE01 EMOTIVE02 EMOTIVE03 FEAR mirabelle% mv EMOTIVE0*/FEAR* FEAR mirabelle% ls FEAR FEAR01 FEAR02 FEAR03 DATA CONVERSION XBAM tutorial June 2008 24
  • 25. XBAM tutorial Motion correction http://brainmap.it XBAM tutorial June 2008 25
  • 26.   Run XBAM_v4 > 2 > 1 to start the preprocessing: motion correction, spin excitation history correction, and linear trend removal mirabelle% cd ~/EMOTIVE/FEAR/ mirabelle% ls FEAR01 FEAR02 FEAR03 mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 2 MOTION CORRECTION XBAM tutorial June 2008 26
  • 27. ##### PREPROCESSING ##### Choose from the following options: 1 - Motion & linear trend & spin excitation history correction 2 - Preprocessing utilities... 3 - Quit What is your choice? 1 ------------------------------------oOo------------------------------ XBAM - Co-registration, intensity and spin excitation history correction ------------------------------------oOo------------------------------ What is the name of the directory containing the images to co- register ? FEAR01 Number of subjects -> 1 Please only analyse FEAR01 during this tutorial to avoid drowning the servers! Checking FEAR01 : Process FEAR02 and FEAR03 later on Image size: 64 X 64 X 180 Voxel size: 3.750000 X 3.750000 X 7.700000 Number of slices: 16 MOTION CORRECTION XBAM tutorial June 2008 27
  • 28. Calculate brain/non-brain threshold by: 1 - Histogram Nothing to type in if you want 2 - 10 % of maximum value in 3D average to accept the default options. 3 - Manual threshold Just press the Return key 4 - Use unthresholded images What is your choice (enter 1,2,3, or 4)? [4] Co-register the images by: 1 - Rigid body minimising the differences 2 - Rigid body maximising correlation 3 - Quadratic maximising correlation (sometimes more accurate, but always takes longer) What is your choice of registration (enter 1,2 or 3)? [2] Spin excitation history correction: 1 - Full (spatial and temporal autocorrelation correction) 2 - Partial (spatial correction only - to use for example if your time-series have been chopped off or are concatenated) 3 - No correction at all What is your choice of correction (enter 1,2 or 3)? [1] MOTION CORRECTION XBAM tutorial June 2008 28
  • 29.  The preprocessing log file is called _REGISTRATION.log and it can be found within the subject folder, e.g. mirabelle% nedit FEAR01/FEAR01_REGISTRATION.log  The preprocessed images are stored in the slice folders and are called sl?reg.img (and sl?reg.hdr) mirabelle% ls -l FEAR01/sl4 total 5776 -rw-r--r-- 1 spakvig spakvig 348 Jan 24 15:32 sl4.hdr -rw-r--r-- 1 spakvig spakvig 1474560 Jan 24 15:32 sl4.img -rw-r--r-- 1 spakvig spakvig 348 Jan 25 12:16 sl4reg.hdr -rw-r--r-- 1 spakvig spakvig 1474560 Jan 25 12:16 sl4reg.img MOTION CORRECTION XBAM tutorial June 2008 29
  • 30.  The motion parameters can be found in a file called reg.dat within the subject folder   The first three columns show the X, Y, and Z rotations (in radian), and the second three columns represent the X, Y, and Z translations (in voxel)   These can be plotted, for example in Excel FEAR01 - Motion Parameters 0.15 radian (rotation) or voxel (translation) 0.1 0.05 X rotation Y Rotation Z Rotation 0 X Translation 1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 171 181 Y Translation -0.05 Z Translation -0.1 -0.15 TR MOTION CORRECTION XBAM tutorial June 2008 30
  • 31.  The end of the _REGISTRATION.log file contains further information about head movement during the experiment  This can be used, for example, to test for differences in motion between subject groups with a series of t-tests Largest displacement in X is 0.153702 voxels Largest displacement in Y is 0.124358 voxels Largest displacement in Z is 0.416319 voxels The motion parameters can be found in reg.dat (for plotting) The columns are: xRotation yRotation zRotation xTranslation yTranslation zTranslation Translations are in voxel and rotations in radian. -----> xRotation mean 0.035241 standard deviation 0.025459 maximum 0.122385 minimum 0.000001 median 0.035767 … MOTION CORRECTION XBAM tutorial June 2008 31
  • 32. XBAM tutorial First level analysis in native space (IBAM) http://brainmap.it XBAM tutorial June 2008 32
  • 33.   To run a first level analysis (subject level), you need to produce a model file describing your experiment   This file should be a plain text file, placed within the experiment folder   Create the file in Unix/Linux with a text editor such as nedit   If you create the file in Windows, for example using Excel, you will need to convert it to Unix/ Linux format before using it (as Windows adds control characters at the end of each line)   To convert the file, use the dos2unix command (native2ascii for Mac OS X), e.g. dos2unix infile.dat infile.dat FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 33
  • 34.   For a block design (or TR-locked event-related design)   The file should be called infile.dat   One line per TR   One column per active condition, separated by a blank Space   For each TR (line) and for each column (condition), write 1 when there is an event, 0 otherwise (parametric design possible)   The baseline condition is not coded as such, but is made up of all the lines where there are only 0 in the column(s)   Sample beginning of an ABC design (with A the baseline) mirabelle% more infile.dat 1st TR 0 0 0 0 event of type A 1 0 (baseline) 4th TR 1 0 1 1 event of type B 1 1 0 1 event of type C FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 34
  • 35.   For an event-related design   The file should be called newstarts.dat   One column per condition (including one for the baseline), separated by a blank Space   In each line and for each column (condition), write the timings in second of the events, counting from the beginning of the experiment   The time matrix needs to be square: if some conditions have less events than others, complete the lines with X   Sample beginning of an ABC design (with A the baseline) mirabelle% more newstarts.dat 5.3 23.2 0 events of type A 2 7.4 11 15.2 X 17.5 X X 23.2 events of type B events of type C FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 35
  • 36.   For a correlation analysis  The file should be called model.dat   One line per TR  A single column describing the time series to correlate with all the voxel time series in the brain  The numbers can be integer (e.g. 2) or floating point (e.g. 3.4)   It is the shape of the model time series which counts, not its amplitude (it will be zero-meaned)   Sample beginning of a correlation model file mirabelle% more model.dat 5.3 events of type A 2 15.2 4.5 FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 36
  • 37.   The experiment to analyse in this tutorial is an event-related design, therefore requiring a newstarts.dat model file   Copy the pre-prepared model files to your account mirabelle% cd ~spakvig/data/MODELS mirabelle% ls S_K.06441.008_newstarts.dat U_R.07460.007_newstarts.dat T_K.06504.005_newstarts.dat mirabelle% cp S_K.06441.008_newstarts.dat ~/EMOTIVE/FEAR/FEAR01/newstarts.dat mirabelle% cp T_K.06504.005_newstarts.dat ~/EMOTIVE/FEAR/FEAR02/newstarts.dat mirabelle% cp U_R.07460.007_newstarts.dat ~/EMOTIVE/FEAR/FEAR03/newstarts.dat mirabelle% cd ~/EMOTIVE/FEAR   If you have downloaded the tutorial data from the web, you will find the model files in the EMOTIVE/MODELS folder FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 37
  • 38.   Run XBAM_v4 > 3 > 1 to start the single subject analysis in native space (IBAM) mirabelle% cd ~/EMOTIVE/FEAR mirabelle% ls FEAR01 FEAR02 FEAR03 mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 3 FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 38
  • 39. ##### FIRST LEVEL ANALYSIS (SUBJECT LEVEL) ##### Choose from the following options: 1 - Single subject analysis in native space - Block / Event Related (IBAM) 2 - Single subject analysis in native space - Correlation 3 - Talairach normalisation of a native space analysis (TBAM) 4 - First level analysis utilities... 5 - Quit What is your choice? 1 ------------------------oOo------------------------- XBAM - Individual subject analysis in native space ------------------------oOo------------------------- What is the name of the directory containing the images to analyse? FEAR01 Number of subjects -> 1 Please only analyse FEAR01 during this tutorial to avoid drowning the servers! Checking FEAR01 : Process FEAR02 and FEAR03 later on Image size: 64 X 64 X 180 Number of slices: 16 FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 39
  • 40. Local or global analysis (loc/glo)? [glo] Do you want to smooth (spatial smoothing) the images (y/n)? [y] What is the filter kernel size in voxels (choose from 3, 5, 7, 9,...)? [5] Filter kernel = 5 --> filter standard deviation = 1.00000 What is your allowed number of error pixels per slice (Type I errors)? [5] Enter the 3D voxel level p-value: [0.05] Nothing to type in if you want to accept the default options. Enter the 3D cluster level p-value: [0.01] Just press the Return key Number of randomisations? [20] What is the acquisition time, i.e. <TR - silent_period> (in seconds)? [2.00] What is the time before slice collection for compressed sequences (in seconds)? [0] FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 40
  • 41. Select type of slice timing correction: 1 - Non interleaved slices starting from bottom of the brain (automatic calculation) 2 - Interleaved slices starting from bottom of the brain (automatic calculation) 3 - Specify your own timing information with a text file called timings.dat (include the time before slice collection) Enter the number corresponding to the chosen correction: [2] Skip slice timing correction (y/n)? [n] Select the model file that you want to use: 1 - Ordinary infile.dat (TR locked) with standard Poisson model 4s and 8s 2 - Ordinary newstarts.dat (arbitrary timings) with standard Poisson model 4s and 8s 3 - Cannonical infile.dat (TR locked) with 4s Poisson model and its first derivative 4 - Sinusoidal modeling (old style analysis as in v1.3 and v1.31) Enter the number corresponding to the chosen model: [2] Do you want to use piecewise linear baseline correction (BLOCK DESIGN ONLY - FOR EVENT RELATED USE HI-PASS DETRENDING BELOW ) (y/n)? [n] FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 41
  • 42. Do you want to detrend your data (y/n)? [y] Filters available for detrending: 1 - Hi-pass 2 - Band-pass 3 - Lo_pass Enter the number corresponding to the chosen filter: [1] Select the type of analysis you wish to use: 1 - Wavelet ( non-cylic) permutation: 2 - Cyclic permutation of the original data 3 - Wavelet Cyclic permutation of time series with Donoho denoising 4 - Cochrane_Orcutt AR1 regression with basic randomisation ( non wavelet) Enter the number corresponding to the chosen method of analysis: [4] Number of ACTIVE conditions (i.e. number of columns in your model file)? [3] Number of Basis conditions functions to use ( 1 (4 sec), 2 (4,8 sec) or 3 ( 4,8,16 sec) )? [2] FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 42
  • 43. Number of covariates to be included in the analysis? [0] Multiply models by continuous behaviour file (continuous.txt in the subject directory) (y/n)? [n]   The first level analysis log file is called _IBAM.log and it can be found within the experiment folder, e.g. mirabelle% nedit FEAR01/FEAR01_IBAM.log   The analysis results (pictures) can be found in the OUTPUT directory within the experiment folder, e.g. mirabelle% ls FEAR01/OUTPUT/*gif FEAR01/OUTPUT/FEAR01massa2.gif FEAR01/OUTPUT/FEAR01outvoltFBAM.gif FEAR01/OUTPUT/FEAR01massa3.gif FEAR01/OUTPUT/FEAR01outvolta2.gif FEAR01/OUTPUT/FEAR01massa4.gif FEAR01/OUTPUT/FEAR01outvolta3.gif FEAR01/OUTPUT/FEAR01massvoltF.gif FEAR01/OUTPUT/FEAR01outvolta4.gif mirabelle% FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 43
  • 44.   The IBAM output files are numbered in the following way:   voltF is the result of collapsing all the columns of the model file vs. baseline   a1 is a noise map   a2 is first active condition (first column of the model file) vs. baseline   a3 is second active condition (second column of the model file) vs. baseline   a4 is third active condition (third column of the model file) vs. baseline  …   The unthresholded statistical maps are called obs (observed), the effect size maps are called effect, the randomised files are called ran and they can all be found in the experiment folder mirabelle% ls FEAR01/*obs* FEAR01/*ran* FEAR01/*effect* FEAR01/FEAR01obsa2.img FEAR01/FEAR01rana2.img FEAR01/FEAR01effecta2.img FEAR01/FEAR01obsa3.img FEAR01/FEAR01rana3.img FEAR01/FEAR01effecta3.img FEAR01/FEAR01obsa4.img FEAR01/FEAR01rana4.img FEAR01/FEAR01effecta4.img FEAR01/FEAR01obsvoltF.img FEAR01/FEAR01ranvoltF.img FEAR01/FEAR01effecta1.img FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 44
  • 45.   At the IBAM level, only results in phase with the stimuli are shown in the .gif pictures (i.e. when the active condition activates more than the baseline)   2D and 3D cluster analyses are performed independently on the maps generated by the voxel based statistical analysis   The pictures from the 2D analysis are called outvolt   The pictures from the 3D analysis are called mass   The background in the pictures is the 3D average brain volume (over the whole experiment) which is used as co- registration template mirabelle% ls FEAR01/OUTPUT/*gif FEAR01/OUTPUT/FEAR01massa2.gif FEAR01/OUTPUT/ FEAR01outvoltFBAM.gif FEAR01/OUTPUT/FEAR01massa3.gif FEAR01/OUTPUT/ FEAR01outvolta2.gif FEAR01/OUTPUT/FEAR01massa4.gif FEAR01/OUTPUT/ FEAR01outvolta3.gif FEAR01/OUTPUT/FEAR01massvoltF.gif FEAR01/OUTPUT/ FEAR01outvolta4.gif mirabelle% xv FEAR01/OUTPUT/FEAR01massa4.gif & FIRST LEVEL ANALYSIS IN NATIVE SPACE (IBAM) XBAM tutorial June 2008 45
  • 46. XBAM tutorial First level analysis in Talairach space (TBAM) http://brainmap.it XBAM tutorial June 2008 46
  • 47.   The final step of the first level analysis process normalises the native space data into Talairach space   In XBAM, this is done in two steps:   Mapping of the fMRI data to the subject’s own high resolution structural image   Mapping of the data in structural space to Talairach space   For TBAM to run, you need a structural image called struct.img (and.hdr) within the experiment folder   If you have acquired only one GE/IR structural image during your session, it will be automatically selected   If you have acquired multiple GE/IR structural images, they will all be copied to the experiment folder. If there is only one GE image, it will be automatically selected. If there are several GE images, you will have to choose the one to use (and rename it to struct.img and struct.hdr).   If you do not have a structural image, you can create one from your fMRI data using XBAM_v4 > 3 > 4 > 1 FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 47
  • 48.   Run XBAM_v4 > 3 > 3 to start the Talairach normalisation of a native space analysis (TBAM) mirabelle% cd ~/EMOTIVE/FEAR mirabelle% ls FEAR01 FEAR02 FEAR03 mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 3 FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 48
  • 49. ##### FIRST LEVEL ANALYSIS (SUBJECT LEVEL) ##### Choose from the following options: 1 - Single subject analysis in native space - Block / Event Related (IBAM) 2 - Single subject analysis in native space - Correlation 3 - Talairach normalisation of a native space analysis (TBAM) 4 - First level analysis utilities... 5 - Quit What is your choice? 3 ---------------oOo-------------- XBAM - Talairach normalisation ---------------oOo-------------- What is the name of the directory containing the images to map onto Talairach space? FEAR01 Number of subjects -> 1 Please only analyse FEAR01 during this Checking FEAR01 : tutorial to avoid drowning the servers! Image size: 64 X 64 X 180 Process FEAR02 and FEAR03 later on Number of slices: 16 FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 49
  • 50. Nothing to type in if you want Voxel level P-value for 3D clustering? [0.05] to accept the default options. Just press the Return key Cluster level P-value for 3D clustering? [0.01] Number of ACTIVE conditions (i.e. number of columns in your model file) : [3] Slice thickness of the FUNCTIONAL images in mm (including gap) : [7.700000] Slice thickness of the STRUCTURAL image in mm (including gap) : [3.300000] Has your structural image been processed from an SPGR (y/n)? [n] What is your allowed number of error pixels (Type I errors) per volume? [50] Number of randomisations (has to be the same as for the IBAM)? [20] Do you want to smooth (spatial smoothing) the images (y/n)? [n] Images previously mapped to Talairach space (y/n)? [n] FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 50
  • 51. IMPORTANT: You can only run a local analysis if you have done the required number of permutations at the IBAM level (more than 100). Local or global cluster analysis (loc/glo)? [glo] Mapping of Correlational data (y/n)? [n] Max probability (e.g. 0.99999) of CSF allowed in voxels (choose default to use the normal template)? [n/a] Max probability (e.g. 0.95) of white matter allowed in voxels (choose default to use the normal template)? [n/a] Register to Template using correlation, Mutual information steps 1 and 2 or Mutual information step 2 only (cor,mut12,mut2)? [cor] Starting point offset ( in slices ) for first registration step (func to struct)? [0] Use image mask (mask.img) for small volume correction (y/n)? [n] Correct regave and struct images for intensity drift (y/n)? [n] Use difference maps if they are present (y/n)? [n] Use BABY template (y/n)? [n] Do you want to use your own template (y/n)? [n] FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 51
  • 52.   The normalisation log file is called _TBAM.log and it can be found at the same level as the experiment folder, e.g. mirabelle% nedit FEAR01_TBAM.log   All the TBAM output files are in a new folder called <experiment>_TBAM, e.g. FEAR01_TBAM   The analysis results (pictures and text files) can be found in the _TBAM/OUTPUT_VPV_CPV directory, where VPV is the chosen voxel P value, and CPV is the chosen cluster P value (OUTPUT_0.05_0.01 by default) mirabelle% ls FEAR01 FEAR02 FEAR03 FEAR01_TBAM FEAR02_TBAM FEAR03_TBAM FEAR01_TBAM.log FEAR02_TBAM.log FEAR03_TBAM.log FEAR01_TBAM.parameters FEAR02_TBAM.parameters FEAR03_TBAM.parameters mirabelle% ls FEAR01_TBAM/OUTPUT_0.05_0.01/*MASS*a2*gif FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_MASS_NEGa2out.gif FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_MASS_POSa2out.gif mirabelle% ls FEAR01_TBAM/OUTPUT_0.05_0.01/*MASS*Effect*a2*ppm FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_MASS_MeanEffectoutNEGa2.ppm FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_MASS_MeanEffectoutPOSa2.ppm FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 52
  • 53.   The TBAM output files are numbered in the following way:   a1 is a noise map   a2 is first active condition (first column of the model file) vs. baseline   a3 is second active condition (second column of the model file) vs. baseline   a4 is third active condition (third column of the model file) vs. baseline  …   The normalised unthresholded statistical maps are called talobs (observed), the normalised effect size maps are called taleffect and the normalised randomised files are called talran. They can all be found in the _TBAM folder mirabelle% ls FEAR01_TBAM/*talobs* FEAR01_TBAM/*talran* FEAR01_TBAM/*taleffect* FEAR01_TBAM/FEAR01taleffecta1.img FEAR01_TBAM/FEAR01talobsa3.img FEAR01_TBAM/FEAR01taleffecta2.img FEAR01_TBAM/FEAR01talobsa4.img FEAR01_TBAM/FEAR01taleffecta3.img FEAR01_TBAM/FEAR01talrana2.img FEAR01_TBAM/FEAR01taleffecta4.img FEAR01_TBAM/FEAR01talrana3.img FEAR01_TBAM/FEAR01talobsa2.img FEAR01_TBAM/FEAR01talrana4.img FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 53
  • 54.   TBAM results are independent from the IBAM results, i.e. the p values you set at the IBAM level have no impact on TBAM   The background in the pictures is the Talairach template   2D and 3D cluster analyses are performed independently on the maps generated by the voxel based statistical analysis   The file called _Overlap_Mask.gif in the OUTPUT_???_??? folder shows the extent of the Talairach coverage, i.e. it shows how much of the Talairach template is covered by the normalised fMRI data.   A binary version of this file is provided, called _Overlap.gif   This map should always be near perfect. If it has a lot of holes or if large parts of the brain are missing, this could indicate a misregistration problem. mirabelle% ls FEAR01_TBAM/OUTPUT_0.05_0.01/*Overlap*gif FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_Overlap.gif FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_Overlap_Mask.gif mirabelle% xv FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_Overlap_Mask.gif FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 54
  • 55.   For the 2D cluster analysis   The pictures are called _TBAMa?out (e.g. FEAR01_TBAMa2out.gif) for the SSQ maps and MeanEffectouta? (e.g. FEAR01MeanEffectouta2.ppm) for the effect size maps   They contain both positive (active condition > baseline, shown in an orange to yellow colour scale) and negative (baseline > active condition, shown in dark to light blue colour scale) contrasts   Text files containing information about the activated 2D regions are called _TBAM_BAIDa? (e.g. FEAR01_TBAM_BAIDa2.dat) and _TBAM_BAIDa?_effects (e.g. FEAR01_TBAM_BAIDa2_effects.dat) mirabelle% xv FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_TBAMa4out.gif & mirabelle% nedit FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_TBAM_BAIDa4.dat & FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 55
  • 56.   For the 3D cluster analysis   The pictures are called _MASS_POSa?out (e.g. FEAR01_MASS_POSa2out.gif) for the SSQ maps and MASS_MeanEffectoutPOSa? (e.g. FEAR01_MASS_MeanEffectoutPOSa2.ppm) for the effect size maps   The positive (active condition > baseline) contrasts are called POS and the negative (baseline > active condition) contrasts are NEG. In both images, the colour scale goes form dark red to light yellow   Text files containing information about the activated 3D regions (including Talairach Daemon labels) are called _allclusters_POSa? and _allclusters_NEGa? (e.g. FEAR01_allclusters_POSa2.dat). These files report both the SSQ and effect size of the activation peak   Slice-by-slice (2D) split of the 3D clusters can be found in the _allclusters_2D_POSa? and _allclusters_2D_NEGa? files (e.g. FEAR01_allclusters_2D_POSa2.dat) mirabelle% xv FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_MASS_POSa4out.gif & mirabelle% nedit FEAR01_TBAM/OUTPUT_0.05_0.01/FEAR01_allclusters_POSa4.dat & FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 56
  • 57.   XBAM allows you to control the Type I error rate of your 3D cluster results.   For each contrast, you can adjust the voxel and cluster P values of the 3D cluster analysis with the aim of obtaining less than one false positive cluster over the whole map   Once you have reached less than one false positive cluster per map, you can be assured that all the remaining clusters are significant   The file containing a table of the Type I error rates is called _massOI_POSa? or _massOI_NEGa?, depending on the direction of the contrast (e.g. FEAR01_massOI_POSa4.dat)   The _massOI file is generated for the chosen voxel P value.   If you re-run the analysis, but keep the same voxel P value, you will get the same file (regardless of what happens to the cluster P value)   If you re-run the analysis and change the voxel P value, you will get a different _massOI file. FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 57
  • 58.   Each line of the _massOI table corresponds to a cluster P value (2nd column)   The 3rd column shows the number of false positive clusters expected for each cluster P value   The 4th column shows the number of actual clusters present in the image (observed) for each cluster P value   You should run the analysis once with the default voxel and cluster P values (respectively 0.05 and 0.01), before checking the _massOI file of your contrast of interest to find out which cluster P value gives less than 1 false positive cluster. Then run the analysis a second time, with the adjusted P value, to get only significant blobs on the map   It usually isn’t necessary to adjust the voxel P value, but you may want to do so if your clusters are too big and encompass several brain structures. In this case, reducing the voxel P value may break up the clusters   All in all, it isn’t important to spend ages finding out the optimal P values for each subject and for each contrast: whatever you do at the TBAM level has no impact on the second level analyses which use the unthresholded normalised statistical maps (the talobs and talran images) 2.727632 0.010000 0.820000 2 1.880617 0.020000 1.640000 2 FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 58
  • 59.   The _TBAM.log file contains the exact cluster p values (for each POS and NEG contrast) producing 1 false positive cluster per map, and 0.5 false positive cluster per map   Use these to adjust the cluster P value for a quick re-analysis generating your desired number of Type I error clusters per map   To quickly find these p values in the log, open the file in a text editor and search for the word yielding ---> P-value yielding 1 false positive cluster per map is 0.005780 <--- ---> P-value yielding 0.5 false positive cluster per map is 0.002890 <--- FIRST LEVEL ANALYSIS IN TALAIRACH SPACE (TBAM) XBAM tutorial June 2008 59
  • 60. XBAM tutorial Second level: group mapping (GBAM) http://brainmap.it XBAM tutorial June 2008 60
  • 61.   By the end of the first level analysis, the statistical maps of all your subjects are normalised to standard space   This makes it possible to compute a group map using the first of the second level analysis modules: GBAM   To use GBAM, you need to have all your subject _TBAM folders at the same level   You do not need the individual subject folder for this analysis, but having them there will allow you to extract the average time-series and BOLD response later on   Create a text file called subjects.txt containing the names of the subjects to analyse (without the _TBAM bit) mirabelle% cd ~/EMOTIVE/FEAR/ mirabelle% ls FEAR01 FEAR02 FEAR03 FEAR01_TBAM FEAR02_TBAM FEAR03_TBAM FEAR01_TBAM.log FEAR02_TBAM.log FEAR03_TBAM.log FEAR01_TBAM.parameters FEAR02_TBAM.parameters FEAR03_TBAM.parameters mirabelle% echo FEAR01 FEAR02 FEAR03 > subjects.txt mirabelle% cat subjects.txt FEAR01 FEAR02 FEAR03 SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 61
  • 62.   Run XBAM_v4 > 4 > 1 to start generating a group activation map (GBAM) mirabelle% cd ~/EMOTIVE/FEAR mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 4 SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 62
  • 63. ##### SECOND LEVEL ANALYSIS (GROUP LEVEL) ##### Choose from the following options: 1 - Group activation map (GBAM) 2 - Analysis of variance / covariance of statistical maps (ABAM) 3 - Correlation of behavioural data with statistical maps (BBAM) 4 - Conjunction analysis 5 - Group level cluster analysis (Klustakwik) 6 - Calculate group level mixed/fixed/random effects permutation maps 7 - Second level analysis utilities... 8 - Quit What is your choice? 1 -----------oOo----------- XBAM - Group Mapping -----------oOo----------- Subjects -> FEAR01 FEAR02 FEAR03 SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 63
  • 64. Checking FEAR01_TBAM : Image size: 64 X 64 X 25 Checking FEAR02_TBAM : Nothing to type in if you want Image size: 64 X 64 X 25 to accept the default options. Just press the Return key Checking FEAR03_TBAM : Image size: 64 X 64 X 25 Voxel level P-value for 3D clustering? [0.05] Cluster level P-value for 3D clustering? [0.01] Do you just want to re-run the analysis with different voxel/ cluster-wise probabilities (y/n)? [n] Number of ACTIVE conditions (i.e. number of columns in your model file) : [3] What is your allowed number of error pixels (Type I errors) per volume ? [50] SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 64
  • 65. Number of randomisations (has to be the same as for the IBAM/TBAM)? [20] Do you want to smooth (spatial smoothing) the images (y/n)? [n] IMPORTANT: You can only run a local analysis if you have done the required number of permutations at the IBAM level (more than 100). Local or global cluster analysis (loc/glo)? [glo] Mapping of Correlational data (y/n)? [n] Max probability (e.g. 0.99999) of CSF allowed in voxels (choose default to use the normal template)? [n/a] Max probability (e.g. 0.95) of white matter allowed in voxels (choose default to use the normal template)? [n/a] Allow statistics at voxels where at least half the group has data present (y/n)? [n] Use image mask (mask.img) for small volume correction (y/n)? [n] Use difference maps if they are present (y/n)? [n] SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 65
  • 66. Use BABY template (y/n)? [n] Do you want to use your own template (y/n)? [n]   The GBAM log file is called _GBAM.log and it can be found at the same level as the _TBAM folders   All the GBAM output files are in a new folder called _GBAM, e.g. FEAR_GBAM where FEAR is the name of the folder you started XBAM_v4 from mirabelle% pwd /Users/spakvig/EMOTIVE/FEAR mirabelle% ls FEAR01 FEAR02_TBAM.log FEAR_GBAM FEAR01_TBAM FEAR02_TBAM.parameters FEAR_GBAM.log FEAR01_TBAM.log FEAR03 FEAR_GBAM.parameters FEAR01_TBAM.parameters FEAR03_TBAM subjects.txt FEAR02 FEAR03_TBAM.log FEAR02_TBAM FEAR03_TBAM.parameters SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 66
  • 67.   The analysis results (pictures and text files) can be found in the _GBAM/OUTPUT_VPV_CPV directory, where VPV is the chosen voxel P value, and CPV is the chosen cluster P value (OUTPUT_0.05_0.01 by default) mirabelle% ls FEAR_GBAM/OUTPUT_0.05_0.01/*gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_GBAMa2out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_GBAMa3out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_GBAMa4out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_NEGa2out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_NEGa3out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_NEGa4out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_POSa2out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_POSa3out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_POSa4out.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_Overlap.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_Overlap_Mask.gif SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 67
  • 68.   The GBAM output files are numbered in the following way:   a1 is a noise map   a2 is first active condition (first column of the model file) vs. baseline   a3 is second active condition (second column of the model file) vs. baseline   a4 is third active condition (third column of the model file) vs. baseline  …   GBAM calculates at each voxel the median SSQ of the group and checks by permutation if this median is significant against the null distribution of median values generated from the randomised time series   The file containing the observed (non-randomised) median values for each voxel and for each condition is called TSSQa?.img and it can be found in the _GBAM folder mirabelle% ls FEAR_GBAM/*TSSQ* FEAR_GBAM/FEARTSSQa2.img FEAR_GBAM/FEARTSSQa4.img FEAR_GBAM/FEARTSSQa3.img SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 68
  • 69.   The GBAM results are independent from the IBAM & TBAM ones, i.e. whatever p values you used for IBAM & TBAM has no impact on GBAM   The background in the pictures is the Talairach template   2D and 3D cluster analyses are performed independently on the maps generated by the voxel based statistical analysis   The file called _Overlap_Mask.gif in the OUTPUT_???_??? folder shows the extent of the group Talairach coverage, i.e. it shows those voxels where all the subjects map into Talairach template. If at least one subject has no coverage for a specific voxel, this voxel is dismissed from the rest of the analysis and appears in black (i.e. a hole)   A grey level version of this file is provided, called _Overlap.gif in which black shows 0% coverage and white 100% coverage   This map should always be near perfect. If it has a lot of holes or if large parts of the brain are missing, this could indicate a misregistration problem. mirabelle% ls FEAR_GBAM/OUTPUT_0.05_0.01/*Overlap*gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_Overlap.gif FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_Overlap_Mask.gif mirabelle% xv FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_Overlap.gif & SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 69
  • 70.   For the 2D cluster analysis   The pictures are called _GBAMa?out (e.g. FEAR_GBAMa2out.gif) for the SSQ maps and MeanEffectouta? (e.g. FEARMeanEffectouta2.ppm) for the effect size maps   They contain both positive (active condition > baseline, shown in an orange to yellow colour scale) and negative (baseline > active condition, shown in dark to light blue colour scale) contrasts   Text files containing information about the activated 2D regions are called _GBAM_BAIDa? (e.g. FEAR_GBAM_BAIDa2.dat) and _GBAM_BAIDa?_effects (e.g. FEAR_GBAM_BAIDa2_effects.dat) mirabelle% xv FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_GBAMa4out.gif & mirabelle% nedit FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_GBAM_BAIDa4.dat & SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 70
  • 71.   For the 3D cluster analysis   The pictures are called _MASS_POSa?out (e.g. FEAR_MASS_POSa2out.gif) for the SSQ maps and MASS_MeanEffectoutPOSa? (e.g. FEAR_MASS_MeanEffectoutPOSa2.ppm) for the effect size maps   The positive (active condition > baseline) contrasts are called POS and the negative (baseline > active condition) contrasts are NEG. In both images, the colour scale goes form dark red to light yellow   Text files containing information about the activated 3D regions (including Talairach Daemon labels) are called _allclusters_POSa? and _allclusters_NEGa? (e.g. FEAR_allclusters_POSa2.dat). These files report both the SSQ and effect size of the activation peak   Slice-by-slice (2D) split of the 3D clusters can be found in the _allclusters_2D_POSa? and _allclusters_2D_NEGa? files (e.g. FEAR_allclusters_2D_POSa2.dat) mirabelle% xv FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_MASS_POSa4out.gif & mirabelle% nedit FEAR_GBAM/OUTPUT_0.05_0.01/FEAR_allclusters_POSa4.dat & SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 71
  • 72.   XBAM allows you to control the Type I error rate of your 3D cluster results.   For each contrast, you can adjust the voxel and cluster P values of the 3D cluster analysis with the aim of obtaining less than one false positive cluster over the whole map   Once you have reached less than one false positive cluster per map, you can be assured that all the remaining clusters are significant   The file containing a table of the Type I error rates is called _massOI_POSa? or _massOI_NEGa?, depending on the direction of the contrast (e.g. FEAR_massOI_POSa4.dat)   The _massOI file is generated for the chosen voxel P value   If you re-run the analysis, but keep the same voxel P value, you will get the same file (regardless of what happens to the cluster P value)   If you re-run the analysis and change the voxel P value, you will get a different _massOI file. SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 72
  • 73.   Each line of the _massOI table corresponds to a cluster P value (2nd column)   The 3rd column shows the number of false positive clusters expected for each cluster P value   The 4th column shows the number of actual clusters present in the image (observed) for each cluster P value   You should run the analysis once with the default voxel and cluster P values (respectively 0.05 and 0.01), before checking the _massOI file of your contrast of interest to find out which cluster P value gives less than 1 false positive cluster. Then run the analysis a second time, with the adjusted P value, to get only significant blobs on the map   It usually isn’t necessary to adjust the voxel P value, but you may want to do so if your clusters are too big and encompass several brain structures. In this case, reducing the voxel P value may break up the clusters 1.034411 0.005000 0.885000 5 0.859139 0.006000 1.062000 5 0.787644 0.007000 1.239000 5 0.702908 0.008000 1.416000 8 0.687216 0.009000 1.593000 8 0.638748 0.010000 1.770000 8 SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 73
  • 74.   The _GBAM.log file contains the exact cluster p values (for each POS and NEG contrast) producing 1 false positive cluster per map, and 0.5 false positive cluster per map   Use these to adjust the cluster P value for a quick re-analysis generating your desired number of Type I error clusters per map   To quickly find these p values in the log, open the file in a text editor and search for the word yielding ---> P-value yielding 1 false positive cluster per map is 0.005780 <--- ---> P-value yielding 0.5 false positive cluster per map is 0.002890 <--- SECOND LEVEL: GROUP MAPPING (GBAM) XBAM tutorial June 2008 74
  • 75. XBAM tutorial Second level: analysis of variance (ABAM) http://brainmap.it XBAM tutorial June 2008 75
  • 76.   By the end of the first level analysis, the statistical maps of all your subjects have been normalised to standard space   This makes it possible to perform a analysis of variance between two or more groups/experiments using the second level analysis module called ABAM   As ABAM is a really versatile program, it has its own manual which can be found online at: http://www.brainmap.co.uk/Documents/ABAM%20manual.doc   To use ABAM, you need to create a new folder to hold your analysis data and results   Copy into it the normalised statistical maps of the subjects that you want to compare. These can be found in the group _GBAM folder(s)   If you want to compare SSQ statistical maps, copy the talobs files (e.g. FEAR_GBAM/FEAR01talobsa2.img)   If you want to compare effect size maps, copy the taleffect files (e.g. FEAR_GBAM/FEAR01taleffecta2.img)   Also copy the file called DoNotDelete.hdr from one of your _GBAM folder. It will be used to automatically get the image header information. If you do not include this file, you will be asked for image dimensions. SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 76
  • 77.   In the folder where you have copied the files, create a plain text file called subjects.txt which should contain the name of the images to analyse, in one column (use nedit to create it).   The order of the files is important and depends on the type of analysis that you want to do   In the case of this tutorial, we want to compare the three emotional intensities and we have an hypothesis about the direction of change: we want to find out those brain regions where 100% fear > 50% fear > neutral   This is going to be a repeated-measure analysis, with one group of subjects and three samples per subject   The subjects.txt file should therefore contain first all the neutral images, then all the 50% images, and finally the 100% images (or the other way around). The subject order has to be the same for the three repeats, e.g. FEAR01, FEAR02, FEAR03 SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 77
  • 78. mirabelle% cd ~/EMOTIVE/FEAR mirabelle% mkdir TREND mirabelle% cp FEAR_GBAM/*talobsa[2-4]* FEAR_GBAM/DoNotDelete.hdr TREND mirabelle% ls TREND DoNotDelete.hdr FEAR02talobsa2.img FEAR03talobsa3.img FEAR01talobsa2.img FEAR02talobsa3.img FEAR03talobsa4.img FEAR01talobsa3.img FEAR02talobsa4.img FEAR01talobsa4.img FEAR03talobsa2.img mirabelle% nedit TREND/subjects.txt & neutral 50% fear 100% fear SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 78
  • 79.   The traditional module of ABAM should be used for main effect analyses (group or condition), trend analyses (e.g. 3x1) and 2x2 interactions   Be aware that if you are doing a trend analysis on more than two groups/conditions, it is always a good idea to test both linear and quadratic trends to cover all possibilities   For more complicated designs (e.g. 3x3, 3x4) you need to use the complex module of ABAM which has been specifically written to handle more complex analyses   Please be aware that this latter module will show you which regions are different, but it will not look at the direction of the changes. You will need to extract and plot the statistical values and may need to perform pairwise comparisons to fully understand your results   The first question asked by the ABAM program allows you to choose either the traditional (trad) or the complex (comp) module   You can also add up to two covariates to regress in a file called covar.dat (two columns separated by a Space) SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 79
  • 80.  In this tutorial, we want to identify those parts of the brain where 100% fear activates more than 50% fear which activates more than neutral faces  We have an hypothesis and this is a trend analysis, so the traditional ABAM module will be used  To use this module, you need to create a plain text file called DesignMatrix which should contains the ANOVA factors to use  There should be as many factors as there are subject files in the subjects.txt file   If you have an hypothesis about the direction of the change, the factors will be used to describe the changes   If you do not have an hypothesis about the direction of the change, the factors will just be used as dummy variables to indicate which subject is in which group   It is always a good idea to verify side by side your subjects.txt and DesignMatrix files before starting the analysis SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 80
  • 81.  As we are interested in 100% (talobsa4) > 50% (talobsa3) > neutral (talobsa2), the corresponding ANOVA factors are 1 > 0 > -1 mirabelle% cd ~/EMOTIVE/FEAR/TREND mirabelle% ls DoNotDelete.hdr FEAR02talobsa2.img FEAR03talobsa3.img FEAR01talobsa2.img FEAR02talobsa3.img FEAR03talobsa4.img FEAR01talobsa3.img FEAR02talobsa4.img subjects.txt FEAR01talobsa4.img FEAR03talobsa2.img mirabelle% nedit DesignMatrix & [1] 499 mirabelle% paste subjects.txt DesignMatrix FEAR01talobsa2.img -1 neutral FEAR02talobsa2.img -1 FEAR03talobsa2.img -1 50% fear FEAR01talobsa3.img 0 FEAR02talobsa3.img 0 100% fear FEAR03talobsa3.img 0 FEAR01talobsa4.img 1 FEAR02talobsa4.img 1 FEAR03talobsa4.img 1 SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 81
  • 82.   Run XBAM_v4 > 4 > 2 to perform an ANOVA between groups/ conditions (ABAM) mirabelle% cd ~/EMOTIVE/FEAR mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 4 SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 82
  • 83. ##### SECOND LEVEL ANALYSIS (GROUP LEVEL) ##### Choose from the following options: 1 - Group activation map (GBAM) 2 - Analysis of variance / covariance of statistical maps (ABAM) 3 - Correlation of behavioural data with statistical maps (BBAM) 4 - Conjunction analysis 5 - Group level cluster analysis (Klustakwik) 6 - Calculate group level mixed/fixed/random effects permutation maps 7 - Second level analysis utilities... 8 - Quit What is your choice? 2 -----------oOo----------- Nothing to type in if you want XBAM - Group Comparison to accept the default options. -----------oOo----------- Just press the Return key Use traditional or complex module (used to be v3.4-dev=6 for 3x2, 3x3, 3x3x...) ABAM (trad/comp)? [trad] SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 83
  • 84. Enter the name of the directory containing the files to study: TREND Enter the voxel-wise probability of Type I error: [0.05] Enter the cluster-wise probability of Type I error: [0.01] Do you just want to re-run the analysis with different voxel/cluster- wise probabilities (y/n)? [n] Image size: 64 X 64 X 25 You can test the significance of a voxel either against a null distribution formed from all the voxels in the brain (global) or alternatively from a distribution created by permuting only this voxel (local) Local permutation may be more sensitive but takes longer and requires more storage space. Local or global analysis (loc/glo)? [glo] You have only one column in your DesignMatrix file. Is this multiple observations on the same group of subjects, i.e. repeated measures, or 1 observation per subject in different groups (rep/norep)? [norep] rep SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 84
  • 85. How many observations for each subject? [1] 3 Maximum number of randomisations allowed? [50] There are 2 possible types of analysis: *) You have an hypothesis about the way that the activations in the different groups are related OR *) You think that the responses may differ across groups but you don't know how. PLEASE NOTE THAT YOU NEED TO ANSWER y FOR ANY KIND OF TREND ANALYSIS Do you have an hypothesis (y/n)? [y] Please note that the next question only applies to the covariate in the case of a repeated measure design. In the case of a non repeated measure design, it applies to the whole model (variate + covariate). Use least squares or absolute deviation minimisation (lsq/abs)? [abs] Max probability (e.g. 0.99999) of CSF allowed in voxels (choose default to use the normal template)? [n/a] Max probability (e.g. 0.95) of white matter allowed in voxels (choose default to use the normal template)? [n/a] SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 85
  • 86. Allow statistics at voxels where at least half the group has data present (y/n)? [n] Use image mask (mask.img) for small volume correction (y/n)? [n] Do you want to smooth (spatial smoothing) the images (y/n)? [n] Use BABY template (y/n)? [n] Do you want to use your own template (y/n)? [n]   The ABAM log file is called _ABAM.log and it can be found at the same level as the files to analyse and the subjects.txt file   The analysis results can be found in the OUTPUT_VPV_CPV directory, in the ABAM analysis folder, where VPV is the chosen voxel P value, and CPV is the chosen cluster P value (by default OUTPUT_0.05_0.01) mirabelle% ls TREND/OUTPUT_0.05_0.01/*gif TREND/OUTPUT_0.05_0.01/ANCOVA_BAMout.gif TREND/OUTPUT_0.05_0.01/TREND_MASSout_NEG.gif TREND/OUTPUT_0.05_0.01/TREND_MASSout_POS.gif TREND/OUTPUT_0.05_0.01/TREND_Overlap.gif TREND/OUTPUT_0.05_0.01/TREND_Overlap_Mask.gif SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 86
  • 87.   The ABAM results are independent from the IBAM & TBAM results, i.e. whatever p value you used at for IBAM & TBAM has no impact on the ABAM   The background in the pictures is the Talairach template   2D and 3D cluster analyses are performed independently on the maps generated by the voxel based statistical analysis   The file called _Overlap_Mask.gif in the OUTPUT_???_??? folder shows the extent of the group Talairach coverage, i.e. it shows those voxels where all the subjects map into Talairach template. If at least one subject has no coverage for a specific voxel, this voxel is dismissed from the rest of the analysis and appears in black (i.e. a hole)   A grey level version of this file is provided, called _Overlap.gif in which black shows 0% coverage and white 100% coverage   This map should always be near perfect. If it has a lot of holes or if large parts of the brain are missing, this could indicate a misregistration problem. mirabelle% ls TREND/OUTPUT_0.05_0.01/*Overlap*gif TREND/OUTPUT_0.05_0.01/TREND_Overlap.gif TREND/OUTPUT_0.05_0.01/TREND_Overlap_Mask.gif mirabelle% xv TREND/OUTPUT_0.05_0.01/TREND_Overlap_Mask.gif & SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 87
  • 88.   For the 2D cluster analysis   The picture is always called ANCOVA_BAMout.gif   It contains both positive (1 > 0 > -1, i.e. 100% > 50% > neutral, shown in orange to yellow colour scale) and negative (-1 > 0 > 1, i.e. neutral > 50% > 100%, shown in dark to light blue colour scale) contrasts   The text files containing information about the activated 2D regions is always called ANCOVA_BAM.dat mirabelle% xv TREND/OUTPUT_0.05_0.01/ANCOVA_BAMout.gif & mirabelle% nedit TREND/OUTPUT_0.05_0.01/ANCOVA_BAM.dat & SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 88
  • 89.   For the 3D cluster analysis   The pictures are called _MASSout_POS and _MASSout_NEG (e.g. TREND_MASSout_POS.gif)   The positive (1 > 0 > -1, i,.e. 100% > 50% > neutral) contrast is called POS and the negative (-1 > 0 > 1, i.e. neutral > 50% > 100%) contrast is called NEG. In both images, the colour scale goes form dark red to light yellow   Text files containing information about the activated 3D regions (including Talairach Daemon labels) are called _allclusters_POS and _allclusters_NEG (e.g. TREND_allclusters_POS.dat).   Slice-by-slice (2D) split of the 3D clusters can be found in the _allclusters_2D_POS and _allclusters_2D_NEG files (e.g. TREND_allclusters_2D_POS.dat) mirabelle% xv TREND/OUTPUT_0.05_0.01/TREND_MASSout_POS.gif & mirabelle% nedit TREND/OUTPUT_0.05_0.01/TREND_allclusters_POS.dat & SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 89
  • 90.   XBAM allows you to control the Type I error rate of your 3D cluster results.   For each contrast, you can adjust the voxel and cluster P values of the 3D cluster analysis with the aim of obtaining less than one false positive cluster over the whole map   Once you have reached less than one false positive cluster per map, you can be assured that all the remaining clusters are significant   The file containing a table of the Type I error rates is called _massOI_POSa? or _massOI_NEGa? ,depending on the direction of the contrast (e.g. TREND_massOI_POSa4.dat)   The _massOI file is generated for the chosen voxel P value.   If you re-run the analysis, but keep the same voxel P value, you will get the same file (regardless of what happens to the cluster P value)   If you re-run the analysis and change the voxel P value, you will get a different _massOI file. SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 90
  • 91.   Each line of the _massOI table corresponds to a cluster P value (2nd column)   The 3rd column shows the number of false positive clusters expected for each cluster P value   The 4th column shows the number of actual clusters present in the image (observed) for each cluster P value   You should run the analysis once with the default voxel and cluster P values (respectively 0.05 and 0.01), before checking the _massOI file of your contrast of interest to find out which cluster P value gives less than 1 false positive cluster. Then run the analysis a second time, with the adjusted P value, to get only significant blobs on the map   It usually isn’t necessary to adjust the voxel P value, but you may want to do so if your clusters are too big and encompass several brain structures. In this case, reducing the voxel P value may break up the clusters 1.868958 0.006000 0.714000 3 1.440363 0.007000 0.833000 3 1.258579 0.008000 0.952000 3 0.984080 0.009000 1.071000 3 0.954444 0.010000 1.190000 3 0.541551 0.020000 2.380000 6 SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 91
  • 92.   The _ABAM.log file contains the exact cluster p values (for each POS and NEG contrast) producing 1 false positive cluster per map, and 0.5 false positive cluster per map   Use these to adjust the cluster P value for a quick re-analysis generating your desired number of Type I error clusters per map   To quickly find these p values in the log, open the file in a text editor and search for the word yielding ---> P-value yielding 1 false positive cluster per map is 0.005780 <--- ---> P-value yielding 0.5 false positive cluster per map is 0.002890 <--- SECOND LEVEL: ANALYSIS OF VARIANCE (ABAM) XBAM tutorial June 2008 92
  • 93. XBAM tutorial Second level: correlation analysis (BBAM) http://brainmap.it XBAM tutorial June 2008 93
  • 94.   By the end of the first level analysis, the statistical maps of all your subjects have been normalised to standard space   This makes it possible to perform a correlation analysis between the statistical maps and a behavioural measure (e.g. IQ, age…) using the second level analysis module called BBAM   BBAM can compute either the correlation coefficient or the regression coefficient (slope)   You can use a parametric Pearson or a non-parametric (and outlier resistant) Kendall correlation coefficient   BBAM can also be used to compare the regression slope/correlation coefficient between 2 groups, i.e. it will show those regions of the brains where one group is significantly more correlated to the behavioural variable than the other group   To use BBAM, you need to create a new folder to hold your data and results   Copy into it the normalised statistical maps of the subjects that you want to compare. These can be found in the group _GBAM folder(s)   If you want to correlate SSQ statistical maps, copy the talobs files (e.g. FEAR_GBAM/FEAR01talobsa2.img)   If you want to correlate effect size maps, copy the taleffect files (e.g. FEAR_GBAM/FEAR01taleffecta2.img)   Also copy the file called DoNotDelete.hdr from one of your _GBAM folder. It will be used to automatically get the image header information. If you do not include it, you will be asked for the image dimensions. SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 94
  • 95.   In the folder where you have copied the files, create a plain text file called subjects.txt which should contain the name of the images to analyse, in one column (use nedit to create it)   The order of the files is not important, as long as you use the same order for the behavioural variable   In the case of this tutorial, we do not actually have relevant data to run a BBAM, but we will nevertheless run a BBAM using the same files as those used previously in ABAM.   Please do not try to interpret the final results!   You need to create a text file called behaviour.dat, at the same level as the statistical maps, which should contain, in a single column, the behavioural value, one per subject, in the same order as subjects.txt   You can also add up to two covariates to regress in a file called covar.dat (two columns separated by a Space) SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 95
  • 96. mirabelle% cd ~/EMOTIVE/FEAR mirabelle% mkdir BEHAV mirabelle% cp FEAR_GBAM/*talobsa[2-4]* FEAR_GBAM/DoNotDelete.hdr BEHAV mirabelle% ls BEHAV DoNotDelete.hdr FEAR02talobsa2.img FEAR03talobsa3.img FEAR01talobsa2.img FEAR02talobsa3.img FEAR03talobsa4.img FEAR01talobsa3.img FEAR02talobsa4.img FEAR01talobsa4.img FEAR03talobsa2.img mirabelle% nedit BEHAV/subjects.txt & neutral 50% fear 100% fear SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 96
  • 97.  In this tutorial, the BBAM analysis is simulated and the behaviour.dat contain values which are on average following the increase in stimulation intensity mirabelle% cd ~/EMOTIVE/FEAR/BEHAV mirabelle% ls DoNotDelete.hdr FEAR02talobsa2.img FEAR03talobsa3.img FEAR01talobsa2.img FEAR02talobsa3.img FEAR03talobsa4.img FEAR01talobsa3.img FEAR02talobsa4.img subjects.txt FEAR01talobsa4.img FEAR03talobsa2.img mirabelle% nedit behaviour.dat & [1] 499 mirabelle% paste subjects.txt behaviour.dat FEAR01talobsa2.img 6 neutral FEAR02talobsa2.img 3.4 FEAR03talobsa2.img 4.2 50% fear FEAR01talobsa3.img 10.1 FEAR02talobsa3.img 9 100% fear FEAR03talobsa3.img 8.5 FEAR01talobsa4.img 18.2 FEAR02talobsa4.img 17.4 FEAR03talobsa4.img 18.1 SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 97
  • 98.   Run XBAM_v4 > 4 > 3 to perform a correlation analysis (BBAM) mirabelle% cd ~/EMOTIVE/FEAR mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 4 SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 98
  • 99. ##### SECOND LEVEL ANALYSIS (GROUP LEVEL) ##### Choose from the following options: 1 - Group activation map (GBAM) 2 - Analysis of variance / covariance of statistical maps (ABAM) 3 - Correlation of behavioural data with statistical maps (BBAM) 4 - Conjunction analysis 5 - Group level cluster analysis (Klustakwik) 6 - Calculate group level mixed/fixed/random effects permutation maps 7 - Second level analysis utilities... 8 - Quit What is your choice? 3 -----------------oOo------------------ XBAM - Group behavioural correlation -----------------oOo------------------ Enter the name of the directory containing the files to BBAM: BEHAV SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 99
  • 100. Subjects -> FEAR01talobsa2.img FEAR02talobsa2.img FEAR03talobsa2.img FEAR01talobsa3.img FEAR02talobsa3.img FEAR03talobsa3.img FEAR01talobsa4.img FEAR02talobsa4.img FEAR03talobsa4.img Number of subjects -> 9 Nothing to type in if you want to accept the default options. Enter the 3D voxel level p-value: [0.05] Just press the Return key Enter the 3D cluster level p-value: [0.01] Do you just want to re-run the analysis with different voxel/cluster- wise probabilities (y/n)? [n] Image size: 64 X 64 X 25 What is your allowed number of error pixels per volume (Type I errors)? [5] You can test the significance of a voxel either against a null distribution formed from all the voxels in the brain (global) or alternatively from a distribution created by permuting only this voxel (local) Local permutation may be more sensitive but takes longer and requires more storage space. Local or global analysis (loc/glo)? [glo] SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 100
  • 101. Number of randomisations? [50] Remove covariate? (y/n) [n] Single group correlation or group difference in correlation (single/difference)? [single] Use Pearson's or Kendall's correlation coefficient (p/k)? [p] Allow statistics at voxels where at least half the group has data present (y/n)? [n] Do you want to smooth (spatial smoothing) the images (y/n)? [n] Max probability (e.g. 0.99999) of CSF allowed in voxels (choose default to use the normal template)? [n/a] Max probability (e.g. 0.95) of white matter allowed in voxels (choose default to use the normal template)? [n/a] Use image mask (mask.img) for small volume correction (y/n)? [n] Use BABY template (y/n)? [n] Do you want to use your own template (y/n)? [n] SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 101
  • 102.   The BBAM log file is called _BBAM.log and it can be found at the same level as the files to analyse and the subjects.txt file   The analysis results can be found in the OUTPUT_VPV_CPV directory, in the BBAM analysis folder, where VPV is the chosen voxel P value, and CPV is the chosen cluster P value (by default OUTPUT_0.05_0.01) mirabelle% ls BEHAV/OUTPUT_0.05_0.01/*gif BEHAV/OUTPUT_0.05_0.01/BEHAV_MASSout_NEG.gif BEHAV/OUTPUT_0.05_0.01/BEHAV_MASSout_POS.gif BEHAV/OUTPUT_0.05_0.01/BEHAV_Overlap.gif BEHAV/OUTPUT_0.05_0.01/BEHAV_Overlap_Mask.gif BEHAV/OUTPUT_0.05_0.01/BEHAV_correlbam.gif SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 102
  • 103.   The BBAM results are independent from the IBAM & TBAM results, i.e. whatever p values you used at the IBAM & TBAM level has no impact on BBAM   The background in the pictures is the Talairach template   2D and 3D cluster analyses are performed independently on the maps generated by the voxel based statistical analysis   The file called _Overlap_Mask.gif in the OUTPUT_???_??? folder shows the extent of the group Talairach coverage, i.e. it shows those voxels where all the subjects map into Talairach template. If at least one subject has no coverage for a specific voxel, this voxel is dismissed from the rest of the analysis and appears in black (i.e. a hole)   A grey level version of this file is provided, called _Overlap.gif in which black shows 0% coverage and white 100% coverage   This map should always be near perfect. If it has a lot of holes or if large parts of the brain are missing, this could indicate a misregistration problem. mirabelle% ls BEHAV/OUTPUT_0.05_0.01/*Overlap*gif BEHAV/OUTPUT_0.05_0.01/BEHAV_Overlap.gif BEHAV/OUTPUT_0.05_0.01/BEHAV_Overlap_Mask.gif mirabelle% xv BEHAV/OUTPUT_0.05_0.01/BEHAV_Overlap_Mask.gif & SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 103
  • 104.   For the 2D cluster analysis   The picture is called _correlbam.gif (e.g. BEHAV_correlbam.gif)   It contains both positive (positive correlation between statistics and behaviour, shown in orange to yellow colour scale) and negative (negative correlation between statistics and behaviour, shown in dark to light blue colour scale) contrasts   The text files containing information about the activated 2D regions is always called CORRELATION_BAM.dat   Not surprisingly in this simulated case, no much is happening… mirabelle% xv BEHAV/OUTPUT_0.05_0.01/BEHAV_correlbam.gif & mirabelle% nedit BEHAV/OUTPUT_0.05_0.01/CORRELATION_BAM.dat & SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 104
  • 105.   For the 3D cluster analysis   The pictures are called _MASSout_POS and _MASSout_NEG (e.g. BEHAV_MASSout_POS.gif)   The positive (positive correlation between statistics and behaviour) contrast is called POS and the negative (negative correlation between statistics and behaviour) contrast is called NEG. In both images, the colour scale goes form dark red to light yellow   Text files containing information about the activated 3D regions (including Talairach Daemon labels) are called _allclusters_POS and _allclusters_NEG (e.g. BEHAV_allclusters_POS.dat).   Slice-by-slice (2D) split of the 3D clusters can be found in the _allclusters_2D_POS and _allclusters_2D_NEG files (e.g. BEHAV_allclusters_2D_POS.dat) mirabelle% xv BEHAV/OUTPUT_0.05_0.01/BEHAV_MASSout_POS.gif & mirabelle% nedit BEHAV/OUTPUT_0.05_0.01/BEHAV_allclusters_POS.dat & SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 105
  • 106.   XBAM allows you to control the Type I error rate of your 3D cluster results.   For each contrast, you can adjust the voxel and cluster P values of the 3D cluster analysis with the aim of obtaining less than one false positive cluster over the whole map   Once you have reached less than one false positive cluster per map, you can be assured that all the remaining clusters are significant   The file containing a table of the Type I error rates is called _massOI_POSa? or _massOI_NEGa?, depending on the direction of the contrast (e.g. BEHAV_massOI_POSa4.dat)   The _massOI file is generated for the chosen voxel P value   If you re-run the analysis, but keep the same voxel P value, you will get the same file (regardless of what happens to the cluster P value)   If you re-run the analysis and change the voxel P value, you will get a different _massOI file. SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 106
  • 107.   Each line of the _massOI table corresponds to a cluster P value (2nd column)   The 3rd column shows the number of false positive clusters expected for each cluster P value   The 4th column shows the number of actual clusters present in the image (observed) for each cluster P value   You should run the analysis once with the default voxel and cluster P values (respectively 0.05 and 0.01), before checking the _massOI file of your contrast of interest to find out which cluster P value gives less than 1 false positive cluster. Then run the analysis a second time, with the adjusted P value, to get only significant blobs on the map   It usually isn’t necessary to adjust the voxel P value, but you may want to do so if your clusters are too big and encompass several brain structures. In this case, reducing the voxel P value may break up the clusters 0.358633 0.007000 0.469000 5 0.349716 0.008000 0.536000 5 0.340029 0.009000 0.603000 5 0.329725 0.010000 0.670000 6 0.284620 0.020000 1.340000 8 0.264354 0.030000 2.010000 8 SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 107
  • 108.   The _BBAM.log file contains the exact cluster p values (for each POS and NEG contrast) producing 1 false positive cluster per map, and 0.5 false positive cluster per map   Use these to adjust the cluster P value for a quick re-analysis generating your desired number of Type I error clusters per map   To quickly find these p values in the log, open the file in a text editor and search for the word yielding ---> P-value yielding 1 false positive cluster per map is 0.005780 <--- ---> P-value yielding 0.5 false positive cluster per map is 0.002890 <--- SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 108
  • 109. To discard or not to discard: the neural basis of hoarding symptoms in obsessive-compulsive disorder. An SK ,Mataix-Cols D, Lawrence N et al., Mol Psychiatry. 2008 Jan 8; [Epub ahead of print] hoarding score SECOND LEVEL: CORRELATION ANALYSIS (BBAM) XBAM tutorial June 2008 109
  • 110. XBAM tutorial Extracting average time series / BOLD response http://brainmap.it XBAM tutorial June 2008 110
  • 111.   After any second level analysis, it is possible to extract the average time series and average BOLD response for a group of subjects using the EBAM module   In XBAM, the extraction is done using an ROI (Region Of Interest) in standard space, but the extracted time series are in native space so you need to have all your IBAM and TBAM folders in the same directory   The ROI to extract from can be:   A blob from a normalised GBAM/ABAM/BBAM result map   A blob grown from specific Talairach coordinates   A Brodmann region   A Talairach daemon structure   You can extract either the ROI mean or the peak EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 111
  • 112.   In this tutorial we will extract the average response to the three fear conditions using as an ROI the biggest cluster generated by the group analysis (GBAM) for the 100% fear condition   Extracting from ABAM or BBAM results requires a couple more steps which are not shown here. Please ask us about it.   When extracting using an activation map as an ROI, you need to create a file called cluster.list at the same level as your GBAM subjects.txt   This file should contain only one line, starting by the name of the .dat file where the cluster is described, followed by the cluster ID number   You can run the extraction process on multiple clusters: when prompted for the cluster ID, write several numbers separated by a Space EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 112
  • 113.   The .dat file describing the clusters found by the 100% GBAM analysis is FEAR_allclusters_POSa4.dat   Looking at this file, the ID of the biggest cluster (1404 voxels) is 309 (8th column) mirabelle% cd ~/EMOTIVE/FEAR/ mirabelle% ls BEHAV FEAR02_TBAM FEAR03_TBAM.parameters FEAR01 FEAR02_TBAM.log FEAR_GBAM FEAR01_TBAM FEAR02_TBAM.parameters FEAR_GBAM.log FEAR01_TBAM.log FEAR03 FEAR_GBAM.parameters FEAR01_TBAM.parameters FEAR03_TBAM TREND FEAR02 FEAR03_TBAM.log subjects.txt mirabelle% echo FEAR_allclusters_POSa4.dat 309 > cluster.list mirabelle% more cluster.list FEAR_allclusters_POSa4.dat 309 EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 113
  • 114.   Run XBAM_v4 > 5 > 1 to start the extraction of native space average time series and BOLD response (EBAM) mirabelle% cd ~/EMOTIVE/FEAR mirabelle% ls -l cluster.list -rw-r--r-- 1 spakvig spakvig 31 Feb 1 16:08 cluster.list mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 5 EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 114
  • 115. ##### REGION OF INTEREST (ROI) ANALYSIS TOOLS ##### Choose from the following options: 1 - Extract time series / average BOLD response from non-normalised XBAM volumes (EBAM) 2 - Extract time series / average BOLD response from normalised XBAM volumes 3 - Extract statistical information from XBAM maps or mask.img 4 - Extract statistical information from Brodmann regions 5 - Generate mask from Brodmann regions, Talairach Daemon labels, or Talairach coordinates 6 - Test difference between two groups of extracted time series 7 - Compute partial correlation model from extracted time series folder (for wavelet analysis) 8 - Keep only some of the clusters from an activation map used as mask 9 - Quit What is your choice? 1 EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 115
  • 116. --------------------------------------------oOo----------------------- XBAM - Extract time series / average BOLD response from non- normalised XBAM volumes (EBAM) --------------------------------------------oOo----------------------- Subjects -> FEAR01 FEAR02 FEAR03 Number of subjects -> 3 Nothing to type in if you want Checking FEAR01_TBAM : to accept the default options. Image size: 64 X 64 X 25 Just press the Return key Checking FEAR02_TBAM : Image size: 64 X 64 X 25 Checking FEAR03_TBAM : Image size: 64 X 64 X 25 Do you want to extract time-series for specific coordinates (in tal.list file) (y/n)? [n] Enter the name of the output directory containing your .dat and .gif files: [OUTPUT_0.05_0.01] EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 116
  • 117. You are going to extract clusters 309 from FEAR_GBAM/OUTPUT_0.05_0.01/ FEAR_allclusters_POSa4.dat Which analysis model have you used? 1) infile.dat (block design) 2) newstarts.dat (event related design) 3) model.dat (correlation analysis) Enter your model number (1,2 or 3): [2] Enter the TR in seconds (acquisition time + silent gap)? [2.00] What is the epoch length IN IMAGES (i.e. in TR) over which to average (e.g. for a block design choose 1 1/2 block, for an event related choose around 14s of signal)? 7 Do you wish to correct data for slice timings ( this requires timings.dat for each subject ) (y/n)? [y] Do you want to smooth (spatial smoothing) the images (y/n)? [n] Do you want to High Pass Filter the images (y/n)? [n] EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 117
  • 118. Do you want to remove the effects of a nuisance variable ( This requires nuisance.dat for each subject ) (y/n)? [n] Extract time series from: 1 - The most activated voxel in the cluster 2 - The cluster mean What is your choice (1/2)? [2] Weight extracted time series by statistical values (only relevant for extraction of GBAM results) (y/n)? [n] Start extracting from before (negative number) or after (positive number) the start of the block/event (enter time shift in second)? [0]  The EBAM log file is called _EBAM.log and it can be found at the same level as the cluster.list file  The extraction results can be found in the _CLUSTERID.TS directory, at the same level as the cluster.list file, where ID is the ID of the extracted cluster (e.g. FEAR_CLUSTER309.TS) EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 118
  • 119.   The output folder contains a lot of files that you can plot in Excel or, in Unix/Linux, with xmgrace   The most important files are:   AverageTS.dat is the average time series over all the subjects in the chosen ROI   AverageTSstd.dat is the same file, but with error bars   For each active condition the meantsX.dat file shows the average BOLD response (over the time interval specified in one of the EBAM questions) to the events of condition X, where X is 1 for the first column of the model file (neutral), 2 for the second column (50%), 3 for the third column (100%)…   meanstdtsX.dat is the same thing with error bars   The average BOLD response is generated by first finding out when events happen (using the model file) on the average time series (AverageTS.dat) and by then averaging over the desired time interval (e.g. 14s) after each event EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 119
  • 120. mirabelle% cd FEAR_CLUSTER309.TS mirabelle% xmgrace AverageTS.dat & [1] 2579 mirabelle% xmgrace meants1.dat meants2.dat meants3.dat & [2] 2580 100% fear 50% fear neutral Average time series Average BOLD responses Signal change in % Time in TR EXTRACTING AVERAGE TIME SERIES / BOLD RESPONSE XBAM tutorial June 2008 120
  • 121. XBAM tutorial Extracting statistical values from ROI http://brainmap.it XBAM tutorial June 2008 121
  • 122.   After any second level analyses, it is possible to extract the statistical values / effect sizes for an ROI   The ROI to extract from can be:   A blob from a normalised GBAM/ABAM/BBAM result map   A blob grown from specific Talairach coordinates   A Brodmann region   A Talairach daemon structure   You can extract either:   the mean of the ROI   the peak of the ROI as defined from a second level analysis results (the same peak at the same coordinates for everybody)   the peak of the ROI as defined on a per subject basis (individual peaks at different coordinates for everybody)   In this tutorial, we will extract the mean statistical value from all the brain regions found by the trend analysis EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 122
  • 123.   Run XBAM_v4 > 5 > 3 to start the extraction of statistical values from ROI mirabelle% cd ~/EMOTIVE/FEAR mirabelle% XBAM_v4 … ##### MAIN MENU ##### Choose from the following options: 1 - Data conversion... 2 - Preprocessing... 3 - First level analysis (subject level)... 4 - Second level analysis (group level)... 5 - Region of interest (ROI) analysis tools... 6 - Model free analysis... 7 - Utilities... 8 - About XBAM 9 - Quit What is your choice? 5 EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 123
  • 124. ##### REGION OF INTEREST (ROI) ANALYSIS TOOLS ##### Choose from the following options: 1 - Extract time series / average BOLD response from non-normalised XBAM volumes (EBAM) 2 - Extract time series / average BOLD response from normalised XBAM volumes 3 - Extract statistical information from XBAM maps or mask.img 4 - Extract statistical information from Brodmann regions 5 - Generate mask from Brodmann regions, Talairach Daemon labels, or Talairach coordinates 6 - Test difference between two groups of extracted time series 7 - Compute partial correlation model from extracted time series folder (for wavelet analysis) 8 - Keep only some of the clusters from an activation map used as mask 9 - Quit What is your choice? 3 EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 124
  • 125. --------------------------------oOo------------------------------ XBAM - Extract statistical information from 2D/3D cluster files --------------------------------oOo------------------------------ Are you going to extract statistical values from a GBAM (y/n)? [n] Enter the name of the directory containing the talobs/taleffect files: TREND Image size: 64 X 64 X 25 Use a Brodmann/Talairach Daemon generated mask file (mask) or an XBAM activation map (act) to define regions to extract (mask/act)? act Enter the name of the output directory containing your .dat and .gif files: [OUTPUT_0.05_0.01] Do you want to use the default equiv and .dat file for this condition (y/n)? [y] Extract statistical values from 3D or sliced 3D clusters (3D/s3D)? [3D] EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 125
  • 126. Extract from the POS or NEG image (POS/NEG)? [POS] You are using talobs files in your subjects.txt Extract statistical values from the taleffect maps (y/n)? [n] Extract statistical values from: 1 - The most activated voxel taken directly from the cluster (NOT FROM THE COORDINATES) 2 - The cluster mean 3 - The Talairach coordinates taken from the .dat file 4 - The most activated voxel for each subject taken directly from the cluster, i.e. different peaks for different people What is your choice (1/2/3/4) ? [2]  The log file is called _EXTRACTSSQ.log and it can be found in the folder where you started XBAM from  The extraction results can be found in the relevant GBAM/ABAM/BBAM OUTPUT_???_??? folder EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 126
  • 127.   The name of the file containing the extracted values terminates by _SSQ.dat   The rest of the file name depends on your choices when running the extraction program   In this case, we want to extract values from the 3D cluster analysis results of the positive contrast of the TREND analysis The ABAM results file corresponding to this set of options is TREND_allclusters_POS.dat The extraction results can therefore be found in the file called TREND_allclusters_POS_SSQ.dat mirabelle% cd TREND/OUTPUT_0.05_0.01 mirabelle% ls *allclusters_POS*dat TREND_allclusters_POS.dat TREND_allclusters_POS_SSQ.dat mirabelle% nedit TREND_allclusters_POS.dat & [1] 339 mirabelle% nedit TREND_allclusters_POS_SSQ.dat & [2] 340 EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 127
  • 128.   In the TREND_allclusters_POS.dat file, each 3D cluster is described under the MASS DATA heading and each cluster has its own ID number   In the TREND_allclusters_POS_SSQ.dat file, each line corresponds to one of the 3D clusters (cluster ID in first column)   Each of the other columns corresponds to one subject  in the same order as subjects.txt when extracting from ABAM/BBAM  in alphanumerical order for GBAM extractions Check the _EXTRACTSSQ.log file if you are not 100% sure   For each subject, the number is the required extracted value (ROI mean in this case) EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 128
  • 129.   The first column shows the cluster ID. In this case, the first line corresponds to cluster #160, the second line to cluster #161…   The second column corresponds to the extracted values of subject FEAR01talobsa2.img, the third column to FEAR02talobsa2.img… (following TREND/subjects.txt)   The mean value in cluster #160 for subject FEAR01talobsa2.img is 0.127760, the mean value in cluster #160 for subject FEAR02talobsa2.img is 0.069915…   Remember that XBAM is median-based, so use the median of the groups when plotting the extracted values EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 129
  • 130. cluster #160 of TREND analysis (ROI mean extracted, median of group plotted) -13, -95, -1, Left Cerebrum,Occipital Lobe,Cuneus,Gray Matter,Brodmann area 17, (1.7 mm away) 0.25 0.2 SSQ Statistic 0.15 0.1 0.05 0 neutral 1 50% fear 2 100% fear 3 EXTRACTING STATISTICAL VALUES FROM ROI XBAM tutorial June 2008 130

×