<div dir="ltr"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:16px;vertical-align:baseline;white-space:pre-wrap;line-height:21px;color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif">Hi PyMVPAers,</span><div><span style="background-color:transparent;white-space:pre-wrap;color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px"><br></span></div><div><span style="background-color:transparent;white-space:pre-wrap;color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px">I message you after weeks of frustration and feeling progressively more dumb. I am attempting to do a surface-informed MVPA analysis and am approaching the “screw it, I’ll stick with my volumetric results” decision point, but wanted to try to make one final push before I fly the white flag. I am generally new to surfaces, FreeSurfer, AFNI/SUMA, which is adding to my confusion (new software, file formats, etc.). I have an audio-motor task, and volumetric searchlights are highlighting STG as well as inferior parietal areas (like S2), which I very much hope to disambiguate using the surface-constrained approach. Separately, this approach just makes more inherent sense and I want to be able to constrain my MVPAs to the surface going forward. </span><ul style="margin:15px 0px 0px;padding:0px;border:0px;outline:0px;font-size:13px;vertical-align:baseline;list-style-position:initial;color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;line-height:17px"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">I’m having two sorts of issues:</span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">1. Registration-related. While the FreeSurfer surfaces look well-registered to the input anatomicals, the same isn’t true of the surfaces projected into functional space (although it’s not terrible). Registration woes then get even worse following MVPA, as sanity check analyses (sound vs. silence) shows best decoding in regions that are clearly posterior and superior (by multiple centimeters) to primary auditory cortex.</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">2. How to do a statistical analysis on the group data (11 subjects). </span></li></ul></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">I’ve put a few screenshots, referenced below, at: <b><a href="https://www.dropbox.com/sh/x89tkziz84nt150/AACcDgBlxLSHFWQ0xnEpy1n-a?dl=0">https://www.dropbox.com/sh/x89tkziz84nt150/AACcDgBlxLSHFWQ0xnEpy1n-a?dl=0</a></b></span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">I’m not getting any explicit python errors, but am nonetheless clearly doing this amiss somewhere. </span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">List of steps (<span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;font-style:italic;line-height:0">with issues in italics</span>)</span></li><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">1. fMRI (volume) preprocessing (motion correction etc.) done in SPM8</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">2. Surface extraction from anatomical (in native anatomical space) done with FreeSurfer</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">2a. Quality of surfaces and alignment to the anatomical visually inspected with FreeView.</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">3. pymvpa2-pre-afni-surf run to:</span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">a. resamples the surfaces to standard topologies (with different resolutions) using MapIcosehedron </span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">b. aligns surfaces to a reference functional volume, </span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">c. merges left and right hemispheres into single surface files.</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">I did this with pymvpa2-prep-afni-surf -e mySub/example_functional_volume.nii -d surfer/mySub/surf/ -r mySub/new_suma_surfaces/</span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">example_functional_volume.nii is taken from my 4D time series. I visually verified that the entire time series was in good alignment with the example. </span></li></ul></li></ul></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;font-style:italic;line-height:0">Step 3a vs. Step 3b is a point of a confusion for me. I think I am being thrown off by the phrase “standard topologies.” We are projecting the anatomically-extracted surface into the functional space so that the functional data does not need to be transformed/interpolated (unintentionally smoothed). If that is the case, then how are “standard topologies” involved? (When I hear standard, I think “standard space” like MNI152, etc.) Is the idea that the -shape- of the surface sheet isn’t altered in this “resampl[ing],” but instead just the specific locations (and numbering schemes) for the vertices/edges? This is the only explanation that makes sense to me. </span></span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">4. Visually check the alignment of one of the new suma surfaces (e.g. mh_ico32_al.spec) with the example functional volume using AFNI/SUMA. I am doing this by running:</span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">afni -niml &</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">suma -spec mh_ico32_al.spec -sv example_functional_volume.nii & </span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">(I’m showing this with both a T2 and a T1 image registered the example functional in the T2’s 3mm space, as it’s easier to see.) These images are shown in two of the screenshots.</span></li></ul></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">pressing “t” in SUMA to link together AFNI and SUMA</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;font-style:italic;line-height:0">This, to me, looks OK, but not great. There is clearly much correspondence between the surfaces and the volume, although the STG/HG area (on right) looks particularly bad to me. </span></span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;font-style:italic;line-height:0">Separately, I get a warning message about a force switch from the original view to talairach view. I’m not sure why this would be, as all of these volumes and surfaces should be in the functional space...</span></span></li></ul></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">5. Run the PyMVPA surface searchlight script. </span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">I’m doing this as a sanity check: decoding sound vs. silence.</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">I’m using the merged (m) hemisphere option and I’m using what I think are essentially default settings:</span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">highres_ld = 128 </span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">pial_surf_fn = os.path.join(surfpath, "ico%d_%sh.pial_al.asc </span><span style="background-color:transparent;white-space:pre-wrap">% (highres_ld, hemi))</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">white_surf_fn = os.path.join(surfpath, "ico%d_%sh.smoothwm_al.asc” </span><span style="background-color:transparent;white-space:pre-wrap">% (highres_ld, hemi))</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">lowres_ld = 32 # 16, 32 or 64 is reasonable. 4 and 8 are really fast</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">source_surf_fn = os.path.join(surfpath, "ico%d_%sh.intermediate_al.asc </span><span style="background-color:transparent;white-space:pre-wrap">% (lowres_ld, hemi))</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">radius = 123</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">qe = disc_surface_queryengine(radius, epi_fn, </span><span style="background-color:transparent;white-space:pre-wrap">white_surf_fn, pial_surf_fn, </span><span style="background-color:transparent;white-space:pre-wrap">source_surf_fn, nproc=4)</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">clf = LinearCSVMC()</span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">cv = CrossValidation(clf, NFoldPartitioner(), </span><span style="background-color:transparent;white-space:pre-wrap">errorfx=lambda p, t: np.mean(p == t), </span><span style="background-color:transparent;white-space:pre-wrap">enable_ca=['stats'])</span></li></ul></li></ul></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">6. I’m then checking the results with AFNI/SUMA. </span><ul style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;list-style:disc"><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap"><i>While I do get very high (almost 100% decoding) in certain regions for sound/silence, the peaks are not along the STG/HG as they should be. Instead they are considerably posterior and superior (the SMG and surrounding). This doesn’t pass the smell test, as is also at odds with my volumetric results, which show maximal decoding in and around A1.</i></span></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">A stray thought, but if I display the suma surfaces over my anatomical in its native space, the surface-HG region fits over the native anatomical IPL region. </span></li></ul></li><li style="margin:4px 0px 4px 20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent"><span class="" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;white-space:pre-wrap">And, of course, even if I had all of the issues ironed out, I’m at a loss for how to treat the DSET surface MVPA files in a group analysis. In volume space, I’ve run my information maps through SPM. <i>At present, I can’t even get these searchlight result files to load in FreeSurfer’s FreeView (even if I convert file formats to something like GII). The blue loading bar just spins and spins until the app crashes. </i></span></li></ul></ul><div><font color="#333333" face="Helvetica Neue, Arial, sans-serif"><span style="line-height:17px;white-space:pre-wrap"><br></span></font></div></div><div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px;white-space:pre-wrap">A very long message I know, but any help would be immensely appreciated. </span><font color="#333333" face="Helvetica Neue, Arial, sans-serif"><span style="line-height:17px;white-space:pre-wrap"><br></span></font></div><div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px;white-space:pre-wrap">Thank you!</span></div><div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px;white-space:pre-wrap">Mike Klein</span></div><div><span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Arial,sans-serif;font-size:13px;line-height:17px;white-space:pre-wrap">MNI, McGill</span></div></div>