annotating: MS annotation

annotatingR Documentation

MS annotation

Description

Annotation with chemical and biological databases

The parameters and their default values are printed for the selected database

Usage

annotating(
  x,
  database.c = c("chebi", "local.ms")[1],
  param.ls = list(query.type = c("mz", "chebi.id", "kegg.id")[1], query.col = "mz",
    ms.mode = "pos", mz.tol = 10, mz.tol.unit = "ppm", fields = c("chebi.id", "name",
    "formula", "molecular.mass", "monoisotopic.mass"), fieldsLimit = 1, max.results = 3,
    local.ms.db = data.frame(), organism = "hsa", prefix = paste0(database.c, "."), sep =
    "|"),
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'MultiAssayExperiment'
annotating(
  x,
  database.c = c("chebi", "local.ms")[1],
  param.ls = list(query.type = c("mz", "chebi.id", "kegg.id")[1], query.col = "mz",
    ms.mode = "pos", mz.tol = 10, mz.tol.unit = "ppm", fields = c("chebi.id", "name",
    "formula", "molecular.mass", "monoisotopic.mass"), fieldsLimit = 1, max.results = 3,
    local.ms.db = data.frame(), organism = "hsa", prefix = paste0(database.c, "."), sep =
    "|"),
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'SummarizedExperiment'
annotating(
  x,
  database.c = c("chebi", "local.ms")[1],
  param.ls = list(query.type = c("mz", "chebi.id", "kegg.id")[1], query.col = "mz",
    ms.mode = "pos", mz.tol = 10, mz.tol.unit = "ppm", fields = c("chebi.id", "name",
    "formula", "molecular.mass", "monoisotopic.mass"), fieldsLimit = 1, max.results = 3,
    local.ms.db = data.frame(), organism = "hsa", prefix = paste0(database.c, "."), sep =
    "|"),
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'MultiDataSet'
annotating(
  x,
  database.c = c("chebi", "local.ms")[1],
  param.ls = list(query.type = c("mz", "chebi.id", "kegg.id")[1], query.col = "mz",
    ms.mode = "pos", mz.tol = 10, mz.tol.unit = "ppm", fields = c("chebi.id", "name",
    "formula", "molecular.mass", "monoisotopic.mass"), fieldsLimit = 1, max.results = 3,
    local.ms.db = data.frame(), organism = "hsa", prefix = paste0(database.c, "."), sep =
    "|"),
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'ExpressionSet'
annotating(
  x,
  database.c = c("chebi", "local.ms")[1],
  param.ls = list(query.type = c("mz", "chebi.id", "kegg.id")[1], query.col = "mz",
    ms.mode = "pos", mz.tol = 10, mz.tol.unit = "ppm", fields = c("chebi.id", "name",
    "formula", "molecular.mass", "monoisotopic.mass"), fieldsLimit = 1, max.results = 3,
    local.ms.db = data.frame(), organism = "hsa", prefix = paste0(database.c, "."), sep =
    "|"),
  report.c = c("none", "interactive", "myfile.txt")[2]
)

annotating_parameters(database.c = c("chebi", "local.ms", "kegg")[1])

Arguments

x

An S4 object of class SummarizedExperiment or MultiAssayExperiment

database.c

character: database to be used for annotation

param.ls

list: parameters for database query; see the example below for the name and related database of each of them

report.c

Character: File name with '.txt' extension for the printed results (call to sink()'); if 'interactive' (default), messages will be printed on the screen; if 'none', no verbose will be generated

Value

SummarizedExperiment or MultiAssayExperiment including the appended rowData data frame(s)

Examples

sacurine.se <- reading(system.file("extdata/W4M00001_Sacurine-statistics", package = "phenomis"))
# see the (default) parameters (e.g. for ChEBI query)
annotating_parameters("chebi")
# mz annotation with ChEBI
sacurine.se <- annotating(sacurine.se, database.c = "chebi", param.ls = list(query.type = "mz", query.col = "mass_to_charge", ms.mode = "neg", prefix = "chebiMZ."))
# mz annotation with local database
msdbDF <- read.table(system.file("extdata/local_ms_db.tsv", package = "phenomis"),
header = TRUE, sep = "\t", stringsAsFactors = FALSE)
sacurine.se <- annotating(sacurine.se, database.c = "local.ms",
param.ls = list(query.type = "mz", query.col = "mass_to_charge", ms.mode = "neg",
mz.tol = 5, mz.tol.unit = "ppm", local.ms.db = msdbDF, prefix = "localMS."))
rowData(sacurine.se)[!is.na(rowData(sacurine.se)[, "localMS.accession"]), ]
# annotation from ChEBI identifiers
sacurine.se <- annotating(sacurine.se, database.c = "chebi",
param.ls = list(query.type = "chebi.id", query.col = "database_identifier",
prefix = "chebiID."))
head(rowData(sacurine.se))
phenomis::annotating_parameters()
phenomis::annotating_parameters("chebi")

SciDoPhenIA/phenomis documentation built on June 9, 2022, 11:54 p.m.