Click here to load reader

AFNI: Analysis of Functional NeuroImages

  • Upload
    gerik

  • View
    177

  • Download
    1

Embed Size (px)

DESCRIPTION

AFNI: Analysis of Functional NeuroImages. Andrew Jahn IUNG April 9 th , 2012. The AFNI Team. Ziad Saad (SUMA creator). Bob Cox (Hive Mind). Gang Chen (Statistics Expert). Rick Reynolds (Python Developer). Daniel Glen ( Coregistration ). AFNI fans !. - PowerPoint PPT Presentation

Citation preview

PowerPoint Presentation

Andrew JahnIUNGApril 9th, 2012AFNI: Analysis of Functional NeuroImages

The AFNI Team

Daniel Glen (Coregistration)Gang Chen (Statistics Expert)Bob Cox (Hive Mind)Rick Reynolds (Python Developer)Ziad Saad (SUMA creator)AFNI fans!Black-Box Analyses vs.Staying Close to Your DataOutlineOverview of AFNIInteresting new toolsFuture Directions / Workshops / ResourcesWhat is AFNI?Analysis of Functional NeuroImagesJust another fMRI analysis packageSimilar to SPM, FSL, Brainvoyager, etc.HOWEVER: Excels at helping the user visualize data at each stepCool (and maybe even useful) tools for surface-based analysisWhat is AFNI?Advantages:Allows for flexible scripting (very little black-box throughout analysis)Very fast compared to, say, SPMBuilt-in toolboxes for functional connectivity (cf. InstaCorr, IM modulation) and MVPA (1dsvm)Disadvantages:Requires knowledge of Unix interfaceVery script heavyAdvantages in speed come with tradeoff many hours of debugging when getting startedYe good olde daysScript everythingCobble together customized script for each subjectThe good: Hyper-customizedThe bad: Nobody else can figure out what you are doingThe ugly: Assumes that you know what you are doingDecadent modern timesStreamline analysis with python scripts (cf. afni_proc.py)Recent technological breakthrough: Include GUI (!) for preprocessing (cf. uber_subject.py)Makes it easier for user and for tech support to troubleshoot problemsAfni data format / JargonBRIK/HEAD filesE.g., run_01+orig.BRIK, run_01+orig.HEADSame idea as *.hdr, *.img format of ANALYZECan easily convert to and from NIFTI (e.g., 3dcopy, 3dAFNItoNIFTI)Rounding errors -> can save in float (as opposed to short) data typeN.B.: Mixing data types is NOT a good idea!!Interchangeable with different steps of other processing streamsFor example: Write AFNI wrapper to perform preprocessing, do GLMs with SPMCan also convert Brainvoyager vmr/fmr to .BRIK/.HEAD using 3dBRAINVOYAGERtoAFNIStill being tested!Key aspects of afniExtremely hands-oni.e., will tell you everything it is doing (and I mean everything)Output can be controlled through -verbose optionsImportant for debuggingFlexibility with GLMsFor example: Can model data with customized basis function built in FLOBS (or Matlab)Can model different classes with different basis functionsAFNI DemoAFNI-Specific Tools3dREML3dMEMASUMA

3dREMLRestricted Maximum LikelihoodTakes into account variability in Beta estimates at individual levelWeights betas according to varianceAccount for serial correlation between time points (i.e., lower number of independent TRs -> lower degrees of freedom)3dMEMAMixed Effects Meta-AnalysisIncorporates information about individual estimates in beta at 2nd-level (i.e., uses info about the beta and the t-statistic associated with that beta)Recommended way to analyze results using AFNIExample: Study where subjects either generate one prediction (pred1) or two predictions (pred2) about potential outcomesWeighting each subject equally: peak voxel t-statistic of 7.01 for group-level contrast pred2-pred1 (generated using SPM)

Results of 3dMEMA: Peak voxel t-statistic of 6.02 (and in location anterior to that generated by SPM)Which is correct? Experimenter must decide

SUMASurface MapperSister program to AFNICan map volumetric data onto surface maps, and vice versaCan use much larger smoothing kernels (e.g., 10-20mm; larger values possible but ridiculous)Pros: SNR increases (in theory)Avoids the problem of smoothing across crowns of gyriVisualization of activation within sulci / around banks of gyriROI drawing on surface

