Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

The "Vertex Analysis: requires you to prepare two files: the individual segmented structures combined into one file, and a design matrix to indicate which file belongs to which group. T

Combining individual files: concat_bvars

In a terminal, navigate to the directory with all the bvars files, e.g., [user@localhost temp]$ cd /mnt/hgfs/LinuxShare/temp

Create the single file with this command: concat_bvars output_name.bvars [list of ".bvars" files]. You most likely will use a wildcard "*" rather than typing each filename. For example, to combine all the left hippocampus files in the directory: [user@localhost temp]$ concat_bvars L_Hipp_all.bvars con*_L_Hipp_first.bvars dis*_L_Hipp_first.bvars 

This command will combine ALL individuals' L_Hipp  files. Therefore, if you want to exclude a subject, you need to move the files out of the folder, and re-run concat_bvars. You may want to name the output file with the number of subjects, e.g., "L_Hipp_all_N35.bvars" for 35 subjects. 

The files will be ordered alphabetically; knowing the order is required for the later steps (specifically, creating the design matrix).

Design matrix

Note: Create this file using the FSL "Glm" GUI, as other important files are created at the same time.

Click to example of two-group, 96 subject design matrix file.

Create this file in the same directory as everything else. "cd" to the directory, and type Glm (case sensitive), select "Higher-level / non-timeseries design" from the pull-down menu, enter the number of subjects (# inputs), click Wizard, select "two groups, unpaired", enter the number of subjects in group 1, click Process, then Save. When saving, navigate to something like \mnt\hgfs\LinuxShare\temp, and choose a file name like design_2group.mat."

 

In addition to design.mat (or whatever name you saved it as), you will see design.con, design.fsf, and other files (example below for a file saved as "des").

Background on design matrix

The design matrix is a text file with header information and numbers in columns. By tradition, the file is saved with a name like "design.mat". Each row represents a subject, in the order stored in the concatenated bvars file. The simplest design matrix (for a two group dataset) is a two columns, with the first +1 for rows in group 1 and 0 otherwise, and similarly +1 in the second column for rows in the second group. There is also header information which includes the number of columns (I think), the number of subjects, and the maximum value of each column. For example, here is a two-group, 5 subjects/group design matrix:

 

 

 

 

  • No labels