![]() |
|
MetaboAnalystR PackageMetaboAnalystR package is synchronized with the MetaboAnalyst website and is designed for metabolomics researchers who are comfortable using R to perform raw spectra processing and batch analysis. An optimized global metabolomics analysis workflow starting from raw spectra has been established. The following tutorials are meant to complement our web-based functions by providing step-by-step instructions for several of the most common tasks using the R package. |
Contents
|
1. Overview1.1 IntroductionMetaboAnalystR 3 contains the R functions and libraries underlying the popular MetaboAnalyst web server, including metabolomic data analysis, visualization, and functional interpretation. The package is synchronized with the MetaboAnalyst web server. After installing and loading the package, users will be able to reproduce the same results from their local computers using the corresponding R command history downloaded from MetaboAnalyst web site, thereby achieving maximum flexibility and reproducibility. The version 3 aims to improve the current global metabolomics workflow by implementing a fast parameter optimization algorithm for peak picking, and automated identification of the most suitable method for batch effect correction from 12 well-established approaches. In addition, more support for functional interpretation directly from m/z peaks via mummichog2 (PMID: 23861661), and a new pathway-based method to integrate multiomics data has been added. To demonstrate this new functionality, we perform end-to-end metabolomics data analysis on the clinical IBD samples in this tutorial. More case study have been provided in the vignette of this R package. Here we'd prefer to provide a comprehensive starting tutorial from installation of MetaboAnalystR 3.2 (Updated at 16-Dec-2021). 1.2 InstallationStep 1. Install package dependenciesTo use MetaboAnalystR 3.2, first install all package dependencies. Ensure that you have necessary system environment configured. For Linux (e.g. Ubuntu 18.04/20.04): libcairo2-dev, libnetcdf-dev, libxml2, libxt-dev and libssl-dev should be installed at frist; For Windows (e.g. 7/8/8.1/10): Rtools should be installed. For Mac OS: In order to compile R for Mac OS, you need Xcode and GNU Fortran compiler installed (https://mac.r-project.org/tools/). We suggest you follow these steps: https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/ to help with your installation. R base with version > 4.0 is required. The compatibility of latest version (v4.2) is under evaluation. As for installation of package dependencies, there are two options: Option 1 Enter the R function (metanr_packages) and then use the function. A printed message will appear informing you whether or not any R packages were installed. Function to download packages:
Usage of function:
Option 2 Use the pacman R package (for those with >R 3.5.1).
Step 2. Install the packageMetaboAnalystR 3.2 is freely available from GitHub. The package documentation, including the vignettes for each module and user manual is available within the downloaded R package file. You can install the MetaboAnalylstR 3.0 via any of the three options: A) using the R package devtools, B) cloning the github, C) manually downloading the .tar.gz file. Note that the MetaboAnalystR 3.2 github will have the most up-to-date version of the package. Option A) Install the package directly from github using the devtools package. Open R and enter:Due to issues with Latex, some users may find that they are only able to install MetaboAnalystR 3.2 without any documentation (i.e. vignettes).
Option B) Install from a pre-built source package
Option C) Clone Github and install locallyThe * must be replaced by what is actually downloaded and built.
|
2. Case Study IBDInflammatory bowel diseases, which include Crohn’s disease and ulcerative colitis, have affected several million individuals around the world. Jason L. et al. have performed a longtitude multiomics study on the role of microbiome in the pathogenesis of IBD. Metabolomics study on the facal samples is introduced here for example case study of this novel parameters optimization pipeline. 2.1 Raw Data ProcessingRaw data processing is the first for all metabolomics studies. MetaboAnalystR 3.2 support “.mzXML”, “.mzML” and “.CDF” formats. The original formats (e.g. “.raw” and “.RAW”) generated by vendors will be supported soon. You can convert your original data with ProteoWizard (PMID: 23051804) as the supported formats. Centroided data is preferred. 2.1.1 Load MetaboAnalystRIf you have finished the installation and been ready to use the package. Use the library() function to load the package into R.
2.1.2 Download IBD Example QC DataThe example Quality Control (QC) samples will be used for the next steps. Download the MS data for parameters' optimization at this step. To reach a goal of quicking learning and avoid the long time running for the whole samples (over 600 samples). We only provide 5 samples for each CD and nonIBD group here. If you want to repeat and verify the results in our manuscript, please go IBD MultiOmics Database, download the full batch data and run them using this pipeline.
2.1.3 Data InspectationBefore running the data analysis, the general data structure and information can be inspected with PerformDataInspect. If there are some extremly significant contaminats, it will be discovered directly.
|