MRI Cohort

GUIMRICohort is a graphical user interface that allows the user to create an MRI cohort by adding individual subjects or by importing groups of subjects from data files in xls, txt, or xlm format. The user can also edit the data and anagraphic details of the subjects, as well as create groups of subjects. Furthermore, GUIMRICohort provides numerous options to visualize the data relative to individual subjects, groups, and comparisons between groups. The MRI cohort can be saved in a file *.mc for future use within BRAPH; it also can be exported in xml format for use within other programs.

Figure 1: Screenshot of GUIMRICohort. On the top there are the menu and the toolbar; below there are a brain atlas panel (on the top left), a group panel (on the bottom left), and a main panel (right) in which subject data can be visualized.
Figure 1: Screenshot of GUIMRICohort. On the top there are the menu and the toolbar; below there are a brain atlas panel (on the top left), a group panel (on the bottom left), and a main panel (right) in which subject data can be visualized.

The layout of GUIMRICohort is shown in figure 1. It is composed of five main work areas:

  • Menu permits one to access the basic functionalities of GUIMRICohort, including loading, saving, editing, and visualizing an MRI cohort, as well as creating a new MRI graph analysis.
  • Toolbar gives direct access to some of the most commonly employed functionalities, in particular loading and saving an MRI cohort, as well as visualizing the data corresponding to individual subjects, to groups, and to comparisons between groups.
  • Brain atlas panel permits one to select a brain atlas for the MRI cohort or, if a brain atlas has already been selected, to view the brain atlas properties in GUIBrainAtlas.
  • Group panel shows the subject groups and their properties in a table. Permits one to select, add, remove, move, and edit the existing groups, and to create new groups from the existing ones.
  • Main panel consists of four tabs: Groups & Demographics to visualize the group data; Subject Data to edit the subjects’ data; Group Averages to calculate the averages and standard deviations of the group data; and Brain View to visualize the data on a brain surface (this brain image can be exported as a MatLab figure).

Example data and a tutorial video can be found on http://braph.org/braph-1-0/videos/mri/mri-cohort/

Getting Started

As a first example of the use of GUIMRICohort, we will proceed to import the brain atlas my_atlas.atlas. Then, we will proceed to import two groups of subjects from the Excel files gr1_MRI.xlsx and gr2_MRI.xlsx, and to calculate a comparison between the data. Finally, we will save the MRI cohort in a *.mc file.

  1. Push Select Atlas to select a brain atlas as shown in figure 2.  The atlas must be in *.atlas format. After you select the file, the brain atlas panel is updated to show the properties of the atlas. The select button is changed to View Atlas; pushing this button opens the uploaded atlas in GUIBrainAtlas with restricted access (i.e. no further changes to the atlas are allowed).
    Figure 2: Importing a brain atlas from a \emph{*.atlas} file into GUIMRICohort.
    Figure 2: Importing a brain atlas from a *.atlas file into GUIMRICohort.
  2. Push Load subject group from xls … to add a group from an xls file. Locate and choose the file gr1_MRI.xlsx. After the file is selected, the group panel is updated to show to group’s properties: the group name (editable), the number of subjects, and the notes (editable). The main panel is updated to show the subject data tab, as shown in figure 3.
    Figure 3: Importing a group of subjects from an xls file into GUIMRICohort.
    Figure 3: Importing a group of subjects from an xls file into GUIMRICohort.

    A series of options are available to create new groups from the existing ones. They are accessible both through the buttons at the bottom of the group panel and through the menu. These are:

    • Add adds new group at the bottom of the list.
    • Remove removes the selected group.
    • Move up moves the selected group up by one place.
    • Move down moves the selected group down by one place.
    • Invert creates a new group from the subjects not belonging to the group selected in the neighboring popup menu.
    • Merge creates a new group by merging the subjects participating to the two groups currently selected in the neighboring popup menus.
    • Intersect creates a new group by selecting the subjects participating to both groups selected in the neighboring popup menus.
  3. Repeat step 2 selecting the file gr2_MRI.xlsx to import also this group of subjects. The main panel shows all subjects in the MRI cohort. If you select a group in the group panel, the main panel will show only the subject data corresponding to that group.
  4. Push Group Averages in the main panel to visualize the average and standard deviation of the data corresponding to each brain region for each group. Choose two groups from the popup menus at the bottom of the main view and compare their data by pushing Comparison next to the popup menus. This performs a permutation test (the number of permutations can be entered in the neighboring edit box; the default number is 1000) that provides the significance of the difference by calculating single-tailed and double-tailed p-values. Figure 4 shows these values for the comparison between the groups gr1_MRI and gr2_MRI.
    Figure 4: The group averages tab in the main panel shows the average and standard deviation for the data corresponding to each brain region for each group. Pushing \fbox{\texttt{Comparison}} also the differences between two groups can be visualized, together with their statistical significance calculated with a permutation test (in the screenshot 1000 permutations are used) in terms of single-tailed and double-tailed p-values.
    Figure 4: The group averages tab in the main panel shows the average and standard deviation for the data corresponding to each brain region for each group. Pushing Comparison also the differences between two groups can be visualized, together with their statistical significance calculated with a permutation test (in the screenshot 1000 permutations are used) in terms of single-tailed and double-tailed p-values.
  5. Select File \rightarrow Save to save the MRI cohort as a *.mc file; alternatively you can also use the shortcut Ctrl+S or the Save icon on the toolbar.
  6. Select File \rightarrow Open to open an MRI cohort previously saved with GUIMRICohort; alternatively you can also use the shortcut Ctrl+O or the Open icon on the toolbar.

 

