Skip to content

Latest commit

 

History

History
21 lines (20 loc) · 4.04 KB

HowTo_2nd.md

File metadata and controls

21 lines (20 loc) · 4.04 KB

GUI directions for Bayesian second-level analysis (Tutorial)

  1. Download all files and sub-folders in "https://github.com/hyemin-han/BayesFactorFMRI/tree/master/V1.0.0 (codes)" and "https://github.com/hyemin-han/BayesFactorFMRI/tree/master/Correction (tutorial data files)"
  2. "python bayes_select_ui.py" in the directory where BayesFMRI codes are downloaded to start the GUI.
  3. Select "Bayesian correction"

3. Select a working directory. All files needed for analysis will be copied to hear, so if needed, create an empty new directory and select it.

4. Select contrast image files to be analyzed. For this tutorial, select sixteen nii files, 1.nii-16.nii, except mask.nii. These nii files are available in the directory containing downloaded tutorial data files.

5. Select a mask image file that designates which voxels should be analyzed. This mask file only consists of 1 vs. 0 or NaN. Only voxels specified with 1 are analyzed by BayesFMRI. A mask file can be created by performing first-order fMRI analysis with widely-used tools, e.g., SPM, AFNI, FSL. For this tutorial, select mask.nii. This nii files are available in the directory containing downloaded tutorial data files.

6. Enter how many processors shall be used for analysis. For example, if "4" is entered, Bayesian second-level analysis will be performed with four processors.

7. Specify which constrast shall be analyzed. For instance, "Contrast > 0" means that BayesFMRI shall test whether the effect size value in each voxel is greater than zero. On the other hand, if "Contrast < 0" is selected, whether the effect size value is smaller than zero is tested. For this tutorial, select "Contrast > 0."

8. Decide how "run_this.py" is executed. If "End now" is selected, BayesFMRI ends and then users should run "run_this.py" manually. It allows them to upload files to a cluster so that analysis is performed with a high-performance computing system. If "Run on local" is selected, "run_this.py" is executed automatically on local. If users have sufficient number of processors on local, "Run on local" can be selected. If not, "End now" is recommended.

9. One the GUI is closed (and "End now" is selected), all files that are required to perform analysis, i.e., required Python and R codes, config files, contrast image files, mask image file, run_this.py, are copied to the working directory designated in 3. If users intend to perform analysis on a cluster, upload all files to the cluster. If "End now" is selected, run "python run_this.py," in the working directory to start analysis.

10. Once analysis is completed, in the case of Bayesian second-level analysis, two output files are created. “BFs.nii” reports the resultant Bayes Factor value in each voxel and “Ds.nii” reports the median effect size value in Cohen’s D in each voxel. For hypothesis testing (e.g., whether a significant non-zero effect exists in a voxel), users can open “BFs.nii” with a NIfTI viewer, such as xjView with MATLAB, and perform thresholding (e.g., Bayes Factor ≥ 3).