MetReport {Metab} | R Documentation

## MetReport cleans and corrects results generated by the Automated Mass Spectral Deconvolution and Identification System (AMDIS).

### Description

MetReport automatically process ADMIS results by selecting only one compound for each retention time, correcting peak intensities by assigning a fixed mass fragment for each compound across samples or simply extracting their respective areas or base peaks.

### Usage

    MetReport(
    	inputData,
    	singleFile = FALSE,
    	AmdisReport,
    	ionLib,
    	save = TRUE,
    	output = "metab_data",
    	TimeWindow = 2.5,
    	Remove,
    	abundance = "recalculate",
    	folder)

### Arguments

`inputData` | the value of input data depend on the value of the argument singleFile. If singleFile = FALSE, inputData must receive a character vector indicating the path to the mainFolder (See details). If singleFile = TRUE, inputData must receive a character vector indicating the path to the CDF file to be analysed. If inputData is missing, a dialog box pops up allowing the user to click and point to the desired mainFolder or CDF file.
`singleFile` | singleFile = FALSE when analysing a batch of CDF files organized in a single mainFolder (See details). singleFile = TRUE when analysing a single CDF file.
`AmdisReport` | a character vector indicating the path to the TXT file containing the AMDIS report in batch mode (See details).
`ionLib` | The default behaviour is to allow the user to point to a .csv file interactively from a popup dialog box. Alternatively, ionLib can take a character string indicating the path to the reference ion library (See details).
`save` | If TRUE (default), a data frame is saved to a .csv file in folder.
`output` | A character string with the name of the .csv file produced.
`TimeWindow` | A numeric vector defining the maximum allowed different between expected and observed retention. Any compound showing a difference between expected and observed retention higher than the value defined through TimeWindow will be removed from results.
`Remove` | A character string with the names of compounds to be skipped during analysis. Compounds defined through remove (e.g. remove = c("Zylene1", "Pyridine")) will not be considered during analysis.
`abundance` | it may receive one of the values: "recalculated", if the abundances of metabolites will be corrected by fixing a single mass fragment as reference (See details); "Area", "AREA", "a" or "A", if the area associated with each compound should be extracted from the AMDIS report; or "Base.Peak", "BasePeak", "base.peak", "basepeak", "B" or "b", if the Base.Peak associated with each compound should be extracted from the AMDIS report.
`folder` | a character vector indicating the path to the folder where the results must be saved, if save = TRUE.

### Details

