Identify metabolites based on MS1 or MS/MS database.

annotate_metabolites_mass_dataset(
  object,
  ms1.match.ppm = 25,
  ms2.match.ppm = 30,
  mz.ppm.thr = 400,
  ms2.match.tol = 0.5,
  fraction.weight = 0.3,
  dp.forward.weight = 0.6,
  dp.reverse.weight = 0.1,
  remove_fragment_intensity_cutoff = 0,
  rt.match.tol = 30,
  polarity = c("positive", "negative"),
  ce = "all",
  column = c("rp", "hilic"),
  ms1.match.weight = 0.25,
  rt.match.weight = 0.25,
  ms2.match.weight = 0.5,
  total.score.tol = 0.5,
  candidate.num = 3,
  database,
  threads = 3
)

Arguments

object

A mass_dataset class obejct.

ms1.match.ppm

Precursor match ppm tolerance.

ms2.match.ppm

Fragment ion match ppm tolerance.

mz.ppm.thr

Accurate mass tolerance for m/z error calculation.

ms2.match.tol

MS2 match (MS2 similarity) tolerance.

fraction.weight

The weight for matched fragments.

dp.forward.weight

Forward dot product weight.

dp.reverse.weight

Reverse dot product weight.

remove_fragment_intensity_cutoff

remove_fragment_intensity_cutoff

rt.match.tol

RT match tolerance.

polarity

The polarity of data, "positive"or "negative".

ce

Collision energy. Please confirm the CE values in your database. Default is "all".

column

"hilic" (HILIC column) or "rp" (reverse phase).

ms1.match.weight

The weight of MS1 match for total score calculation.

rt.match.weight

The weight of RT match for total score calculation.

ms2.match.weight

The weight of MS2 match for total score calculation.

total.score.tol

Total score tolerance. The total score are referring to MS-DIAL.

candidate.num

The number of candidate.

database

MS2 database name or MS database.

threads

Number of threads

Value

A metIdentifyClass object.

See also

The example and demo data of this function can be found https://tidymass.github.io/metid/articles/metid.html

Author

Xiaotao Shen shenxt1990@outlook.com

Examples

if (FALSE) {
library(massdataset)
library(magrittr)
library(dplyr)
ms1_data =
  readr::read_csv(file.path(
    system.file("ms1_peak", package = "metid"),
    "ms1.peak.table.csv"
  ))

ms1_data = data.frame(ms1_data, sample1 = 1, sample2 = 2)

expression_data = ms1_data %>%
  dplyr::select(-c(name:rt))

variable_info =
  ms1_data %>%
  dplyr::select(name:rt) %>%
  dplyr::rename(variable_id = name)

sample_info =
  data.frame(
    sample_id = colnames(expression_data),
    injection.order = c(1, 2),
    class = c("Subject", "Subject"),
    group = c("Subject", "Subject")
  )
rownames(expression_data) = variable_info$variable_id

object = create_mass_dataset(
  expression_data = expression_data,
  sample_info = sample_info,
  variable_info = variable_info
)

object

data("snyder_database_rplc0.0.3", package = "metid")

database = snyder_database_rplc0.0.3

object1 =
  annotate_metabolites_mass_dataset(object = object,
                                    database = snyder_database_rplc0.0.3)
head(extract_annotation_table(object1))
}