1 Introduction

The MsCoreUtils package low-level functions for mass spectrometry data and is independent of any high-level data structures. These functions include mass spectra processing functions (noise estimation, smoothing, binning), quantitative aggregation functions (median polish, robust summarisation, …), missing data imputation, data normalisation (quantiles, vsn, …) as well as misc helper functions, that are used across high level data structure within the R for Mass Spectrometry packages.

For a full list of function, see

library("MsCoreUtils")
ls(pos = "package:MsCoreUtils")
##  [1] "%between%"                "aggregate_by_vector"     
##  [3] "asInteger"                "between"                 
##  [5] "bin"                      "closest"                 
##  [7] "coefMA"                   "coefSG"                  
##  [9] "coefWMA"                  "common"                  
## [11] "dotproduct"               "group"                   
## [13] "i2index"                  "imputeMethods"           
## [15] "impute_bpca"              "impute_knn"              
## [17] "impute_matrix"            "impute_min"              
## [19] "impute_mixed"             "impute_mle"              
## [21] "impute_neighbour_average" "impute_with"             
## [23] "impute_zero"              "isPeaksMatrix"           
## [25] "join"                     "localMaxima"             
## [27] "medianPolish"             "noise"                   
## [29] "normalizeMethods"         "normalize_matrix"        
## [31] "ppm"                      "rbindFill"               
## [33] "refineCentroids"          "rla"                     
## [35] "robustSummary"            "rowRla"                  
## [37] "smooth"                   "validPeaksMatrix"        
## [39] "valleys"                  "vapply1c"                
## [41] "vapply1d"                 "vapply1l"

or the reference page on the package webpage.

2 Examples

The functions defined in this package utilise basic classes with the aim of being reused in packages that provide a more formal, high-level interface.

As an examples, let’s take the robustSummary() function, that calculates the robust summary of the columns of a matrix:

x <- matrix(rnorm(30), nrow = 3)
colnames(x) <- letters[1:10]
rownames(x) <- LETTERS[1:3]
x
##            a          b          c          d          e           f         g
## A  0.2789965  0.5157101 -0.5279943 -0.1939009  1.2560396 -0.08034553 0.3343163
## B  0.1555281 -1.4270770  0.3588995 -0.3752427  1.9851953  1.11293646 1.5887258
## C -0.5120019 -1.2296613  1.9397270 -0.6881300 -0.0812539 -1.00532304 1.0096643
##            h           i          j
## A -0.5578596 2.044829899 -0.1602576
## B  1.0880902 0.013051702 -0.9822518
## C  0.2957591 0.007877468  0.5376851
robustSummary(x)
##            a            b            c            d            e            f 
## -0.025825774 -0.753516376  0.342837545 -0.419091211  1.053326969  0.009089294 
##            g            h            i            j 
##  0.977568801  0.275329940  0.585301716 -0.201608130

This function is typicall to be used to summarise peptide quantitation values into protein intensities1 See Sticker et al. Robust summarization and inference in proteome-wide label-free quantification. https://doi.org/10.1101/668863.. This functionality is available in

3 Contributions

If you would like to contribute any low-level functionality, please open a GitHub issue to discuss it. Please note that any contributions should follow the style guide and will require an appropriate unit test.

If you wish to reuse any functions in this package, please just go ahead. If you would like any advice or seek help, please either open a GitHub issue.

Session information

## R version 4.0.0 (2020-04-24)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.11-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.11-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] MsCoreUtils_1.0.0 BiocStyle_2.16.0 
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.4.6        bookdown_0.18       digest_0.6.25      
##  [4] MASS_7.3-51.6       stats4_4.0.0        magrittr_1.5       
##  [7] evaluate_0.14       rlang_0.4.5         stringi_1.4.6      
## [10] S4Vectors_0.26.0    rmarkdown_2.1       tools_4.0.0        
## [13] stringr_1.4.0       parallel_4.0.0      xfun_0.13          
## [16] yaml_2.2.1          compiler_4.0.0      BiocGenerics_0.34.0
## [19] BiocManager_1.30.10 htmltools_0.4.0     knitr_1.28