[Mne_analysis] Spatiotemporal cluster test in a subset of vertices

Denis A. Engemann denis.engemann at gmail.com
Wed Nov 5 18:52:01 EST 2014
Search archives:

Hi list,

What about doing group analysis on a smaller source space. e.g. Morphing to a particular subject and using fsaverage to display results?

-- Denis

> On 05 Nov 2014, at 23:44, Eric Larson <larson.eric.d at gmail.com> wrote:
> 
> Just sub-selecting vertices by excluding some proportion of them (even if evenly spatially sampled) will distort the signals that you're representing a bit. It would be better to build another, smaller source space, and morph from the full one to the smaller one, as the morphing procedure is designed to preserve the overall activation levels. But I would try to avoid doing this, as you may lose some effective spatial resolution.
> 
> Eric
> 
> 
>> On Wed, Nov 5, 2014 at 2:11 PM, Stillerman, Benjamin <BSTILLERMAN at partners.org> wrote:
>> Hi,
>> 
>> Is there a way to use spatial_exclude to "downsample" the number of vertices? That is, I'd like to run spatiotemporal cluster stats across the whole brain (not using an ROI) but use fewer than 20484 vertices. If I simply drop every other vertex, for example, will that retain an even spacing of vertices?
>> 
>> Thanks,
>> Ben
>> 
>>> On Aug 18, 2014, at 10:46 AM, Denis A. Engemann <denis.engemann at gmail.com> wrote:
>>> 
>>> make sure to get all mappings right which are involved
>>> 
>>> 1) hemisphere vertices to whole brain indices (e.g. for ico5 / fsaverage the left hemisphere indices go up to 10241 and the right ones up to 20483, nevertheless vertices don't go beyond 10242.
>>> 
>>> 2) all label vertices and the vertices used by the source space
>>> 
>>> use label.get_vertices_used to be sure
>>> 
>>> Importantly, the clustering test expects indices related to the data passed.
>>> 
>>> -Denis
>>> 
>>> On 18 Aug 2014, at 13:52, Tal Linzen <tal.linzen at gmail.com> wrote:
>>> 
>>>> Thanks for your replies. Is this the right way to use spatial_exclude? I think I might be missing something, because the clusters are kind of in the ROI I would want them to be in but also spill out of the ROI:
>>>> 
>>>>         vertices = np.arange(5124)
>>>>         excluded_vertices = vertices[~np.in1d(vertices, label.vertices)]
>>>>         tris = mne.source_estimate.grade_to_tris(4)
>>>>         connectivity = mne.source_estimate.spatial_tris_connectivity(tris)
>>>>         clu = mne.stats.spatio_temporal_cluster_1samp_test(
>>>>             data, connectivity=connectivity, n_jobs=2,
>>>>             n_permutations=n_permutations, threshold=t_threshold,
>>>>             spatial_exclude=excluded_vertices)
>>>> 
>>>> Does anything jump out at you? Otherwise I can put my data somewhere online and we can take a look together.
>>>> 
>>>> Thanks!
>>>> 
>>>> Tal
>>>> 
>>>> 
>>>>> On Tue, Aug 12, 2014 at 7:55 AM, Denis-Alexander Engemann <denis.engemann at gmail.com> wrote:
>>>>> Hi Tal,
>>>>> 
>>>>> also have a look at this example (in combination wtih #1503):
>>>>> 
>>>>> https://gist.github.com/dengemann/ea482183be869568412c
>>>>> 
>>>>> Denis
>>>>> 
>>>>> 
>>>>>> On Tue, Aug 12, 2014 at 1:16 AM, Eric Larson <larson.eric.d at gmail.com> wrote:
>>>>>> For now, you can use the `spatial_exclude` parameter of the clustering functions to exclude all the source space vertices outside your label:
>>>>>> 
>>>>>> http://martinos.org/mne/stable/generated/mne.stats.spatio_temporal_cluster_1samp_test.html#mne.stats.spatio_temporal_cluster_1samp_test
>>>>>> 
>>>>>> Denis also has some work going to make it easier:
>>>>>> 
>>>>>> https://github.com/mne-tools/mne-python/pull/1503
>>>>>> 
>>>>>> Eric
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Mon, Aug 11, 2014 at 4:05 PM, Tal Linzen <tal.linzen at gmail.com> wrote:
>>>>>>> Hi all,
>>>>>>> 
>>>>>>> How do I restrict the spatiotemporal cluster test to a label? I've been trying to work off of this example:
>>>>>>> 
>>>>>>> http://martinos.org/mne/stable/auto_examples/stats/plot_cluster_stats_spatio_temporal.html
>>>>>>> 
>>>>>>> And zeroed in on the following line as the line I'd probably want to modify:
>>>>>>> 
>>>>>>> connectivity = spatial_tris_connectivity(grade_to_tris(5))
>>>>>>> 
>>>>>>> But this is pretty opaque to me and I'm not sure what the next step would be.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Tal
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> Mne_analysis mailing list
>>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>> 
>>>>>>> 
>>>>>>> The information in this e-mail is intended only for the person to whom it is
>>>>>>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>>>>>>> contains patient information, please contact the Partners Compliance HelpLine at
>>>>>>> http://www.partners.org/complianceline . If the e-mail was sent to you in error
>>>>>>> but does not contain patient information, please contact the sender and properly
>>>>>>> dispose of the e-mail.
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Mne_analysis mailing list
>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>> 
>>>>>> 
>>>>>> The information in this e-mail is intended only for the person to whom it is
>>>>>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>>>>>> contains patient information, please contact the Partners Compliance HelpLine at
>>>>>> http://www.partners.org/complianceline . If the e-mail was sent to you in error
>>>>>> but does not contain patient information, please contact the sender and properly
>>>>>> dispose of the e-mail.
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Mne_analysis mailing list
>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>> 
>>>>> 
>>>>> The information in this e-mail is intended only for the person to whom it is
>>>>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>>>>> contains patient information, please contact the Partners Compliance HelpLine at
>>>>> http://www.partners.org/complianceline . If the e-mail was sent to you in error
>>>>> but does not contain patient information, please contact the sender and properly
>>>>> dispose of the e-mail.
>>>> _______________________________________________
>>>> Mne_analysis mailing list
>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>> 
>>>> 
>>>> The information in this e-mail is intended only for the person to whom it is
>>>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>>>> contains patient information, please contact the Partners Compliance HelpLine at
>>>> http://www.partners.org/complianceline . If the e-mail was sent to you in error
>>>> but does not contain patient information, please contact the sender and properly
>>>> dispose of the e-mail.
>> 
>> 
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> 
>> 
>> The information in this e-mail is intended only for the person to whom it is
>> addressed. If you believe this e-mail was sent to you in error and the e-mail
>> contains patient information, please contact the Partners Compliance HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in error
>> but does not contain patient information, please contact the sender and properly
>> dispose of the e-mail.
> 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141106/480720d0/attachment.html 


More information about the Mne_analysis mailing list