help > Masking
Showing 1-10 of 10 posts
Display:
Results per page:
Jul 21, 2014  11:07 AM | Julia Landsiedel - University of Kent
Masking
Dear all & Alfonso,

I have a question whether it would be possible to include the following feature in a new release of the toolbox:

Is it possible and also valid to mask second level results just as in SPM? I mean, for example I first identify the default mode network, then save a binary mask of the clusters and then mask another contrast, e.g. looking at the effect of a covariate with this binary mask.

Thanks a lot.

Best,
Julia
Jul 22, 2014  04:07 AM | Alfonso Nieto-Castanon - Boston University
RE: Masking
Dear Julia,

That is a good idea. I will see if we can add masking and the associated small volume correction to the second-level analysis options. In the meantime there are two possibilities for you to run these analyses. Both start by creating a mask in your 'default mode network' analyses with the supra-threshold results (just click on 'export mask' on the corresponding CONN 'seed-to-voxel results explorer' analyses). After this you could:

1) In SPM 'Results' load the SPM.mat file generated by CONN for your "new covariate" analysis, and when prompted click on the 'apply masking: image' option and select the previously generated mask file. That will compute your seed-to-voxel analyses for your "new covariate" effects reduced to only 'default mode network' areas.

2) Launch REX (just type rex in Matlab command window). On 'Sources' select the "new covariate" analysis SPM.mat file. On 'ROIs' select the previously-generated mask file. Then select the option 'Cluster-level' (to perform the analyses separately for each "default mode network" cluster), and click on 'Extract' and (when the first step finishes) on 'Results'. That will perform ROI-level analyses for your "new covariate" effects, using as ROIs each of the individual clusters that appeared in your original "default mode network" analyses. 

Last, regarding the 'validity' of this sort of analyses, as long as your original analysis (the 'default mode network' contrast) and your second analyses (the "new covariate" effects) are orthogonal/independent this sort of analyses are perfectly valid. If they are not, then these analyses may include selection biases and are to be considered with care.

Hope this helps
Alfonso

Originally posted by Julia Landsiedel:
Dear all & Alfonso,

I have a question whether it would be possible to include the following feature in a new release of the toolbox:

Is it possible and also valid to mask second level results just as in SPM? I mean, for example I first identify the default mode network, then save a binary mask of the clusters and then mask another contrast, e.g. looking at the effect of a covariate with this binary mask.

Thanks a lot.

Best,
Julia
Jul 22, 2014  07:07 AM | Julia Landsiedel - University of Kent
RE: Masking
Dear Alfonso,

Thank you for your quick reply and the detailed explanation. 

Regarding the usage of REX I encountered the problem that if I start it from the command line that it gives error message when I want to save the output data, presumably because it does not have an output folder defined (and doesn't use the current folder either). This is no problem if I start REX from the seed-to voxel explorer with 'Explore Clusters'

This would be the error message:

Reference to non-existent field 'output_folder'.
Error in rex>rex_do (line 789)
name_dat=fullfile(params.output_folder,[ROInames{rr},'.rex.data.mat']);
Error in rex>rex_gui (line 444)
[data.params.ROIdata,data.params.ROInames,data.params.ROIinfo.basis,data.params.ROIinfo.voxels,data.params.ROIinfo.files,data.params.ROIinfo.select,data.params.ROIinfo.trans]=rex_do(data,~dat
Error while evaluating uicontrol Callback

*****
Besides just three quick follow up questions.

1) I create my DMN mask based on the results of the whole sample. Do I have to orthogonalize my covariate in the Setup.2nd level covariates tab two the 'All' covariate or does this already avoid the circularity problem?

2) After masking is it 'allowed' to use lower height and extend thresholds? Do you have any recommendation for this?

3) With REX, I did not extract the data with the default mode network (DMN) mask but with a mask of only the significant clusters from my DMN-masked covariate analysis in SPM. Would this bias my results?

Best,
Julia
Jul 29, 2014  02:07 AM | Alfonso Nieto-Castanon - Boston University
RE: Masking
Dear Julia,

First regarding the error message thanks for reporting this, this was actually a bug in rex and I have fixed that for the next release of the toolbox (in the meantime I am attaching a patch for version CONN14i, simply copy the attached file in your conn distribution folder overwriting the file with the same name there). 

Regarding question (1), it is not necessary to orthogonalize your covariate to the 'All' covariate (the results will be identical whether you do or not), and your regression analyses looking at the effect of your covariate are always considered orthogonal to the whole sample average effects, so you do not have any circularity issues there.

