# fMRI Lab for 9th November 2023 --- ### Aim: To get acquainted with the tools needed to generate fMRI results --- # Pin TBC --- # Plan #### 1. Tools #### 2. Introduce experiment #### 3. View the raw data #### 4. Explore the design file #### 5. Preprocessing #### 6. Modelling task events #### 7. View the results #### 8. Multi-subject analysis and automation --- ### Tools for neuroimaging ![](https://i.imgur.com/NPktz6w.png =400x) ###### FSL (FMRIB Software Library) is a free suite of applications from Oxford's Functional Magnetic Resonance Imaging of the Brain (FMRIB) laboratory. ###### http://mriquestions.com/best-fmri-software.html ---- ![](https://i.imgur.com/qU8ivws.png) ###### FEAT (FLAME), BET, FSLeyes ###### https://fsl.fmrib.ox.ac.uk/fsl/fslwiki --- # The Experiment Before looking at the data we will describe the experiment. ### Aim: To find the neural correlates of word-generation ###### Data and more info: https://www.fmrib.ox.ac.uk/primers/intro_primer/ExBox11/IntroBox11.html ---- This dataset is from an event-related language experiment and has three different types of events: ---- ##### - **Word-generation events (WG)**: Here the subject is presented with a noun, say for example "car" and his/her task is to come up with a pertinent verb (for example "drive") and then "think that word in his/her head". The subject was explicitly instructed never to say or even mouth a word to prevent movement artefacts. ###### - **Word-shadowing events (WS)**: Here the subject is presented with a verb and is instructed to simply "think that word in his/her head". ###### - **Null-events (N)**: These are events where nothing happens, i.e. the cross-hair remains on the screen and no word is presented. The purpose of these "events" is to supply a baseline against which the other two event types can be compared. ---- ##### Within one session, the events were presented at a constant ISI (Inter Stimulus Interval) of 6 seconds. For example, the first 72 seconds (twelve events) in this session may have looked like: ### N-WS-N-WS-N-WS-N-WG-N-WS-WG-N --- ## The Data ---- # Structural MRI #### Structural images provide information about the anatomy of what's being imaged by showing differences between different kinds of tissues (Grey Matter vs White Matter vs CSF) #### Structural MRI provides high spatial resolution (0.8mm x 0.8mm x 0.8mm) images. --- # Voxels ![](https://i.imgur.com/qH5ykJi.png =400x) ---- ## Over to you (Viewing a structural image) 1. Open `terminal` (Applications) 2. type `fsleyes` and press enter 3. File -> Add from file -> `fsl_course_data/ExBox11_2/structural.nii.gz` 4. Increase brightness + contrast 5. Play around ---- ![](https://i.imgur.com/qH5ykJi.png =150x) ##### _Voxels_: Volumetric Pixel - the basic unit of measurement. Each voxel has a coordinate in the volume ##### _Slice_: all voxels in 2D plane. ##### _Volume_: The entire 3-D grid covering the space imaged in the MRI scanner. Volume is composed of voxels ##### _TR_: One volume scanned every TR - basic time measurement in MRI --- # What about the 'f' in fMRI? ### We want to map _function_ to _structure_. ### But how do we quantify neuronal activation using non-invasive MRI? --- ## BOLD fMRI! ### _BOLD_ = Blood Oxygenation Level Dependent #### We measure the level of blood oxygenation throughout different cortical regions, and infer neuronal activation from that. ##### Based on the premise that increased blood oxygenation = increased neuronal activation. --- # Time ![](https://i.imgur.com/x506oIm.png) ### Each voxel has an associated time-series of BOLD activation. --- ![](https://i.imgur.com/qH5ykJi.png =200x) ![](https://i.imgur.com/jdPAXVB.png =400x) ###### We have measurment of BOLD for each voxel across time --- ## The raw fMRI data ![](https://i.imgur.com/uK1LbPE.png =400x) - Let's view the raw 4D data for the subject ---- 1. Add functional data ###### - `file` -> `add from file` -> Find: `/fsl_course_data/ExBox11/fmri.nii.gz` 2. View in `Movie Mode` 3. View `timeseries` --- ## The Analysis - To get from this raw data to the results, an analysis was conducted using `FEAT`. - We will look at the details of this analysis now. ---- ## Analysis with FEAT #### 1. Open FEAT GUI ###### - Type `fsl` in terminal & `Enter` -> Click FEAT button #### 2. Load the design file (`.fsf`) ###### - `Load` -> `/fsl_course_data/ExBox11/fmri.feat/design.fsf` ---- ##### You can think of the design file as a recipe that turns your ingredients (raw Nifti data) into a full meal (results). Having this recipe saved is useful because it means you can fully reproduce the meal again. ###### Because this dataset has already been analyzed with FEAT, a design file already exists - but for your experiments, you will need to create one yourself using this software. ##### So, let's explore the design file tab by tab. ---- ## `Data` ![](https://i.imgur.com/OBmJLA1.png =500x) ---- ## `Misc` ![](https://i.imgur.com/w0gwpKl.png =500x) - Use `Baloon help` if you want to find info on parameters ---- ## `Pre-stats` ![](https://i.imgur.com/ZqXX98Q.png =500x) ---- ## `Registration` ![](https://i.imgur.com/nDcYWPB.png =500x) ---- ## `Stats` ![](https://i.imgur.com/2bugX3q.png =500x) 1. Go to `Full model setup` ---- ## Model Set up ### `Explanatory Variables (EVs)` ![](https://i.imgur.com/I5EY4Fi.png =400x) ###### - Each EV models a different effect ---- ![](https://i.imgur.com/mm0rjem.png =400x) ##### These text files contain all the information about the timing of events in the scanner (onset and duration) ---- - ##### We fit a model (predicted activity) to each voxel's BOLD respose (actual activity) ![](https://i.imgur.com/S4rJpKF.png =300x) ---- ### Convolving ![](https://i.imgur.com/EKJe2AN.png =700x) ---- ![](https://i.imgur.com/S4rJpKF.png =300x) - ##### This model is built for each task event and it's goodness of fit (how well we predict the actual data) is assessed for each voxel ---- ### THIS IS THE GENERAL LINEAR MODEL ![](https://i.imgur.com/S4rJpKF.png =300x) ---- ### Contrasts #### Contrasts are the way in which we express questions (alternative hypotheses). - For example, the question of whether a positive effect exists (that's associated with an EV called β1) can be expressed as β1 > 0. - Or to test if the effect size associated with one explanatory variable/IV/Predictor is larger than another can be expressed as β1 > β2. ---- ### Contrasts & F-tests ![](https://i.imgur.com/gjqJDda.png =500x) - Question: What do you think each 5 contrasts are testing? - Tip: EV1 = word generation & EV2 = word shadowing ---- #### Contrast Meanings ##### - `Generation`: this tests for when there was greater activation during word generation compared to baseline. ##### - `Shadowing`: this tests for when there was greater activation during word shadowing compared to baseline. ##### - `Mean`: this tests for when the average activation during generation and shadowing was greater than baseline. ##### - `Shad > Gen`: this tests for when there was greater activation during word shadowing compared to word generation. ##### - `Gen > Shad`: this tests for when there was greater activation during word generation compared to word shadowing. ---- ## `Post-stats (thresholding)` ![](https://i.imgur.com/tTgiLWa.png =500x) - Important for controlling false positives --- ###### - After all that set-up, FEAT is now able to create a model of predicted activity for each explanatory variable (i.e. word generation / shadowing) across time. ###### - GLM will compare this model to actual BOLD activity and reveal those voxels whose activity is well explained by model i.e involved in word generation and/or shadowing. --- ### Running the analysis #### 2 Options: - Simply press `Go` - Or, type `feat design.fsf` in to command line. - ...or view ready-made results! --- ## Viewing the results ![](https://i.imgur.com/u7Jm2Tf.png =500x) ---- ## Viewing the results 1. View results directory ##### - `Applications` -> `Files` -> `fsl_course_data/ExBox11/fmri.feat` 2. View results report (`report.html`) 3. See the report on registration, pre-stats and stats - these are good sanity checks ---- ## Post-stats ###### - `Post-stats` is where the real results are 1. What contrasts show significant efffect? ###### - Each contrast has an associated results image 2. View cluster based statistics ###### - Click on any contrast image --- ### Let's look at the last two results (contrasts Shad>Gen; Gen>Shad) in 3D using FSLeyes ---- ### Viewing the results in 3D 1. Overlay statistical map of **contrast 4** (`fmri.feat/thresh_zstat4; Shad > Gen`) and **contrast 5** (`fmri.feat/thresh_zstat5; Gen > Shad`) 3. Apply different colour maps to each ###### - To change a maps colour, select it in the overlay list and then change the colour map at the top ---- 4. Load unthresholded versions - Add `fmri.feat/stats/zstat5` - not all significant but still potentially useful --- ## Automating this process - This was a single subject analysis - imagine doing this for 50+ participants - We can use the command line for more than file navigation - We can use it to automate this process - Our design file - `design.fsf` - is simply a text file - lot's of potential --- # Summary - Hopefully now be acquainted with: 1. Bash commands in Terminal 2. fMRI analysis software FEAT 3. fMRI data/results visualization with FSLEyes - Code is Key! ---- # fMRI Analysis Resources ---- ## Ginette Mumford's FSL FEAT youtube tutorials https://www.youtube.com/watch?v=lCwewJJPd5U&list=PLB2iAtgpI4YHlH4sno3i3CUjCofI38a-3&ab_channel=mumfordbrainstats - This is a great series which takes you from start to finish of a task-based fMRI analysis using FSL's FEAT software ---- ## Andrew Jahn's FSL videos https://www.youtube.com/watch?v=9ionYVXUQn8&list=PLOPaMln1VugP5sSKaa_KMmrrVXMJTMrLi&ab_channel=AndrewJahn - More examples of scripting + FSL ---- ## MIT General Linear Model for fMRI - 3 part lecture series that explains the general linear model nicely. These were the videos that made the GLM and task-design click. - Theoretical understanding of the principles of the method ---- ## FSL's FEAT tutorial https://www.fmrib.ox.ac.uk/primers/intro_primer/ExBox11/IntroBox11.html - Example data here https://fsl.fmrib.ox.ac.uk/fslcourse/lectures/practicals/feat1/index.html - More explation here ---- https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FEAT/UserGuide - The master guide to FEAT ---- ## GLM Hanbook https://www.fmrib.ox.ac.uk/primers/appendices/glm.pdf --- Attendence sheet ![](https://i.imgur.com/BkC4dKZ.png)
{"title":"fMRI Lab for 9th Nov 2023","description":"TBC","contributors":"[{\"id\":\"eedaa2d2-bb63-4839-8e61-9fb28793b4c2\",\"add\":13933,\"del\":3015},{\"id\":\"da0bb5a7-4bf8-44e0-bcbd-ca5fbe6f8bfe\",\"add\":1,\"del\":2}]"}
    145 views
   Owned this note