This R package provides functionality for batch correction methods for mass spectrometry (MS) omics data. This includes Pareto Scaling, Power Scaling, Range Scaling, ComBat, EigenMS, RUV-random, NOMIS, QC-RLSC, WaveICA2.0, SERRF, and TIGER). Additional functions include an imputation function (using expectation maximization algorithms) and a function to filter data for TIGER batch correction. Example data is also provided in the package.
devtools::install_github("pmartR/malbacR")
malbacR depends on pmartR. There is a problem that causes pmartR to fail compiling cpp code, which has something to do with rcppArmadillo and certain installations of gfortran. See these posts that try to explain the issue: 1 2 3. Two solutions we have found:
- Install gfortran from a recommended source (not homebrew):
- This CRAN-approved resource for build tools on mac lists two versions of gfortran and how to install them.
- On Catalina 10.15.7 I downloaded and installed gfortran 8.2 from the link provided in this blog post
- When using the homebrew gfortran installation, add the line FLIBS = -L`gfortran -print-file-name=libgfortran.dylib | xargs dirname` to ~/.R/Makevars (a plain text file with no extention)
To get started, see the package documentation and function reference located here.
Example peptide (both filtered and unfiltered versions) of two metabolite datasets. The first data set (pmart_amide/pmart_amideFilt) is a subset of a dataset originally came from the the R package WaveICA2.0 which can be found here. The second dataset (pmart_mix/pmart_mixFilt) originally came from the R package crmn which can be found here.