Metab is an R package for processing metabolomics data previously analysed by the Automated Mass Spectral Deconvolution and Identification System (AMDIS) (http://chemdata.nist.gov/mass-spc/amdis/downloads/). AMDIS is one of the most used software for deconvoluting and identifying metabolites analysed by Gas Chromatography - Mass Spectrometry (GC-MS). It is execellent in deconvoluting chromatograms and identifying metabolites based on a spectral library, which is a list of metabolites with their respective mass spectrum and their associated retention times. Although AMDIS is widely and successfully applied to chemistry and many other fields, it shows some limitations when applied to biological studies. First, it generates results in a single spreadsheet per sample, which means that one must manually merge the results provided by AMDIS in a unique spreadsheet for performing further comparisons and statistical analysis, for example, comparing the abundances of metabolites across experimental conditions. AMDIS also allows users to generate a single report containing the results for a batch of samples. However, this report contains the results of samples placed on top of each other, which also requires extensive manual process before statistical analysis. In addition, AMDIS shows some limitations when quantifying metabolites. It quantifies metabolites by calculating the area (Area) under their respective peaks or by calculating the abundance of the ion mass fragment (Base.Peak) used as model to deconvolute the peak associated with each specific metabolite. As the area of a peak may be influenced by coelution of different metabolites, the abundance of the most abundant ion mass fragment is commonly used for quantifying metabolites in biological samples. However, AMDIS may use different ion mass fragments for quantifying the same metabolite across samples, which indicates that using AMDIS results one is not comparing the same variable across experimental conditions. Finally, according to the configurations used when applying AMDIS, it may report more than one metabolite identified for the same retention time. Therefore, AMDIS data requires manual inspection to define the correct metabolite to be assigned to each retention time. Metab solves AMDIS limitations by selecting the most probable metabolite associated to each retention time, by correcting the Base.Peak values calculated by AMDIS and by combining results in a single spreadsheet and in a format that suits further data processing. In order to select the most probable metabolite associated to each retention time, Metab considers the number of question marks reported by AMDIS, which indicates its certainty in identification, and the difference between expected and observed retention times associated with each metabolite. For correcting abundances calculated by AMDIS, Metab makes use of an ion library containing the ion mass fragment to be used as reference when quantifying each metabolite present in the mass spectral library applied. For this, Metab collects from the AMDIS report the scan used to identify each metabolite and collects from the raw data (CDF files) the intensities of their reference ion mass fragments defined in the ion library. In addition, MetReport can be used to simply reformat AMDIS reports into a single spreadsheet containing identified metabolites and their Areas or Base.Peaks calculated by AMDIS in each analysed sample. Therefore, MetReport can be used to quickly process AMDIS reports correcting or not metabolite abundances previously calculated by AMDIS.

When singleFile = FALSE, MetReport requires CDF files organised in a mainFolder with subfolders for each experimental condition. Metab's functions were developed to automatically identify the experimental condition associated with each sample. For this, the CDF files to be analysed by MetReport must be organised in subfolders according to their experimental condition, as follows:
————————
mainFolder
——Condition1
———–Sample1_1.cdf
———–Sample1_2.cdf
———–Sample1_3.cdf
——Condition2
———–Sample2_1.cdf
———–Sample2_2.cdf
———–Sample2_3.cdf
——Condition3
———–Sample3_1.cdf
———–Sample3_2.cdf
———–Sample3_3.cdf
————————–
One mainFolder containing one subfolder for each experimental condition. Each subfolder contains the CDF files associated with this specific experimental condition. Alternatively, all the CDF files can be placed in a single folder and MetReport will analyse every sample as belonging to the same experimental condition.

- Amdis report in batch mode. It is a text file containing the results for a batch of samples and can be obtained in AMDIS through: File > Batch Job > Create and Run Job.... Select the Analysis Type to be used, generally Simple, click on Generate Report and Report all hits. Click on Add.., select the files to be analysed, click on Save As..., select the folder where the report will be generated and a name for this report (any name you desire). Finally, click on Run. A new .TXT file with the name specified will be generated in the folder specified.

- ion library in the specific format required by Metab. The ion library is a data frame containing the name and the reference ion mass fragment to quantify each metabolite present in the mass spectral library used by AMDIS when generating the batch report. To facilitate the process, MetReport accepts the .msl file used by AMDIS. An AMDIS library is stored in two files, a file with extension .CID and a file with extension .msl. Metab requires only the .msl file.

To see an example of an ion library from AMDIS converted to the format required by Metab, simply enter the following code in the R console:

library(Metab)

data(exampleIonLib)

print(exampleIonLib)

When all the requirements described above are ready and available, MetReport can be applied. If an essential argument is missing, a dialog box will pop up allowing the user to point and click on the main folder to be analysed, the AMDIS report to be used or the ion library. Thus, MetReport can be applied by simply entering

MetReport()

at the R console. In this case, the user will be prompted to point to the required files while the arguments save, output, TimeWindow and Remove will receive their default values. The default value of save is TRUE, which indicates that the report generated by MetReport must be saved into a CSV file with the name specified in the argument output. The argument TimeWindow defines, in minutes, the accepted difference between expected and observed retention times to consider a true identification. Expected retention time is the retention time defined in the spectral library, while the observed retention time is the retention time where AMDIS actually identified each metabolite. For example, if TimeWindow = 0.5, every metabolite showing more than half minute difference between expected and observed retention times will be removed from the analysis. The argument Remove is used to remove specific compounds from the analysis. For example, if Remove = "Ethanol", every observation of Ethanol in the AMDIS report will not be considered in the analysis. It may receive as many names of metabolites as desired, for example, Remove = c("Ethanol", "Alanine", "Pyridine").

As a result, MetReport generates a data frame containing the metabolites identified in the first column and their abundances in the different samples analysed in the following columns. To see an example, enter the following code at the R console:

library(Metab)

data(exampleMetReport)

print(exampleMetReport)

### Value

MetReport generates a data frame containing the metabolites identified in each biological sample and their respective abundancies/intensities. See data(exampleMetReport) to see an example of the data frame produced by MetReport.

Note that the first line of the resulting data.frame is used to represent sample meta-data (for example replicates).

### Author(s)

Raphael Aggio <ragg005@aucklanduni.ac.nz>

### References

Aggio, R., Villas-Boas, S. G., & Ruggiero, K. (2011). Metab: an R package for high-throughput analysis of metabolomics data generated by GC-MS. Bioinformatics, 27(16), 2316-2318. doi: 10.1093/bioinformatics/btr379

### See Also

`htest`, `MetReportNames`, `normalizeByBiomass`, `normalizeByInternalStandard`, `removeFalsePositives`, `buildLib`

### Examples

    library(Metab)
    ###### Load exampleAMDISReport ######
    data(exampleAMDISReport)
    ###### Analyse a single file ########
    test <- MetReport(
    	inputData = unzip(system.file("extdata/130513_REF_SOL2_2_50_50_1.CDF.zip", package = "Metab")),
    	singleFile = TRUE,
    	AmdisReport = exampleAMDISReport,
    	abundance = "Area",
    	save = FALSE)
    ###### Show results #################
    print(test)

[Package Metab version 1.18.0 Index]