<div dir="ltr">Thanks for your patience, nice explanation!<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<br>Qunxi Dong<br></div></div></div>
<br><div class="gmail_quote">2016-08-12 16:10 GMT+02:00 Marijn van Vliet <span dir="ltr">&lt;<a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Qunxi,<div><br></div><div>if I understand correctly, then the permutation cluster tests in MNE may not be suitable for what you want to do. </div><div><br></div><div>Consider this figure:</div><div><a href="http://imgur.com/a/E8ais" target="_blank">http://imgur.com/a/E8ais</a><br></div><div><br></div><div>This is the time course for a single dipole on the brain (simulated data). If I understand your goal correctly, you would like to include this vertex as part of a ROI, because it has increased activity after the stimulus has been shown.</div><div><br></div><div>A cluster test as implemented in MNE would determine whether any post-stimulus samples are higher than pre-stimulus samples <b>in a pairwise fashion</b>. Thus, whether pre-stimulus sample 1 is higher than post-stimulus sample 1, pre-stimulus sample 2 is higher than post-stimulus sample 2, etc.</div><div><br></div><div>What you most likely want instead is estimate some confidence interval for the pre-stimulus values in general (red dashed line in the figure) and then determine, given the post-interval data, whether to include the vertex yes or no. </div><div><br></div><div>It is not surprising that the cluster test marked the entire brain as ROI, because it is very likely for the time course of a vertex to be higher than the pre-stimulus at some point, even if the stimulus didn&#39;t activate the vertex at all (and the pre-stimulus and post-stimulus data were drawn from the same distribution).</div><div><br></div><div>At this point, a thresholding operation that only passes vertices for which the activation surpasses the pre-stimulus activity for a minimum amount of time makes sense. However, you would need to be careful to set it to a sensible value.</div><div><br></div><div>I think you&#39;ll need to implement the procedure to mark the vertices to include yourself. Then, you can use the stc_to_label function to cut it up in spatially connected ROIs.</div><div><br></div><div>At any rate, I think the result of &quot;showing a stimulus activates the entire brain&quot; actually makes sense. Showing a stimulus would do that, although not all parts in the equal amounts.</div><div><br></div><div>That&#39;s all the help I can give you. Good luck with your study. May your p-values be significant! :-)</div><div><br></div><div>Kind regards,</div><div>Marijn.</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 12, 2016 at 2:24 PM 董群喜 &lt;<a href="mailto:dongqunxi@gmail.com" target="_blank">dongqunxi@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Marijin,</div><div><br></div>OK. We have the MEG data related with visual task. By comparing data of  prestimulus and poststimulus, we want to find focal functional labels related with visual cognitive process.<div>And then we want to make network analysis between the identified regions of interest.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<br>Qunxi Dong<br></div></div></div></div><div class="gmail_extra">
<br><div class="gmail_quote">2016-08-12 13:17 GMT+02:00 Marijn van Vliet <span dir="ltr">&lt;<a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">if you threshold the data in the STC, it means you are thresholding based on the length of the cluster in time. So if you threshold by a value of 190, any vertices that survive are significantly different for at least 190 consecutive samples.<div><br></div><div>I&#39;m sorry, but I&#39;m unable to follow your logic.<span> </span><span style="line-height:1.5">What do you mean by *meaningful* ROIs?</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Right now, it sounds to me like: if we manipulate the data so and so we get the picture we want. Now we want a justification for our manipulation. But that is probably not what you meant.</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Maybe I can be of more help if you explain a bit more about your data and what effect you are trying to visualize.</span></div></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 12, 2016 at 1:34 PM 董群喜 &lt;<a href="mailto:dongqunxi@gmail.com" target="_blank">dongqunxi@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Marijin,<div><br></div><div>We prefer to get focal clusters attributed to the stimulus, and if we use 95 percentile as the threshold to shrink the clusters, it can show some</div><div>meaningful ROIs. But we do not know how to explain the threshold (such as 190).</div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<br>Qunxi Dong<br></div></div></div></div><div class="gmail_extra">
<br><div class="gmail_quote">2016-08-12 11:54 GMT+02:00 Marijn van Vliet <span dir="ltr">&lt;<a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well, if the cluster permutation test returns clusters that span the entire brain, then that&#39;s the way it is. The signals are different pre- and post-stimulus all across the brain.</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 12, 2016 at 10:14 AM 董群喜 &lt;<a href="mailto:dongqunxi@gmail.com" target="_blank">dongqunxi@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr" style="font-size:14px">Dear Marijin,<div><br></div><div>Thanks for your response. </div><div>I need to introduce how I use 2sample spatial clustering on our data:</div><div>I make groups of prestimulus data and poststimulus data, and then the comparisons are made</div><div>between the two groups data. I want to identify clusters significant to the stimulus.</div><div>The p_value for f_threshold is 0.001, p_value for comparisons corrected is 0.001.</div><div>I get two significant clusters only, that is one cluster per hemisphere.</div><div>When I ploted as you said, the two clusters nearly cover the whole Brain. For your convenience,</div><div>I provide one STC file for your testing, and the plot of the clusters.  </div></div><div class="gmail_extra" style="font-size:14px"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<br>Qunxi Dong</div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<br>Qunxi Dong<br></div></div></div></div><div class="gmail_extra">
<br><div class="gmail_quote">2016-08-12 8:09 GMT+02:00 董群喜 <span dir="ltr">&lt;<a href="mailto:dongqunxi@gmail.com" target="_blank">dongqunxi@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Marijin,<div><br></div><div>Thanks for your response. </div><div>I need to introduce how I use 2sample spatial clustering on our data:</div><div>I make groups of prestimulus data and poststimulus data, and then the comparisons are made</div><div>between the two groups data. I want to identify clusters significant to the stimulus.</div><div>The p_value for f_threshold is 0.001, p_value for comparisons corrected is 0.001.</div><div>I get two significant clusters only, that is one cluster per hemisphere.</div><div>When I ploted as you said, the two clusters nearly cover the whole Brain. For your convenience,</div><div>I provide one STC file for your testing, and the plot of the clusters.  </div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr">Best wishes,<br>Qunxi Dong<br></div></div></div><div><div>
<br><div class="gmail_quote">2016-08-11 20:05 GMT+02:00 Marijn van Vliet <span dir="ltr">&lt;<a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Qunxi,<br>
<br>
the output of `summarize_clusters_stc’ is a bit poorly documented (I’ve opened a pull request for it to be fixed in future versions of MNE).<br>
<br>
The output is as follows:<br>
<br>
    out : instance of SourceEstimate<br>
        A summary of the clusters. The first time point in this SourceEstimate<br>
        object is the summation of all the clusters. Subsequent time points<br>
        contain each individual cluster. The magniture of the activity<br>
        corresponds to the length the cluster spans in time (in samples).<br>
<br>
So it is perfectly reasonable to create labels from the clusters. However, you do not need to take the mean across the time points or anything like that. Also, thresholding does not do what you want. Instead, this should work:<br>
<br>
stc = summarize_clusters_stc(clu, p_thre, tstep=tstep,<br>
                                                 tmin=tmin, vertices=fsave_vertices,<br>
                                                subject=&#39;fsaverage&#39;)<br>
lh_labels, rh_labels = mne.stc_to_label(stc, src=src, smooth=True,<br>
                                  subjects_dir=subjects_dir, connected=True)<br>
<br>
The labels look bigger than the clusters as visualised with stc.plot(…), because the plotting functions applies its own thesholding. Try to visualise it without any thresholding by doing this:<br>
<br>
b = stc.plot(hemi=‘both’, subject=subject, subject_dir=subject_dir)<br>
b.scale_data_colormap(0, stc.data.mean(), stc.data.max(), True)<br>
<br>
Let me know if you have further questions.<br>
<br>
Marijn.<br>
<br>
--<br>
Marijn van Vliet<br>
<a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a><br>
<div><div><br>
<br>
<br>
<br>
<br>
&gt; On 11 Aug 2016, at 19:09, 董群喜 &lt;<a href="mailto:dongqunxi@gmail.com" target="_blank">dongqunxi@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Dear all,<br>
&gt;<br>
&gt; For you easier understanding my problem, I made a gist and paste the critical codes in the following link:<br>
&gt; <a href="https://gist.github.com/dongqunxi/daca753366c592927ff789c03aa6ed0b" rel="noreferrer" target="_blank">https://gist.github.com/<wbr>dongqunxi/<wbr>daca753366c592927ff789c03aa6ed<wbr>0b</a><br>
&gt; Thanks, looking forward to your response.<br>
&gt;<br>
&gt; Best wishes,<br>
&gt; Qunxi Dong<br>
&gt;<br>
&gt; 2016-08-11 17:52 GMT+02:00 董群喜 &lt;<a href="mailto:dongqunxi@gmail.com" target="_blank">dongqunxi@gmail.com</a>&gt;:<br>
&gt; Dear All,<br>
&gt;<br>
&gt; Recently, I am trying to make functional labels from a group of subjects.<br>
&gt; I first refer the 2sample clustering scripts. I get some significant clusters and derive the source estimates.<br>
&gt; if I apply &#39;stc_to_label&#39; to make functional labels directly, the size of the functional labels is too large.<br>
&gt; I also try to use percentile of 95 to restrict the size, but I can not explain what the actual meaning<br>
&gt; of this threshold.<br>
&gt; Can someone give me some tips?<br>
&gt; Thanks a lot!<br>
&gt;<br>
&gt; Best wishes,<br>
&gt; Qunxi Dong<br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; Mne_analysis mailing list<br>
&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
&gt;<br>
&gt;<br>
&gt; The information in this e-mail is intended only for the person to whom it is<br>
&gt; addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
&gt; contains patient information, please contact the Partners Compliance HelpLine at<br>
&gt; <a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
&gt; but does not contain patient information, please contact the sender and properly<br>
&gt; dispose of the e-mail.<br>
<br>
<br>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
</blockquote></div></div></div><span><font color="#888888"><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>--</div>Marijn van Vliet<div><br><div><a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a></div><div><a href="mailto:marijn.vanvliet@aalto.fi" target="_blank">marijn.vanvliet@aalto.fi</a></div></div></div></div>
</font></span><br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>--</div>Marijn van Vliet<div><br><div><a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a></div><div><a href="mailto:marijn.vanvliet@aalto.fi" target="_blank">marijn.vanvliet@aalto.fi</a></div></div></div></div>
</div></div><br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>--</div>Marijn van Vliet<div><br><div><a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a></div><div><a href="mailto:marijn.vanvliet@aalto.fi" target="_blank">marijn.vanvliet@aalto.fi</a></div></div></div></div>
</div></div><br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>