Edit Article

  • 507 views
  • 5 Editors

  • Edited

It is necessary to practice using the SPM software before using it to analyze real data.


These directions are for new research assistants in the Laboratory for the Neurodevelopment of Reading of Language at the University of Maryland.



IMPORTANT:


• Make sure you have permission to log into neurodev1 and have permission to access the data! Ask Dr. Bolger for access before attempting this practice analysis.


• You should be doing this practice analysis on one of the computers in Dr. DJ Bolger’s Laboratory for the Neurodevelopment of Reading and Language. It is helpful to have an experienced research assistant or graduate student available in case you have any questions.


SPM Background Info: Statistical Parametric Mapping is a statistical technique used to analyze brain activity during neuroimaging technologies such as fMRI or PET. SPM is software run through MATLAB.


fMRI uses a very strong magnetic field and radio waves to detect blood flow and blood-oxygen-level dependent (BOLD) hemodynamic response to different areas of the brain. An increase in BOLD to a certain brain area means that that area is being activated. When a person in an fMRI machine performs a certain task, we can observe the results to see which areas of the brain are used during that specific task.


Equipment Needed: • Computer • MATLAB • SPM8 Software • SPM8 Auditory Tutorial Data

    • The equipment listed above will all already be on all of the computers in the lab.**

Practice Data Background Info: This specific data set contains whole brain BOLD/EPI images from a single subject with 96 acquisitions. Each acquisition lasted 6.05 seconds and consisted of 64 slices. The scan repeat time (TR) was 7 seconds. A slice refers to a view of the inside of the brain and thickness of the slices you are able to choose the thickness of the slices depending on your experiment. The thinner the slices, the less physical and physiological noise (i.e. the magnet or head movement) shows up in the data. This sample data set uses slices of 3x3x3mm voxels. This data also used 16 43-second blocks. A block is a period of time during which a specific stimulus is presented. In this case, the stimulation was auditory: bi-syllabic words presented at a rate of 1 per second to both ears. The functional data begins at the fourth scan, fM00223_004 because the first few were discarded due to T1 effects. There is also one structural image, sM00223_002.

