Learn R Programming

cmmr (version 1.0.3)

batch_search: Encapsulation of CEU Mass Mediator batch search API

Description

batch_search returns a dataframe with the results from the database search.

Usage

batch_search(
  cmm_url = "https://ceumass.eps.uspceu.es/api/v3/batch",
  metabolites_type = "all-except-peptides",
  databases = "[\"all-except-mine\"]",
  masses_mode = "mz",
  ion_mode = "positive",
  adducts = "[\"M+H\",\"M+Na\"]",
  tolerance = 10,
  tolerance_mode = "ppm",
  unique_mz
)

Value

A dataframe containing search results.

Arguments

cmm_url

A URL string for the CEU Mass Mediator or a local API endpoint.

metabolites_type

Search metabolites type: "all-except-peptides", "only-lipids", or "all-including-peptides".

databases

A JSON array of databases to search: e.g., "all", "HMDB", "LipidMaps", etc.

masses_mode

Masses mode: "neutral" or "mz".

ion_mode

Ionization mode: "positive" or "negative".

adducts

A JSON array of adducts to include in the search, e.g., '["M+H", "M+Na"]'.

tolerance

A numeric tolerance value (range: 0-100).

tolerance_mode

Tolerance mode: "ppm" or "mDa".

unique_mz

A numeric vector of unique m/z values for the search.

Examples

Run this code
if (FALSE) {
df_pos <- batch_search(
  "https://ceumass.eps.uspceu.es/api/v3/batch",
  "all-except-peptides",
  '["all-except-mine"]',
  "mz",
  "positive",
  '["M+H","M+Na"]',
  10,
  "ppm",
  c(670.4623, 1125.2555, 602.6180)
)
}

Run the code above in your browser using DataLab