Regarding question (2), rather than simply using more liberal thresholds for your new/limited search volume, the more appropriate way to do this would be to use 'SVC' (small volume correction) and selecting your mask image there to obtain statistics that already take into account this smaller search volume (e.g. DMN areas) when applying the corresponding multiple-comparison corrections (e.g. FWE- p-values)

Regarding question (3), if you extract your data from regions that have been defined by the same (or a non-orthogonal) contrast that you are then trying to evaluate (and from your description I take that this was the case here), then yes, you will have a circularity issue there, and you may assume that the resulting measures will be biased (overestimating effect sizes, under-estimating p-values, etc.) Some times you wish to do just that, for example as a descriptive post hoc analysis, and that is perfectly fine (you just need to acknowledge the limitations and potential biases of the resulting measures, and do not use these tests as any form of confirmatory analyses). If your goal, on the other hand, is to obtain accurate effect-size measures within your regions of interest then I would probably suggest using a cross-validation approach to do this. 

Hope this helps
Alfonso



Originally posted by Julia Landsiedel:
Dear Alfonso,

Thank you for your quick reply and the detailed explanation. 

Regarding the usage of REX I encountered the problem that if I start it from the command line that it gives error message when I want to save the output data, presumably because it does not have an output folder defined (and doesn't use the current folder either). This is no problem if I start REX from the seed-to voxel explorer with 'Explore Clusters'

This would be the error message:

Reference to non-existent field 'output_folder'.
Error in rex>rex_do (line 789)
name_dat=fullfile(params.output_folder,[ROInames{rr},'.rex.data.mat']);
Error in rex>rex_gui (line 444)
[data.params.ROIdata,data.params.ROInames,data.params.ROIinfo.basis,data.params.ROIinfo.voxels,data.params.ROIinfo.files,data.params.ROIinfo.select,data.params.ROIinfo.trans]=rex_do(data,~dat
Error while evaluating uicontrol Callback

*****
Besides just three quick follow up questions.

1) I create my DMN mask based on the results of the whole sample. Do I have to orthogonalize my covariate in the Setup.2nd level covariates tab two the 'All' covariate or does this already avoid the circularity problem?

2) After masking is it 'allowed' to use lower height and extend thresholds? Do you have any recommendation for this?

3) With REX, I did not extract the data with the default mode network (DMN) mask but with a mask of only the significant clusters from my DMN-masked covariate analysis in SPM. Would this bias my results?

Best,
Julia
Attachment: rex.m
Jul 30, 2014  07:07 AM | Julia Landsiedel - University of Kent
RE: Masking
Dear Alfonso,

Thanks a lot for these helpful explanations! 

Best,
Julia
Aug 1, 2014  03:08 PM | Yifei Zhang
RE: Masking
Dear all,

I want to use the DMN mask (already generated) to mask the AAL atlas in the first-level analysis, i.e., using the AAL ROIs that only within the DMN mask, and get the connectivity matrix based on this.

Since the analysis mask in SETUP->Options is only valid for voxel analysis and using this DMN mask as grey matter mask in SETUP->ROIS may cause an impact on the analysis. What is a better way to do this analysis?

In addition, When visualizing the connectivity matrix, how to order the ROIs for checking clustered ROIs (network component)?

Any help would be appreciated!

Best regards,
Yifei Zhang
Aug 5, 2014  09:08 AM | Yifei Zhang
RE: Masking
Dear Alfonso,

I generated the .nii file of AAL ROIs by masking with the binary DMN in FSL, now I can input it into conn as ROI, the question is, I don't know how to make a proper .txt file listing the new ROIs' names. The new AAL_DMN file includes the same intensities for each 116 ROI as the AAL.nii provided in conn, but less than (only 29 clusters) it. If I use the original AAL.txt, conn couldn't recognise it. I am wondering is that possible to let conn find the ROI name in the original AAL.txt file by reading the same line of the number of density in the masked image? 

Thank you very much!

Best regards,
Yifei
Originally posted by Yifei Zhang:
Dear all,

I want to use the DMN mask (already generated) to mask the AAL atlas in the first-level analysis, i.e., using the AAL ROIs that only within the DMN mask, and get the connectivity matrix based on this.

Since the analysis mask in SETUP->Options is only valid for voxel analysis and using this DMN mask as grey matter mask in SETUP->ROIS may cause an impact on the analysis. What is a better way to do this analysis?

In addition, When visualizing the connectivity matrix, how to order the ROIs for checking clustered ROIs (network component)?

Any help would be appreciated!

Best regards,
Yifei Zhang
Aug 6, 2014  07:08 AM | Alfonso Nieto-Castanon - Boston University
RE: Masking
Hi Yifei,

