BARSTOOL Set Parameters - dwong263/MAGIQ GitHub Wiki

Overview

This tab allows you to define the various parameters required for absolute metabolite quantification. Briefly, these parameters include the following:

  • The number of 1H-MRS-visible protons in each metabolite
  • The T1 and T2 relaxation rates in gray matter (GM) and white matter (WM) for each metabolite
  • The T1 and T2 relaxation rates of water in gray matter (GM), white matter (WM), and cerebrospinal fluid (CSF)
  • The experimental parameters: Repetition time (TR) and echo time (TE)
  • The relative proton densities in GM, WM, and CSF

You can read more about the mathematics of quantification and the parameters required for quantification here. BARSTOOL implements the equations on that page to produce concentration estimates.

Defining Parameter Values

The best way to define the parameter values listed above for your particular acquisition and prior knowledge template is by writing a *.qinfo file and loading it into BARSTOOL. You can find pre-defined *.qinfo files in the barstool/qinfo directory.

What is a *.qinfo File?

The best way to understand a .qinfo file is to look at an example. Let's take metab3T.qinfo as the example:

#
# Columns:
#     1.  Metabolite
#     2.  Number of protons for quantifiable singlet or whole signal sum
#     3.  T1 values in GM (in sec)
#     4.  T2 values in GM (in msec)
#     5.  T1 values in WM (in sec)
#     6.  T2 values in WM (in msec)
#     7.  First Peak
#     8.  Last Peak
#
naa  3  1.4175  262.83  1.462  299.67 6   6
cho  9  1.21    245.67  1.262  209.0  11  11
cre  3  1.3425  157.5   1.36   158.83 18  18
gln  5  1.1725  133.5   0.9783 133.67 22  31
glu  5  1.27    167.0   1.170  143.0  32  46
myo  6  1.1725  220.5   0.9783 195.3  47  59
glc  6  1.1725  117.0   0.9783 121.5  60  78
#
# Water:
#      protons  T1_GM  T2_GM  T1_WM  T2_WM  T1_CSF  T2_CSF
water  2        1.47   83.00  1.132  83.00  4.082   2200
#
# Experiment:
#    TR    TE     Conc   ConcGM  ConcWM  ConcVox
exp  2000  135.0  55.12  0.81    0.71    0
#

Comments

Note that any line of the file that contains # character is considered to be 'commented out' and is ignored by BARSTOOL and won't be loaded.

Metabolite Parameters

Consider the lines that occur after the first block of commented lines. The first of those lines is

naa  3  1.4175  262.83  1.462  299.67 6   6

There are eight entries in this line delimited by a tab-character (\t). The eight entries are:

  1. The name of the metabolite (naa)
  2. The number of 1H-MRS visible protons in that metabolite.

    In this case, the number of protons is 3 because we want to only use the main peak of NAA [at 2.01 ppm] to estimate the concentration)

  3. The T1 value of the main peak of naa in GM expressed in seconds
  4. The T2 value of the main peak of naa in GM expressed in milliseconds
  5. The T1 value of the main peak of naa in WM expressed in seconds
  6. The T2 value of the main peak of naa in WM expressed in milliseconds
  7. The peak number of the first peak of the metabolite as defined in the constraint file used to fit the data.
  8. The peak number of the last peak of the metabolite as defined in the constraint file used to fit the data.

    In this case, entry 7 is equal to entry 8, because we only want to use one peak (the main peak) of NAA to estimate the concentration. The main peak of NAA in the corresponding constraint file was peak number 6.

A couple of notes on these entries:

  • The T1 and T2 values should be specific for GM or WM. They will be different at different field strengths and may also vary by brain region. If your dataset was acquired at 3T in the motor cortex, try to use a relaxation rates from literature that were measured at 3T in the motor cortex for the best concentration estimates.
  • Entries 7 and 8 are important. BARSTOOL uses these numbers to define , the sum of the amplitudes of the metabolite as determined by the fitted prior-knowledge model. Specifically, , where k is entry 7 and K is entry 8. See here for more details.

Water Reference Parameters

Next, consider the line that begins with water. BARSTOOL assumes that the unsuppressed water signal acquired during the same scanning session as the metabolite spectrum is the internal reference for estimating metabolite concentrations. This line defines some of the parameters needed for correcting the water signal. See here for more details.

There are eight entries in this line delimited by a tab-character (\t). The eight entries are:

  1. This entry must always be water.
  2. The number of 1H-MRS visible protons in water. This is always 2.
  3. The T1 value of water in GM expressed in seconds
  4. The T2 value of water in GM expressed in milliseconds
  5. The T1 value of water in WM expressed in seconds
  6. The T2 value of water in WM expressed in milliseconds
  7. The T1 value of water in CSF expressed in seconds
  8. The T2 value of water in CSF expressed in milliseconds

Like with the metabolite parameters, the T1 and T2 values should be specific for GM, WM, or CSF. Once again, they will be different at different field strengths and may also vary by brain region. If your dataset was acquired at 3T in the motor cortex, try to use a relaxation rates from literature that were measured at 3T in the motor cortex for the best concentration estimates.

Experiment Parameters

Finally, consider the line that beings with exp. These are other parameters required for estimating metabolite concentrations. There are 7 entries in this line delimited by a tab-character (\t). The seven entries are:

  1. This entry must always be exp.
  2. The repetition time (TR) of the pulse sequence used to acquire the dataset you are analyzing.
  3. The echo time (TE) of the pulse sequence used to acquire the dataset you are analyzing.
  4. The concentration of pure water in water
  5. The relative proton density of water in GM as compared to that of pure water
  6. The relative proton density of water in WM as compared to that of pure water
  7. A flag signifying whether you want a voxel concentration or a tissue concentration calculated. Set ConcVox to 1 if you want a voxel concentration and set ConcVox to 0 if you want a tissue concentration. Learn more about what the difference between a voxel and a tissue concentration is here.

Loading the .qinfo File

At the bottom of the interface, click the Load button and select the .qinfo file you want to load. If the file is successfully loaded, the interface will populate with the values defined in the .qinfo file.

You can use the interface to edit any of the parameters directly. Then you may save the new parameters a new .qinfo file by clicking the Save button and specifying a new file name.

Confirming the Parameters

Confirm the parameters you want to use for metabolite quantification by clicking the Confirm Quantification Parameters button at the bottom of the interface.

⚠️ **GitHub.com Fallback** ⚠️