How to do it...

Converting MS formats to move data between tools can be done using the following steps:

  1. Load the library and import the source data file:
library(mzR)
mzxml_file <- file.path(getwd(), "datasets", "ch6", "threonine_i2_e35_pH_tree.mzXML")
mzdata <- openMSfile(mzxml_file)
  1. Extract the header and peak data:
header_info <- header(mzdata)
peak_data_list <- spectra(mzdata)
  1. Write the data into a new format file:
writeMSData(peak_data_list, 
file.path(getwd(), "datasets", "ch6", "out.mz"),
header = header_info,
outformat = "mzml",
rtime_seconds = TRUE
)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.192.79