Additional information

File formats that can be imported

To create an MRI cohort, you need a brain atlas and the data corresponding to the groups of subjects. A brain atlas can be imported only if previously saved as a *.atlas file (e.g. by using GUIBrainAtlas). Groups of subjects can be imported from Excel (*.xls or *.xlsx), text (*.txt), or xml (*.xml) files only if these files are in the correct format. For examples, see the files gr1_MRI.xlsx, gr1_MRI.txt, and gr1_MRI.xml.

In order to be imported correctly the Excel file should have the format shown in figure 5. It must include only one sheet. The first row must include the names of the brain regions consistent with the uploaded brain atlas starting from cell B1. Each of the following rows (e.g. row 2) must contain the IDs of a subject in the first cell (e.g. A2) and the numerical information for each brain region in the subsequent cells (e.g. B2, C2, D2, …).

Figure 5: Format required for the the Excel file containing the data of a group of subjects to be imported correctly.
Figure 5: Format required for the the Excel file containing the data of a group of subjects to be imported correctly.

The format for the text file is essentially the same, including a first column with the subjects’ ID codes, first row with the names of the brain regions, and the following rows with the corresponding data about the brain regions (see gr1_MRI.txt).

The xml format is slightly more complex, but can be easily inferred from the sample file gr1_MRI.xml.

Main panel

The main panel permits one to explore the data of the subjects. There is a series of four console buttons at the top that can be used to switch between various tabs. The following information can be displayed:

Figure 6: The groups & demographics tab of the main panel shows the profiles of the subjects. It permits one to alter the composition of the groups, to manipulate the demographic information regarding the subjects, to remove subjects, and to add new subjects.
Figure 6: The groups & demographics tab of the main panel shows the profiles of the subjects. It permits one to alter the composition of the groups, to manipulate the demographic information regarding the subjects, to remove subjects, and to add new subjects.
  • Groups & Demographics shows the profiles of the subjects (see figure 6). It is possible to change the age, gender, and notes of the subjects. The composition of the groups can be altered by checking the appropriate checkboxes corresponding to each group. The buttons at the bottom allow various options for the user to manipulate, remove, and add subjects:

Select all selects all the subjects.
Clear selection clears the current selection.
Add subject adds a subject at the end of the table.
Add above adds subjects above the selected ones.
Add below adds subjects below the selected ones.
Remove removes the selected subjects.
Move up moves the selected subjects up by one place.
Move down moves the selected subjects down by one place.
Move to top moves the selected subjects to the top of the table.
Move to bottom moves the selected subjects to the bottom of the table.
New group from selection creates a new group from the selected subjects. Subjects can be selected by clicking the checkboxes next to them on the left side.

When a new subject is added (see, e.g., subject 101 in figure 6), it is assigned some default code (‘subject code’), age (‘1′), gender (`not assigned’), and notes (`…’), it is not included in any group, and its data is set to zero for all brain regions. The subject properties can be edited by clicking on them in the table and subjects can be assigned to groups by clicking on the corresponding checkboxes.[1] This new subject has been added at the end of the table; to add it at a different position in the table, select a subject and push Add below or Add above.

