I’m using AFNI/FreeSurfer/SUMA tool chain, and CoSMoMVPA matlab package to do surface-based MVPA, and encountered a few problems. Any help would be highly appreciated.
According to the CoSMoMVPA demo, its surface-based searchlight routine seems to require merged hemisphere (mh, as opposed to lh+rh) format of the FS surface (in *.asc file). However, @SUMA_Make_Spec_FS generates separated (lh+rh) files. I used the following pseudo matlab code to merge the two:
[left_verts, left_faces] = read_asc(‘lh.asc’);
[right_verts, right_faces] = read_asc(‘rh.asc’);
right_faces(:,1:3) = right_faces(:,1:3) + size(left_verts,1);
write_asc(‘mh.asc’, [left_verts; right_verts], [left_faces; right_faces]);
It seemed to work (but is it the correct way to do this?). But when I visualize the merged surfaces, I realized that the spatial location of the vertices from the two hemispheres in volumetric space are overlaped. Is that OK? Specifically, will that affect neighborhood definition or multiple comparison correction?
After I got the surface-based searchlight result with CoSMoMVPA in a *.niml.dset file, which contains the results for both hemispheres, I tried to load and visualize it with SUMA. However, with SUMA object controller, I could load the dset onto only one of the two hemispheres (either left or right, but not both). When I loaded the same dset to the second hemisphere, SUMA complained and failed.
Is there a way to visualize merged hemisphere dset with SUMA?
I’m the main author of CoSMoMVPA. Hopefully my responses below are helpful.
herrlich10 Wrote:
I’m using AFNI/FreeSurfer/SUMA tool chain, and
CoSMoMVPA matlab package to do surface-based MVPA,
and encountered a few problems. Any help would be
highly appreciated.
According to the CoSMoMVPA demo, its
surface-based searchlight routine seems to require
merged hemisphere (mh, as opposed to lh+rh) format
of the FS surface (in *.asc file). However, @SUMA_Make_Spec_FS generates separated (lh+rh)
files. I used the following pseudo matlab code to
merge the two:
[left_verts, left_faces] =
s] = read_asc(‘lh.asc’);
[right_verts, right_faces] =
s] = read_asc(‘rh.asc’);
right_faces(:,1:3) = right_faces(:,1:3) +
size(left_verts,1);
write_asc(‘mh.asc’, [left_verts; right_verts],
ts], [left_faces; right_faces]);
It seemed to work (but is it the correct way to do
this?).
Yes, that should be fine.
But when I visualize the merged surfaces,
I realized that the spatial location of the
vertices from the two hemispheres in volumetric
space are overlaped. Is that OK?
You can add an offset to the coordinates, for example to the first column in left_verts and right_verts to add or subtract some value from the x coordinate.
Specifically,
will that affect neighborhood definition or
multiple comparison correction?
It should not really, as neighborhoods are defined through the faces. So even if surfaces from two hemispheres overlap spatially, there are no two nodes with one in each hemisphere that are neighbors.
After I got the surface-based searchlight
result with CoSMoMVPA in a *.niml.dset file, which
contains the results for both hemispheres, I tried
to load and visualize it with SUMA. However, with
SUMA object controller, I could load the dset onto
only one of the two hemispheres (either left or
right, but not both). When I loaded the same dset
to the second hemisphere, SUMA complained and
failed.
Is there a way to visualize merged hemisphere dset
with SUMA?
It should work fine to load the merged hemisphere directly (i.e. using an mh.asc file as you defined earlier). It may require a custom .spec file that points to the merged hemisphere files, not left or right hemispheres. How does SUMA complain?
As a side note: PyMVPA’s pymvpa2-prep-afni-surf is a script that helps with merging hemispheres, writing spec files, and more. It takes as input the result from FreeSurfer’s recon-all. See http://www.pymvpa.org/generated/cmd_prep-afni-surf.html for details.
I have the same problem. I did a surface-based searchlight in CoSMoMVPA [1]. The result is a niml.dset file for both hemispheres (ld 141). I tried to map the result on suma_TT_N27 [2] using the following command:
suma -spec std.141.MNI_N27_both.spec -sv mni305.nii -input searchlight.niml.dset
But I got the following error message:
– Error SUMA_OKassign (SUMA_Color.c:10134):
Node index range outside
0 and SO->N_Node
++ Notice SUMA_LoadDsetOntoSO_eng (SUMA_Color.c:10312 @21:59:05):
Could not assign dset to SO.
Trying to assign to domain parent.
– Error SUMA_OKassign (SUMA_Color.c:10134):
Node index range outside
0 and SO->N_Node
– Error SUMA_LoadDsetOntoSO_eng (SUMA_Color.c:10315):
Cannot assign dset to SO
or its local domain parent
– Error suma (SUMA_suma.c:1161):
Failed to load searchligh.niml.dset onto std.141.lh.smoothwm.gii
I think the problem is that there is no std.141.both.smoothwm.gii in suma_TT_N27.
I think I should split searchlight.niml.dset to the left and right hemispheres but I don’t know how to do it!
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.