BARSTOOL Amplitudes and CRLBs - dwong263/MAGIQ GitHub Wiki

Overview

This tab allows you to produce a comma-separated values (*.csv) file containing amplitudes and CramΓ©r-RΓ‘o lower bounds (CRLBs) for each component of the fitted model.

Set Working Directory

First, set the Working Directory by clicking the Set Working Directory button and selecting the desired folder. The Working Directory is the directory that contains all of the files required by BARSTOOL to calculate amplitudes and absolute metabolite concentrations. To facilitate batch processing, these files should not be organized into sub-folders within the Working Directory.

For example, suppose your Working Directory is called data/results/ and you have 3 participants called A001, A002, and A003 you'd like to batch process using BARSTOOL. Within data/results/ you should have the following files:

data
β”œβ”€β”€ results
β”‚   β”œβ”€β”€ A001_20170517_std_brain.nii.gz
β”‚   β”œβ”€β”€ A001_20170517_std_brain_seg.nii.gz
β”‚   β”œβ”€β”€ A001_20170517_lthippo_sup.dat
β”‚   β”œβ”€β”€ A001_20170517_lthippo_sup.out
β”‚   β”œβ”€β”€ A001_20170517_lthippo_sup.rda
β”‚   β”œβ”€β”€ A001_20170517_lthippo_uns.dat
β”‚   β”œβ”€β”€ A001_20170517_lthippo_uns.out
β”‚   β”œβ”€β”€ A001_20170517_lthippo_uns.rda
β”‚   β”œβ”€β”€ A001_20170517_std_brain.nii.gz
β”‚   β”‚
β”‚   β”œβ”€β”€ A002_20170517_std_brain_seg.nii.gz
β”‚   β”œβ”€β”€ A002_20170517_lthippo_sup.dat
β”‚   β”œβ”€β”€ A002_20170517_lthippo_sup.out
β”‚   β”œβ”€β”€ A002_20170517_lthippo_sup.rda
β”‚   β”œβ”€β”€ A002_20170517_lthippo_uns.dat
β”‚   β”œβ”€β”€ A002_20170517_lthippo_uns.out
β”‚   β”œβ”€β”€ A002_20170517_lthippo_uns.rda
β”‚   β”‚
β”‚   β”œβ”€β”€ A003_20170517_std_brain.nii.gz
β”‚   β”œβ”€β”€ A003_20170517_std_brain_seg.nii.gz
β”‚   β”œβ”€β”€ A003_20170517_lthippo_sup.dat
β”‚   β”œβ”€β”€ A003_20170517_lthippo_sup.out
β”‚   β”œβ”€β”€ A003_20170517_lthippo_sup.rda
β”‚   β”œβ”€β”€ A003_20170517_lthippo_uns.dat
β”‚   β”œβ”€β”€ A003_20170517_lthippo_uns.out
β”‚   └── A003_20170517_lthippo_uns.rda
β”‚

Select Output Files

Next, select the output (*.out) files that you want to analyze. Output files are generated by the fitting process, and contain the result of the fit. It also contains all the information required to repeat a fit and obtain identical results. See more details here.

You can select multiple files to analyze.

Confirm Study IDs

After selecting the output files, the list of study IDs will automatically populate with the file names. One study ID is listed per line. You can edit any of the IDs in this list. Then hit Confirm Study IDs to lock in your edits.

If, after editing, the number of study IDs listed does not match the number of output files selected, the application will notify you in the "Console Output" panel.

Confirm Save File Name

Next, edit the path and name of the file in which you'd like to save the results. Hit the Confirm Save File Name button to confirm the filepath.

Generate Results

Finally hit the Calculate Amplitudes and CRLBs button at the bottom of the interface to generate the results file at the location specified in the previous step.

Results Format

The results are in a comma-separated values format, which may be opened in Excel or your favourite spreadsheet program. The results are organized as follows:

  • The first column is the study ID
  • The next set of columns each bears the name of a metabolite moeity defined in the prior knowledge template used to fit the data. In these columns, the value in each cell is sum of the amplitudes of all peaks associated with that moeity.
  • You'll notice that there is a second set of columns which also bears the names of the metabolite moeities defined in the prior knowledge template used to fit the data. This second set of columns contain CRLBs associated with the fit of each component of the prior knowledge template.

Read more about CramΓ©r-RΓ‘o lower bounds here.