Figure 7: The subject data tab of the main panel shows a table containing the data corresponding to each subject and each brain region.
Figure 7: The subject data tab of the main panel shows a table containing the data corresponding to each subject and each brain region.

Subject Data shows the data for each subject in the cohort for each brain region in the brain atlas (figure 7). By default, the data are shown for all the subjects in the cohort. If a group is selected in the group panel, the data are shown only for the subjects belonging to the selected group. The header of the table shows the brain region labels, while the first column shows the subject codes. Each of the following rows contains the numerical information for each brain region of the corresponding subject. The numerical data can be edited by clicking on the desired field. Subject IDs and brain region names are not editable.[2] The subjects and their data can be exported as a *.txt file by pushing Save subjects as txt … .

Figure 8: The group averages tab of the main panel shows the average and the standard deviation of the data of each group. It also permits one to compare two groups.
Figure 8: The group averages tab of the main panel shows the average and the standard deviation of the data of each group. It also permits one to compare two groups.
  • Group Averages shows the average and the standard deviation of all brain regions’ data for each group (figure 8). A comparison can be performed between any two groups specified by the popup menus at the bottom by pushing Comparison. The significance of the differences between values are calculated by permutation test; the number of permutations can be entered as the parameter M (by default M=1000). After the calculation, the table is updated to show the differences between the values of the two groups as well as single-tailed and double-tailed p-values.
  • Brain View visualizes the data on a brain surface (figures 9,10 and 11). The user can visualize subject data, group data, or group comparisons on a brain surface by pushing one of the three buttons at the bottom. Each opens an interface that allows the user to specify the parameters to plot the data:

–  View subjects visualizes the data for each brain region at the level of single subjects. This opens a new interface shown in figure 9. The list on the left shows all the subjects in the cohort. The user can offset and rescale the data by entering the desired values in the corresponding field. Alternatively, the offset and rescale can be computed automatically to scale the data between 0 and 1 pushing Automatic rescaling. The negative data are substituted with their absolute values if the absolute value check box is checked, otherwise all negative values are set to zero.

Figure 9: The brain view tab of the main panel shows subject data, group data, or group comparisons on a brain surface by pushing one of the three buttons at the bottom. For each option, an interface is provided allowing the user to specify the parameters for the plot. This snapshot correspond to the subject-level brain view.
Figure 9: The brain view tab of the main panel shows subject data, group data, or group comparisons on a brain surface by pushing one of the three buttons at the bottom. For each option, an interface is provided allowing the user to specify the parameters for the plot. This snapshot correspond to the subject-level brain view.

The value of the data can be plotted with various graphical conventions:

* Symbol size.
* Symbol color.
* Sphere radius.
* Sphere color.
* Sphere transparency.
* Label size.
* Label color.

–  View group visualizes the data for each brain region at the group level. This opens the new interface shown in figure 10. The list on the left shows all the groups in the cohort. The average and standard deviation of each group can be visualized according to the graphical conventions selected on the left and right columns, respectively. The graphical conventions and rescaling parameters can be chosen analogously to the ones detailed in the view subjects section.

Figure 10: This snapshot correspond to the group-level brain view.
Figure 10: This snapshot correspond to the group-level brain view.

–  View comparison visualizes a comparison between two groups. The interface in this case is shown in figure 11. The groups are selected from the lists on the left.[3] The user can choose to view the difference between the average values and standard deviations of the two groups as well as the single-tailed or double-tailed p-values calculated by the permutation test. The graphical conventions and rescaling parameters can be chosen analogously to the ones detailed in the view subjects section.

Figure 11: This snapshot correspond to the comparison brain view.
Figure 11: This snapshot correspond to the comparison brain view.

By right-clicking on the brain surface, one has access to four popup menus where the parameters for visualization of the brain regions can be set:

–  Brain settings (figure 12) permits one to set the parameters of the brain surface, including the edge color, face color, and transparency.

Figure 12: Brain settings.
Figure 12: Brain settings.

–  Brain region symbol settings (figure 13) allows one to change the type, size, edge, and face color of the symbols representing the brain regions. Furthermore, brain regions can be set visible or hidden. The regions on which to apply the changes can be selected from the list that appears on the left-hand side of the menu.

Figure 13: Brain region symbol settings.
Figure 13: Brain region symbol settings.

–  Brain region sphere settings (figure 14) allows one to change the radius, edge color, face color, and transparency of the spheres representing the brain regions. Also, brain regions can be set visible or hidden. The regions on which to apply the changes can be selected from the table at the left.