EditSteps

  1. 1
    Setting up software
  2. 2
    • Click red icon on desktop “neurodev1”
  3. 3
    • Log in using your UID and password
  4. 4
    • Click icon “xterm”
  5. 5
    1 To create directories to store analysis:
  6. 6
    • Type the following commands into the window and press “enter” on the keyboard after each command:
  7. 7
    “ls”
  8. 8
    “mkdir c:\data\auditory”
  9. 9
    “cd c:\data\auditory”
  10. 10
    “mkdir jobs”
  11. 11
    “mkdir classical”
  12. 12
    HINT: This is case sensitive.
  13. 13
    2 To open MATLAB:
  14. 14
    • Type the command “Tap matlab”
  15. 15
    • Type “matlab 2012b”
  16. 16
    • Click “File” on the larger window that says Matlab 7.7.0 at the top
  17. 17
    • Click “set path”
  18. 18
    • Click “Add folder”
  19. 19
    • From the pull down window next to the word “home”, select [/]
  20. 20
    • Click the following folders:
  21. 21
    export
  22. 22
    software
  23. 23
    neurodev1
  24. 24
    spm
  25. 25
    smp8
  26. 26
    • Click “OK” at the bottom of the window
  27. 27
    • Click “Save”
  28. 28
    • Click “close” and the window will close
  29. 29
    3 To set path for data:
  30. 30
    • Click “…” next where it says “current directory” towards the top of the screen
  31. 31
    • Select the following:
  32. 32
    [/]
  33. 33
    export
  34. 34
    data1
  35. 35
    spm8_tutorial_data
  36. 36
    GLM_Auditory
  37. 37
    4 To open SPM:
  38. 38
    • Type “SPM fmri” in the blank MATLAB command window
  39. 39
    The SPM program will open.
  40. 40
    Spatial Preprocessing
  41. 41
    1 Realignment:
  42. 42
    • Click “REALIGN (EST&RES)” button
  43. 43
    • Select “REALIGN” from pull down menu
  44. 44
    A new window will open.
  45. 45
    • Highlight the word “data”
  46. 46
    • Click “New Session”
  47. 47
    • Select “Specify Files” at bottom of screen
  48. 48
    • Click “fM00223”
  49. 49
    • Highlight files that look like “fM000*.img”. There should be 96.
  50. 50
    HINT #1: To make this easier, type “^fM” in box beneath the data that has “.*” written in it and press “enter” button on keyboard. Then right click on data and click “select all”.
  51. 51
    HINT #2: Selected data will show up in the box at the bottom of the window. If you want to unselect something, just click on the file in this window and it will disappear.
  52. 52
    • Click “done”
  53. 53
    • Click “Save” button that looks like a floppy disk
  54. 54
    • Save as “DIR\jobs\realign.mat”
  55. 55
    • Click green arrow in top left corner to run the batch. This is the RUN button.
  56. 56
    • Close window
  57. 57
    These files are now realigned and will be saved with the prefix “rpfM…”
  58. 58
    2 Coregistration:
  59. 59
    • Click ”COREGISTER” button
  60. 60
    • Select “Coregister (Estimate) from pull down menu
  61. 61
    • Select “reference image”
  62. 62
    • Click “select files” at bottom of window
  63. 63
    • Click “fM00223”
  64. 64
    • Type “^mean” to find “meanfM00223_004.img”
  65. 65
    • Select this file
  66. 66
    • Click “done”
  67. 67
    • Highlight “Source image”
  68. 68
    • Click “select files”
  69. 69
    • Type “^s”
  70. 70
    • Select “swmeanfM00223_00223.img”
  71. 71
    • Click “save” button
  72. 72
    • Save as “coreg.job”
  73. 73
    • Press green RUN button
  74. 74
    An image of a brain should appear in the graphics window
  75. 75
    3 Check Reg:
  76. 76
    • Press the CHECK REG button in the main window
  77. 77
    • Select “meanfM00223_004.img” and “swmeanfM00223_00223.img”
  78. 78
    A different set of brain images will appear in the graphics window that you can check to make sure there is an anatomical correspondence.
  79. 79
    HINT: This step is optional, but recommended.
  80. 80
    4 Segmentation:
  81. 81
    • Click “SEGMENT” button
  82. 82
    • Highlight the word “data”
  83. 83
    • Select file that looks like “sM00223_002.img”
  84. 84
    • Save as “segment.mat”
  85. 85
    • Press green RUN button
  86. 86
    5 Normalise:
  87. 87
    • Click “NORMALISE” button
  88. 88
    • Select “NORMALISE (WRITE)” from the pull down menu
  89. 89
    • Highlight “data:
  90. 90
    • Select “New Subject”
  91. 91
    • Highlight “Parameter File”
  92. 92
    • Select “sM00223_0020_seg_sn.mat”
  93. 93
    • Highlight “Images to Write”
  94. 94
    • Select all files that look like “rfM000*.img”
  95. 95
    HINT: Type “^rf” and press to find these more easily.
  96. 96
    • Highlight “Writing Options”
  97. 97
    • Change “Voxel Sizes” to [333]
  98. 98
    • Save as “normalize.mat”
  99. 99
    • Press RUN button
  100. 100
    These normalized files will be saved with the prefix “w”.
  101. 101
    6 Smoothing:
  102. 102
    • Click the “SMOOTH” button
  103. 103
    • Highlight “Images to Smooth”
  104. 104
    • Select normalized files (type “ ^wrf” to find)
  105. 105
    • Highlight “FWHM”
  106. 106
    • Change [666] to [888]
  107. 107
    • Save as ”smooth.mat”
  108. 108
    • Click RUN button
  109. 109
    1st Level Classical Analysis
  110. 110
    • Click “Specify 1st Level”
  111. 111
    • Select “Timing parameters”
  112. 112
    • Highlight “Units for design”
  113. 113
    • Click “scans”
  114. 114
    • Highlight “Interscan interval”
  115. 115
    • Enter “7”
  116. 116
    • Highlight “Data and Design”
  117. 117
    • Select “New Subject/Session”
  118. 118
    • Click “Subject/Session”
  119. 119
    • Highlight “Scans”
  120. 120
    • Select files that have the prefix “swrf.
  121. 121
    They should go from “swrfM00223_016.img” through “swrfM00223_99.img”
  122. 122
    • Click “Done”
  123. 123
    • Highlight “Condition”
  124. 124
    • Click “New condition”
  125. 125
    • Open new “Condition” option
  126. 126
    • Highlight “Name”
  127. 127
    • Type “active”
  128. 128
    • Highlight “Onsets”
  129. 129
    • Type “16:12:84”
  130. 130
    • Highlight “Durations”
  131. 131
    • Type “6”
  132. 132
    • Highlight “Directory”
  133. 133
    • Select the “DIR/classical” directory created earlier
  134. 134
    • Save as “specify.mat”
  135. 135
    • Click RUN button
  136. 136
    1 Estimate:
  137. 137
    • Click “ESTIMATE” button
  138. 138
    • Highlight “Select SPM.mat”
  139. 139
    • Choose “SPM.mat” file saved in the classical directory
  140. 140
    • Save as estimate.job
  141. 141
    • Click RUN button
  142. 142
    2 Inference:
  143. 143
    • Press “Results”
  144. 144
    • Select “SPM.met” file created earlier
  145. 145
    3 Contrast Manager:
  146. 146
    • Select “Define new contrast”
  147. 147
    • Select contrast name “active>rest”
  148. 148
    • Click “Done”
  149. 149
    4 Masking:
  150. 150
    You will be prompted with Mask with other contrast? [Yes/No]
  151. 151
    • Click “No”
  152. 152
    5 Thresholds:
  153. 153
    You will then be prompted with the following:
  154. 154
    Title for comparison?
  155. 155
    • Enter “active>rest”
  156. 156
    p value adjustment to control: [FWE/none
  157. 157
    • Select “FWE”
  158. 158
    p value(family-wise error)
  159. 159
    • Accept the default value, 0.05
  160. 160
    Extent Threshold {voxels} [0]
  161. 161
    • Accept the default value, “0”
  162. 162
    The graphics window should now show images of brains in three different planes with dark spots over the temporal lobes on the right and left sides. This is where the brain would be activated by auditory stimuli. These images are Maximum Intensity Projections (MIP) of the statistical map.
  163. 163
    6 View Statistical Results:
  164. 164
    • Click “Whole Brain” button in the p-values section of the interactive window.
  165. 165
    The columns show, from right to left:
  166. 166
    x, y, z (mm): coordinates in MNI space for each maximum.
  167. 167
    peak-level: the chance (p) of finding (under the null hypothesis) a peak with this or a greater height (T- or Z-statistic), corrected (FWE or FDR)/ uncorrected for search volume.
  168. 168
    cluster-level: the chance (p) of finding a cluster with this many (ke) or a greater number of voxels, corrected (FWE or FDR)/ uncorrected for search volume.
  169. 169
    set-level: the chance (p) of finding this (c) or a greater number of clusters in the search volume.
  170. 170
    Congratulations! You have completed your first fMRI data analysis.
  171. 171
    These directions are derived from the SPM8 manual created by Welcome Department of Imaging Neuroscience at the University College London.

We could really use your help!

Can you tell us about
bodybuilding?
Yes I can
bodybuilding
how to become a bodybuilder
Can you tell us about
natural weight gain?
Yes I can
natural weight gain
how to get bigger naturally
Can you tell us about
skiing?
Yes I can
skiing
how to tune a ski
Can you tell us about
estate planning?
Yes I can
estate planning
how to set up an Estate
Thanks for helping! Please tell us everything you know about
...
Tell us everything you know here. Remember, more detail is better.
Tips
Provide Details.
Please be as detailed as possible in your explanation. Don't worry about formatting! We'll take care of it. For example:
Don't say: Eat more fats.
Do say: Add fats with some nutritional value to the foods you already eat. Try olive oil, butter, avocado, and mayonnaise.

EditThings You'll Need

  • • Computer
  • • MATLAB
  • • SPM8 Software
  • • SPM8 Auditory Tutorial Data
    • The equipment listed above will all already be on all of the computers in the lab.**

Article Info

Categories: Summarization | Format | Software

Recent edits by: WikiHow Intern, Carolyn Barratt, Anna

Thanks to all authors for creating a page that has been read 507 times.

Did this article help you?
Yes No