Skip to contents

Searches MetabolomicsWorkbench for compound identifiers.

Usage

mwb_compound_lookup(
  input_item = "inchi_key",
  query_column,
  output_item = "pubchem_id",
  suffix = "_mwb",
  ...
)

Arguments

input_item

(character) A valid input item for the compound context (see https://www.metabolomicsworkbench.org/tools/mw_rest.php). The values in the query_column should be of this type. The default is "inchi_key".

query_column

(character) The name of a column in the annotation table containing values to search in the api call.

output_item

(character) A comma separated list of Valid output items for the compound context (see https://www.metabolomicsworkbench.org/tools/mw_rest.php). The default is "pubchem_id".

suffix

(character) A suffix appended to all column names in the returned result. The default is "_mwb".

...

Additional slots and values passed to struct_class.

Value

A mwb_compound_lookup object with the following output slots:

updated(annotation_source) The annotation_source after adding data returned by the API.

Details

This object makes use of functionality from the following packages:

  • metabolomicsWorkbenchR

  • dplyr

Inheritance

A mwb_compound_lookup object inherits the following struct classes:

[mwb_compound_lookup] -> [rest_api] -> [model] -> [struct_class]

References

Lloyd GR, Weber RJM (????). metabolomicsWorkbenchR: Metabolomics Workbench in R. R package version 1.14.1.

Wickham H, François R, Henry L, Müller K, Vaughan D (2023). dplyr: A Grammar of Data Manipulation. R package version 1.1.4, https://CRAN.R-project.org/package=dplyr.

See also

Examples

M = mwb_compound_lookup( input_item = "inchi_key", output_item =
"inchi_key", base_url = "https://www.metabolomicsworkbench.org/rest",
url_template =
"<base_url>/compound/<input_item>/<query_column>/<output_item>",
query_column = character(0), cache = NULL, status_codes = list(),
delay = 0.5, suffix = "_rest_api")