R/identify_metabolites_for_multiple_database.R
identify_metabolite_all.Rd
identify_metabolite_all(ms1.data, ms2.data, parameter.list, path = ".")
The name of ms1 peak table (csv format). Column 1 is "name", column 2 is "mz" and column 3 is "rt" (second).
MS2 data, must be mgf, msp or mzXML format. For example, ms2.data = c("test.mgf", "test2.msp").
A list contains paramters for each processing. The parameter must get using metIdentifyParam or mzIdentifyParam.
Work directory.
A list containing mzIdentifyClass object.
The example and demo data of this function can be found https://jaspershen.github.io/metID/articles/multiple_databases.html
if (FALSE) {
##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]]
}