knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  warning = FALSE,
  message = TRUE,
  out.width = "100%"
)

mass_data class object can also contain MS2 data.

Data preparation

mass_data class object

We need to create a mass_data class object first, see this document. And here we use the data from this step as examples.

load("feature_table/object_pos")
load("feature_table/object_neg")

MS2 data

The MS2 raw data should be converted to mgf format data. Please refer this document.

Here we use the demo data for tidymass, please download it and put it in the feature_table folder.

Download linke is here.

Then uncompress it.

Add MS2 to mass_dataset class object

Positive mode.

object_pos2 =
  mutate_ms2(
    object = object_pos,
    column = "rp",
    polarity = "positive",
    ms1.ms2.match.mz.tol = 10,
    ms1.ms2.match.rt.tol = 15,
    path = "feature_table/MS2_data/POS/"
  )

Negative mode.

object_neg2 =
  mutate_ms2(
    object = object_neg,
    column = "rp",
    polarity = "negative",
    ms1.ms2.match.mz.tol = 10,
    ms1.ms2.match.rt.tol = 15,
    path = "feature_table/MS2_data/NEG/"
  )

Session information

sessionInfo()


tidymass/massdataset documentation built on Jan. 30, 2024, 2:55 p.m.