📗 Consuming Ceu Mass Mediator RESTful API in R 🚀
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.Rproj.user
R
inst/extdata
man
.Rbuildignore
.gitignore
DESCRIPTION
LICENSE
NAMESPACE
README.md
cmmr.Rproj

README.md

CMMR - Ceu Mass Mediator API in R

Consuming Ceu Mass Mediator RESTful API in R.

Thank you @albertogilf for you kindness help!

Please find the Ceu Mass Mediator source code: Ceu Mass Mediator source code repository

And the Ceu Mass Mediator deployment: Ceu Mass Mediator

Installation

install.packages(devtools)
devtools::install_github("lzyacht/cmmr")

Example

Batch search all result in positive mode

library(cmmr)
df_pos = batch_search_full('all-except-peptides',
                           '["all-except-mine"]',
                           'mz',
                           'positive',
                           '["M+H","M+Na"]',
                           10,
                           'ppm',
                           system.file("extdata", "unique_mz.csv", package = "cmmr"))

Batch search all result in negative mode

library(cmmr)
df_neg = batch_search_full('all-except-peptides',
                           '["all-except-mine"]',
                           'mz',
                           'negative',
                           '["M-H","M+Cl"]',
                           10,
                           'ppm',
                           system.file("extdata", "unique_mz.csv", package = "cmmr"))

Advanced batch search

df = advanced_batch_search(
     chemical_alphabet   = 'all',
     modifiers_type      = 'none',
     metabolites_type    = 'all-except-peptides',
     databases           = '["hmdb"]',
     masses_mode         = 'mz',
     ion_mode            = 'positive',
     adducts             = '["all"]',
     deuterium           = 'false',
     tolerance           = '7.5',
     tolerance_mode      = 'ppm',
     masses              = '[400.3432, 288.2174]',
     all_masses          = '[]',
     retention_times     = '[18.842525, 4.021555]',
     all_retention_times = '[]',
     composite_spectra   = '[[{ "mz": 400.3432, "intensity": 307034.88 }, { "mz": 311.20145, "intensity": 400.03336 }]]',
     cmm_url             = 'http://ceumass.eps.uspceu.es/mediator/api/v3/advancedbatch')