6mm15mm20mmConclusion: Larger smoothing kernels marginally increase statistical values at the loss of some spatial specificitySUMABest method: Go through process of mapping each individuals volumetric data onto individual surfacePreprocess and run stats on surfaceTake results to group levelHowever, can be used to map volumetric group-level activation already processed in another package (such as SPM) onto template surfaceStep 1: Accept geometric limitations of this approachStep 2: Go ahead and make sexy figures anywayExample: Experiment where participant imagines error versus imagines correct feedback (ImagineError-ImagineCorrect)Processed in SPMIn our paper, we claimed that we observed activation in the superior frontal sulcusBut did we???Maps converted to AFNI format, splashed onto template SUMA surface

SUMA Demo3dInstaCorrAFNIs latest tool allowing for real-time functional connectivity analysisRecommended for use with resting state dataTheory: Regress out motion, physiological covariates (heart rate, respiration, etc) and model the rest (i.e., what is usually called noise)See which timecourses in which voxels are significantly correlatedFor use with, e.g., clinical populations vs. controlsInstaCorr DemoTools in the Trunk3dClustSim Replacement of AlphaSimMore reliable for smoothing less than 10mm (as opposed to Gaussian Random Field theory)Calculate multiple p-thresholds simultaneouslyAutomatically incorporated into processing pipeline to determine significance of clusters / updates instantly when p-threshold changes3dMaskDump / 3dUndumpExtract parameter estimates from mask / create mask in given location

Tools in the Trunk3dBlurInMaskSmooth only within grey matter (defined by mask generated by FreeSurfer, for example)However, can lead to weird biases at 2nd level, as grey matter masks are more stereotyped per subject than normalized anatomical maskAlternatives:Smooth over average of all subjects GM masksSmooth over whole brain mask (GM + WM)Still to be tested

Tools in the Trunk3dDespikeUsed for squashing outlying data valuesEspecially useful for uncooperative scanners / populations that move a lot (e.g., children)Is a standard part of preprocessing in our lab

Tools in the TrunkFreeSurferUsed for generating surface maps to then be used with AFNIHowever, also generates useful auxiliary dataE.g., tables of volume for each grey and white matter structureCan be used as covariates, possibly with patient populations

Tools in the TrunkScripts for interfacing with Quarry, IUs supercomputer clusterDeveloped for Dr. Ruchika Prakash at OSU, 2010Needed a way to processing 100+ anatomical scans through FreeSurferEach FreeSurfer image takes 20-30 hours to processWith Quarry, number of subjects is not an issue: everything gets done within 20-30 hoursCan save time by orders of magnitudeScripts available for download at: http://mypage.iu.edu/~ajahn/docs/Supercomputer_Scripts.zipResourcesAFNI Message BoardTypically respond to questions on the order of minutesImplement changes within a few days, sometimes a few hoursAFNI users are beta-testers for life

ResourcesLinks:AFNI: http://afni.nimh.nih.gov/FreeSurfer: http://surfer.nmr.mgh.harvard.edu/fswikiMy Webpage: http://mypage.iu.edu/~ajahn/Contains links and programs that may be usefulIf you use my programs I am not responsible for anything that happens, ever.Screencasts: http://www.screencast.com/users/Andrew.JahnFirst developed back in ye good olde days at OSU to help apathetic, shiftless undergraduates learn Unix - may create more if there is demandFuture DirectionsWorkshopsSeveral students have expressed interest in an FSL workshopMay also include AFNI at some pointThis summer? Next fall? Suggestions?OtherMore documentation and screencasts will be available soonDesideratum: Apply Bayesian inference at voxel level for parameter estimates (e.g., have AFNI interface with JAGS, restrict analysis to grey matter mask)Possible, but difficult to implement and takes a ridiculously long time (cf. FSLs FLAME 1+2)Experiment with AFNIs real-time volume registration during scanning using the program Dimon (developed by Rick Reynolds)AcknowledgementsJosh BrownThe AFNI groupAdrian Lange, Argonne National Laboratory

Bonus SlidesKey aspects of afniExample of flexible GLMs:Assume we have 3 classes of stimuli (positive, negative, neutral). We think that:Negative will follow canonical 1-parameter gamma response (GAM)Positive will not have fixed BOLD profile and therefore be data-driven (TENT, similar to SPMs FIR basis function)Neutral will follow block response of 30s duration (BLOCK)Give yourself a point if you understood everything in capsafni_proc.py -dsetsdatasets+orig.HEAD -regress_stim_timessb23/stim_files/blk_times.*.1D \ -regress_stim_timessb23/stim_files/blk_times.*.1D\-regress_stim_labelstnegtpostneu\enegeposeneu\fnegfposfneu\-regress_basis_multi\GAM''TENT(0,45,16)''BLOCK(30,1)'\GAM'TENT(0,45,16)''BLOCK(30,1)'\GAM''TENT(0,45,16)''BLOCK(30,1)'\