
![](https://github.com/boriskoch/ume/blob/main/vignettes/images/ume_package_icon.png?raw=true)

# An R package for UltraMassExplorer (UME)

UME has been under active development since 2019 and provides
a comprehensive workflow for ultrahigh-resolution mass spectrometry
data analysis of complex organic matter.

The package comprises about 70 documented functions and
supports workflows ranging from molecular formula assignment
to visualization and reporting.
----

### Ressources
##### *All package versions*
👉 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20108477.svg)](https://doi.org/10.5281/zenodo.20108477)


##### *Github for public releases*
👉 https://github.com/boriskoch/ume

  Active development takes place in AWI GitLab.


##### *UME shiny app*
👉 https://www.awi.de/en/ume


##### *Complete manual*

👉 [The UME Vignette](https://github.com/boriskoch/ume/blob/main/vignettes/vignette_ume.pdf)

`browseVignettes("ume")`


----

### Quick tour

##### *Predefined molecular formula libraries*

UME molecular formula libraries (lib_02.rds, lib_05.rds) are available at:

Zenodo DOI: <https://doi.org/10.5281/zenodo.17606457>

Download within the `ume` package:

`lib <- download_library(library = "lib_02.rds")`


##### *Molecular formula assignment*


`mfd <- ume_assign_formulas(pl = peaklist_demo, formula_library = lib, pol = "neg", ma_dev = 0.5, verbose = TRUE)`


##### *Formula filter process*

`mfd_filt <- ume_filter_formulas(mfd = mfd, normalization = "none", c_iso_check = T, dbe_o_max = 10, p_max = 0, s_max = 1, n_max = 2, verbose = TRUE)`


##### *Data summary*

`ds <- calc_data_summary(mfd_filt)`


##### *Visualization examples*

Plot mass spectrum

`uplot_ms(pl = peaklist_demo, label = "file")`

Plot van Krevelen diagram

`uplot_vk(mfd_filt)`

Plot evaluation of carbon istope abundance:

`uplot_isotope_precision(mfd_filt)`


-----

### Installation 

`install.packages("ume")`


----

### Create custom molecular formula library

`lib <- 
create_ume_formula_library(
max_formula = "C1000[13C1]H3000[15N1]N6O1000P3S3[34S1]", 
min_formula = "C1H1", 
max_mass = 250, 
heu_filter = TRUE, 
verbose = TRUE)`

*Be aware that this step requires a lot of memory and processing time!*

----
