---
title: "Core Utils for Mass Spectrometry Data"
author:
- name: MsCoreUtils Package Maintainers
package: MsCoreUtils
output:
  BiocStyle::html_document:
    toc_float: true
vignette: >
  %\VignetteIndexEntry{Core Utils for Mass Spectrometry Data}
  %\VignetteEngine{knitr::rmarkdown}
  %%\VignetteKeywords{Mass Spectrometry, MS, MSMS, Proteomics, Metabolomics, Infrastructure, Quantitative }
  %\VignetteEncoding{UTF-8}
bibiliography: references.bib
---

```{r style, echo = FALSE, results = 'asis'}
BiocStyle::markdown()
```


# Introduction

The `MsCoreUtils` package low-level functions for mass spectrometry data and is
independent of any high-level data structures [@rainer_modular_2022]. 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

```{r, message = FALSE}
library("MsCoreUtils")
ls(pos = "package:MsCoreUtils")
```

or the [reference
page](https://rformassspectrometry.github.io/MsCoreUtils/reference/index.html)
on the package webpage.


# 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:

```{r}
x <- matrix(rnorm(30), nrow = 3)
colnames(x) <- letters[1:10]
rownames(x) <- LETTERS[1:3]
x
robustSummary(x)
```

This function is typicall to be used to summarise peptide quantitation
values into protein intensities[^robuststum]. This functionality is
available in

- the
  [MSnbase::combineFeatures()](http://lgatto.github.io/MSnbase/reference/combineFeatures.html)
  function for `MSnSet` objects and

- the
  [QFeatures::aggregateFeatures()](https://rformassspectrometry.github.io/QFeatures/reference/Features-aggregate.html)
  function for `QFeatures` objects.


[^robuststum]: See Sticker *et al.* Robust summarization and inference
    in proteome-wide label-free
    quantification. https://doi.org/10.1101/668863.

# Contributions

If you would like to contribute any low-level functionality, please
[open a GitHub
issue](https://github.com/RforMassSpectrometry/MsCoreUtils/issues) to
discuss it. Please note that any
[contributions](https://rformassspectrometry.github.io/RforMassSpectrometry/articles/RforMassSpectrometry.html#contributions)
should follow the [style
guide](https://rformassspectrometry.github.io/RforMassSpectrometry/articles/RforMassSpectrometry.html#coding-style)
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](https://github.com/RforMassSpectrometry/MsCoreUtils/issues).


# Session information {-}

```{r sessioninfo, echo=FALSE}
sessionInfo()
```

# References {-}