Figure 14: Brain region sphere settings.
Figure 14: Brain region sphere settings.

–  Brain region label settings (figure 15) allows one to change the font, color, and interpreter for the labels representing the brain regions. Also, brain regions can be set visible or hidden. The regions on which to apply the changes can be selected from the table at the left.

Figure 15: Brain region label settings.
Figure 15: Brain region label settings.

 

Menu

File provides various options for importing and saving an MRI cohort:

–  File \to Open (Ctrl+O) opens a popup window to load an MRI cohort saved in *.mc format.
–  File \to Close (Ctrl+C) closes the GUIMRICohort.
–  File \to Save (Ctrl+S) saves the current MRI cohort in *.mc format.
–  File \to Save as opens a popup window to save the current MRI cohort in *.mc format possibly in a different file.
–  File \to Import (xml) imports an MRI cohort from an xml file.
–  File \to Export (xml) exports the current MRI cohort to an xml file.

Groups provides various options to edit subject groups:

–  Groups  \to Load subject group from xls … loads subject group from xls.
–  Groups \to Load subject group from txt … loads subject group from txt.
–  Groups \to Load subject group from xlm … loads subject group from xlm.
–  Groups  \to Add adds a group at the end of the table.
–  Groups  \to Remove removes the selected group.
–  Groups  \to Move up moves the selected group up by one place.
–  Groups  \to Move down moves the selected group down by one place.

Subjects provides various options to edit subjects:

–  Subjects \to Select all selects all the subjects.
–  Subjects \to Clear selection clears the current selection.
–  Subjects \to Add subject adds a subject at the end of the table.
–  Subjects \to Add above adds subjects above the selected ones.
–  Subjects \to Add below adds subjects below the selected ones.
–  Subjects \to Remove removes the selected subjects.
–  Subjects \to Move up moves selected subjects up by one place.
–  Subjects \to Move down moves selected subjects down by one place.
–  Subjects \to Move to top moves selected subjects to the top of the table.
–  Subjects \to Move to bottom moves selected subjects to the bottom of the table.

View switches the main view to display various types of information:

–  View \to Groups & Demographics shows group data and the profiles of the subjects.
–  View \to Subject Data shows the data for each subject in the cohort.
–  View \to Group Averages shows the average and the standard deviation for each group.
–  View \to Brain View visualizes the data on a brain surface.

Brain View \to Generate figure (Ctrl+F) generates a figure that can be customized using the standard MatLab plotting tools. The figure can then be exported in several standard graphic formats.

Graph Analysis \to New MRI graph analysis launches GUIMRIGraphAnalysis,
a graph analysis manager program, using the current cohort.

About \to About provides information about the current version of GUIMRICohort and BRAPH.

 

Toolbar

The toolbar provides different options to open and save the MRI cohort and visualize the brain surface. It is shown in figure 16.

Figure 16: GUIMRICohort toolbar.
Figure 16: GUIMRICohort toolbar.

Open and save commands

These commands allow the user to open and save an MRI cohort in the *.mc format. These are equivalent to the open and save menu options in the File menu.

openopens a popup window to load an MRI cohort in *.mc format.
savesaves the current MRI cohort in *.mc format.

Visualization commands

These commands allow the user to control the visualization of the brain view.

zoom_in  zooms in brain view.
zoom_out  zooms out brain view.
hand  drags brain view.
rotate  rotates brain view
cursor  shows/hides data cursor.
view_3d  standard 3D view.
view_sl  sagittal left view.
view_sr  sagittal right view.
view_ad  axial dorsal view.
view_av  axial ventral view.
view_ca  coronal anterior view.
view_cp  coronal posterior view.
brain  switches brain surface on/off.
axis  switches axis on/off.
grid  switches grid on/off.
symbol  switches brain region symbols on/off.
sphere  switches brain regions spheres on/off.
label  switches brain region labels on/off.

 

Watch Also:

MRI_cohort_screen_shot
MRI Cohort

Footnotes and references

  1. ^ The data corresponding to the brain region can be edited as explained below when discussing the subject data tab.
  2. ^ They are editable in the groups & demographics tab.
  3. ^ The order of the groups is that specified by the popup menus. Thus, the comparison between the groups gr1_MRI and gr2_MRI is not equivalent to comparison between gr2_MRI and gr1_MRI.