Mutate MS2 spectra for each variable

mutate_ms2(
  object,
  column = c("rp", "hilic"),
  polarity = c("positive", "negative"),
  ms1.ms2.match.mz.tol = 15,
  ms1.ms2.match.rt.tol = 30,
  path = "."
)

Arguments

object

(required) mass_dataset class object.

column

rp or hilic.

polarity

positive or negative

ms1.ms2.match.mz.tol

default is 15 ppm.

ms1.ms2.match.rt.tol

default is 30 seconds.

path

work directory. In this path, please provide MS2 msp data.

Value

A mass_dataset object with new added ms2 data.

Author

Xiaotao Shen shenxt1990@outlook.com

Examples

if (FALSE) {
data("expression_data")
data("sample_info")
data("variable_info")
object =
  create_mass_dataset(
    expression_data = expression_data,
    sample_info = sample_info,
    variable_info = variable_info,
  )

object

dir.create("demo_data")
system.file("ms2_data", package = "metid")
file.copy(file.path(system.file("ms2_data", package = "massdataset"), "QC_MS2_NCE25_1.mgf"),
          to = "demo_data", overwrite = TRUE)

object =
  mutate_ms2(object = object, column = "rp", polarity = "positive")

object@ms2_data
}