identify_metabolite_all: Identify metabolites using multiple databases one time

View source: R/identify_metabolites_for_multiple_database.R

identify_metabolite_allR Documentation

Identify metabolites using multiple databases one time

Description

Identify metabolites using multiple databases one time. \lifecyclematuring

Usage

identify_metabolite_all(ms1.data, ms2.data, parameter.list, path = ".")

Arguments

ms1.data

The name of ms1 peak table (csv format). Column 1 is "name", column 2 is "mz" and column 3 is "rt" (second).

ms2.data

MS2 data, must be mgf, msp or mzXML format. For example, ms2.data = c("test.mgf", "test2.msp").

parameter.list

A list contains paramters for each processing. The parameter must get using metIdentifyParam or mzIdentifyParam.

path

Work directory.

Value

A list containing mzIdentifyClass object.

Author(s)

Xiaotao Shen shenxt1990@163.com

See Also

The example and demo data of this function can be found https://jaspershen.github.io/metID/articles/multiple_databases.html

Examples

## Not run: 
##creat a folder nameed as example
path <- file.path(".", "example")
dir.create(path = path, showWarnings = FALSE)

##get MS1 peak table from metID
ms1_peak <- system.file("ms1_peak", package = "metID")
file.copy(
  from = file.path(ms1_peak, "ms1.peak.table.csv"),
  to = path,
  overwrite = TRUE,
  recursive = TRUE
)

##get MS2 data from metID
ms2_data <- system.file("ms2_data", package = "metID")
file.copy(
  from = file.path(ms2_data, "QC1_MSMS_NCE25.mgf"),
  to = path,
  overwrite = TRUE,
  recursive = TRUE
)

##get databases from metID
database <- system.file("ms2_database", package = "metID")

file.copy(
  from = file.path(
    database,
    c(
      "msDatabase_rplc0.0.2",
      "orbitrapDatabase0.0.1",
      "hmdbMS1Database0.0.1"
    )
  ),
  to = path,
  overwrite = TRUE,
  recursive = TRUE
)
param1 <-
identify_metabolites_params(
  ms1.match.ppm = 15,
  rt.match.tol = 15,
  polarity = "positive",
  ce = "all",
  column = "rp",
  total.score.tol = 0.5,
  candidate.num = 3,
  threads = 3,
  database = "msDatabase_rplc0.0.2"
)

param2 <- identify_metabolites_params(
  ms1.match.ppm = 15,
  rt.match.tol = 15,
  polarity = "positive",
  ce = "all",
  column = "rp",
  total.score.tol = 0.5,
  candidate.num = 3,
  threads = 3,
  database = "orbitrapDatabase0.0.1"
)

param3 <- identify_metabolites_params(
  ms1.match.ppm = 15,
  rt.match.tol = 15,
  polarity = "positive",
  ce = "all",
  column = "rp",
  total.score.tol = 0.5,
  candidate.num = 3,
  threads = 3,
  database = "hmdbMS1Database0.0.1"
)
result <- identify_metabolite_all(
ms1.data = "ms1.peak.table.csv",
ms2.data = "QC1_MSMS_NCE25.mgf",
parameter.list = c(param1, param2, param3),
path = path
)
result[[1]]
result[[2]]
result[[3]]

## End(Not run)

jaspershen/metID documentation built on July 31, 2022, 11:31 p.m.