BARSTOOLRV 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. Since Bruker and Varian scanners store their datasets, not as single files, but as multiple files within a folder, the Working Directory should contain the folders associated with all the datasets you'd like to analyze.

Within these sub-folders, there must be a file called sup.out. This is the file generated by the fitting process, and contain the result of the fitting of the prior knowledge template to the in-vivo metabolite spectrum. It also contains all the information required to repeat a fit and obtain identical results. See more details here.

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

data/
β”œβ”€β”€ results/
β”‚   β”œβ”€β”€ a2_9m/
β”‚   β”‚   β”œβ”€β”€ sup.out
β”‚   β”œβ”€β”€ a2_12m/
β”‚   β”‚   β”œβ”€β”€ sup.out
β”‚   β”œβ”€β”€ a2_15m/
β”‚   β”‚   β”œβ”€β”€ sup.out

Select Output Files

Next, select the folders in your Working Directory that correspond to the datasets you'd like to analyze by clicking the Load Output Files button. You can select multiple folders.

Confirm Study IDs

After selecting the output files, the list of study IDs will automatically populate with the folder 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 datasets 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.