Exports the MS2 data contained in a mass_dataset object to files.
The files can be in MGF or MSP format.
Usage
export_ms2_data(object, file_type = c("mgf", "msp"), path = ".")Value
No return value. The function writes MS2 data files to disk. Returns NULL and a warning if no MS2 data is present in the object.
Author
Xiaotao Shen xiaotao.shen@outlook.com
Examples
if (FALSE) { # \dontrun{
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 <- mutate_ms2(
object = object,
column = "rp",
polarity = "positive",
path = system.file("ms2_data", package = "massdataset")
)
export_ms2_data(object, file_type = "mgf", path = tempdir())
} # }