The issue there is that, when defining a .txt labels file which includes only the ROI labels (like the original aal.txt file), CONN expects those N labels to match an ROI file with exactly N values (from 1 to N). In any way, there are a couple of other formats that CONN will interpret correctly where you can specify the values-labels association a bit more freely:

1) create a .txt file that contains two space-separated fields, the first is the ROI number and the second the ROI name (without spaces); so something along the lines of:

     19 Supp_Motor_Area_(L)
     20 Supp_Motor_Area_(R)
     57 Postcentral_(L)
     58 Postcentral_(R)
     ...

2) create a .csv file that contains two comma-separated fields, the first is the ROI name (without commas) and the second the ROI number; so something along the lines of:

     Supp Motor Area (L), 19
     Supp Motor Area (R) , 20

     Postcentral (L), 57
     Postcentral (R), 58
     ...

For any of these formats you may include in the .txt or .csv file as many ROI label-value pairs as you wish (they do not need to be limited only to the values present in your ROI file)

Hope this helps
Alfonso



Originally posted by Yifei Zhang:
Dear Alfonso,

I generated the .nii file of AAL ROIs by masking with the binary DMN in FSL, now I can input it into conn as ROI, the question is, I don't know how to make a proper .txt file listing the new ROIs' names. The new AAL_DMN file includes the same intensities for each 116 ROI as the AAL.nii provided in conn, but less than (only 29 clusters) it. If I use the original AAL.txt, conn couldn't recognise it. I am wondering is that possible to let conn find the ROI name in the original AAL.txt file by reading the same line of the number of density in the masked image? 

Thank you very much!

Best regards,
Yifei
Originally posted by Yifei Zhang:
Dear all,

I want to use the DMN mask (already generated) to mask the AAL atlas in the first-level analysis, i.e., using the AAL ROIs that only within the DMN mask, and get the connectivity matrix based on this.

Since the analysis mask in SETUP->Options is only valid for voxel analysis and using this DMN mask as grey matter mask in SETUP->ROIS may cause an impact on the analysis. What is a better way to do this analysis?

In addition, When visualizing the connectivity matrix, how to order the ROIs for checking clustered ROIs (network component)?

Any help would be appreciated!

Best regards,
Yifei Zhang
Jul 10, 2020  04:07 PM | Mayron Pereira Picolo Ribeiro
RE: Masking
Hi Alfonso,

I was wondering if this has been added to any later version of CONN

Thanks
Mayron
Originally posted by Alfonso Nieto-Castanon:
Dear Julia,

That is a good idea. I will see if we can add masking and the associated small volume correction to the second-level analysis options. In the meantime there are two possibilities for you to run these analyses. Both start by creating a mask in your 'default mode network' analyses with the supra-threshold results (just click on 'export mask' on the corresponding CONN 'seed-to-voxel results explorer' analyses). After this you could:

1) In SPM 'Results' load the SPM.mat file generated by CONN for your "new covariate" analysis, and when prompted click on the 'apply masking: image' option and select the previously generated mask file. That will compute your seed-to-voxel analyses for your "new covariate" effects reduced to only 'default mode network' areas.

2) Launch REX (just type rex in Matlab command window). On 'Sources' select the "new covariate" analysis SPM.mat file. On 'ROIs' select the previously-generated mask file. Then select the option 'Cluster-level' (to perform the analyses separately for each "default mode network" cluster), and click on 'Extract' and (when the first step finishes) on 'Results'. That will perform ROI-level analyses for your "new covariate" effects, using as ROIs each of the individual clusters that appeared in your original "default mode network" analyses. 

Last, regarding the 'validity' of this sort of analyses, as long as your original analysis (the 'default mode network' contrast) and your second analyses (the "new covariate" effects) are orthogonal/independent this sort of analyses are perfectly valid. If they are not, then these analyses may include selection biases and are to be considered with care.

Hope this helps
Alfonso

Originally posted by Julia Landsiedel:
Dear all & Alfonso,

I have a question whether it would be possible to include the following feature in a new release of the toolbox:

Is it possible and also valid to mask second level results just as in SPM? I mean, for example I first identify the default mode network, then save a binary mask of the clusters and then mask another contrast, e.g. looking at the effect of a covariate with this binary mask.

Thanks a lot.

Best,
Julia
Sep 5, 2023  11:09 PM | Kaitlin Cassady - University of Michigan - Ann Arbor
RE: Masking

Hi!


 


I wanted to follow up on this message from 2014 to see if it's now possible in CONN to add masking and the associated small volume correction in the second-level analysis (without using the SPM option).


 


Thank you!