Preparing the QuNex study folder hierarchy#

QuNex uses the native filesystem with folders and files as the primary way to organize and structure data. Furthermore, as the starting point for preprocessing and analysis, QuNex uses NIfTI format. For more information on the folder structure, see Data Hierarchy. A number of commands are provided to set up the study folder structure and import the data.

Naming conventions#

Throughout this and following chapters and the specific commands, the following naming convention is used:

  • packet

    A packet is either a compressed file (e.g. a .zip or .tar.gz file) that holds the scanning data from an individual session, or a folder, within which data from an individual scanning session are saved.

  • packet name

    A packet name is a name of the packet. It can refer to the file- or foldername of the packet itself (without the extension), or just a part of it. It is the part that allows uniquely matching of the individual recording session to a specific subject and session type.

  • subject id

    A subject id is a string that uniquely identifies a single person within a study. If a person is scanned on multiple sessions, the subject id across those sessions have to be the same to identify them as belonging to a specific individual and enable e.g. longitudinal processing of participants in the study.

  • session name

    A session name is a string that identifies a specific type of session. It can identify the sequential number of the session (e.g. sess1, sess2, ...). It can identify the specific experimental condition for the session (e.g. baseline, placebo, treatment).

  • session id

    Session id is a string that uniquely identifies a scanning session. It can be the same as or different than the packet name. Whereas QuNex can work with a variety of session ids, the convention used within QuNex is to generate the session id using the formula <subject id>_<session name>, or just <subject id>, if only a single session is acquired for a participant in the study.

Preparing the folder structure#

Starting up a study involves only creating the basic folder structure that will be used by QuNex commands and functions. These are created with a single command:

  • create_study

    The command creates the initial study folder structure that will hold basic study information (info folder), session data (sessions folder), preprocessing logs, lists and scripts (processing folder), and analysis scripts and results (analysis folder). It also generates template parameters.txt and pipeline mapping files in <studyfolder>/sessions/specs. You can use the folders parameter to specify a custom folders structure in the study. By default $TOOLS/python/qx_utilities/templates/study_folders_default.txt will be used.

Example#

qunex create_study \
    --studyfolder=<absolute_path_to_studyfolder>