---
tags: Resources
---
# R packages
## XCMS
This is the package that we use to perform peak picking, retention time correction/alignment, feature correspondence and hard filling.
XCMS is located at Bioconductor (https://www.bioconductor.org/), which has installation instructions and tutorials.
Location: [Bioconductor](https://bioconductor.org/packages/release/bioc/html/xcms.html) (https://bioconductor.org/packages/release/bioc/html/xcms.html)
Tutorial: https://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html
Code repository: https://github.com/sneumann/xcms
*Installation instructions in R*
```
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("xcms")
```
## CMSITools
Package for convenient handling of CMSI samples (according to CMSI naming strategy), including filtering based on chromatography, polarity and QCs. Find and extract MS1 level data from target features.
Functionalities being added:
- Streamlined extraction of EICs from features and RAMClusters.
- Extraction and management of MS2 level data from MGFs
NB! CMSITools is <ins>not a public package</ins> and you need to be manually added to the repository.
*Installation instructions in R*
```
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
```
Generate a personal access token (PAT) in https://gitlab.com/profile/personal_access_tokens - Just give it a name, check all the boxes and copy the actual token string. Then install using:
```
remotes::install_gitlab('CarlBrunius/CMSITools', auth_token = 'your_PAT_string')
```
## StatTools
Package for various tools. This includes our standard tool for multivariate imputation: mvImpWrap()
Repository: https://gitlab.com/CarlBrunius/StatTools
*Installation instructions in R*
```
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_gitlab('CarlBrunius/StatTools')
```
## batchCorr
Package to perform within- and between-batch drift correction.
Repository: https://gitlab.com/CarlBrunius/batchCorr
Tutorial: https://gitlab.com/CarlBrunius/batchCorr/-/blob/master/Tutorial/batchCorr_Tutorial.docx
*Installation instructions in R*
```
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_gitlab('CarlBrunius/batchCorr')
```
*Reference*
Brunius C, Shi L, & Landberg R. (2016). Large-scale untargeted LC-MS metabolomics data correction using between-batch feature alignment and cluster-based within-batch signal intensity drift correction. Metabolomics, 12(11), 173. https://doi.org/10.1007/s11306-016-1124-4
## RAMClust
Package to annotate several features corresponding the same analyte (e.g. isotopes, adducts and fragments) into the same cluster. Written and maintained by Corey Broeckling.
Repository: https://github.com/cbroeckl/RAMClustR
*Installation instructions in R*
```
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_github("cbroeckl/RAMClustR", build_vignettes = TRUE, dependencies = TRUE)
```
Tutorial available from R using `vignette("RAMClustR")`
*Reference*
RAMClust: A Novel Feature Clustering Method Enables Spectral-Matching-Based Annotation for Metabolomics Data C. D. Broeckling, F. A. Afsar, S. Neumann , A. Ben-Hur, and J. E. Prenni http://pubs.acs.org/doi/abs/10.1021/ac501530d
## MUVR?