diff --git a/guide/index.html b/guide/index.html index d263adb..10e6fdb 100755 --- a/guide/index.html +++ b/guide/index.html @@ -314,6 +314,24 @@ + + +
To export an MGF (Mascot Generic Format) file from MS-DIAL processing results, follow these steps:
+ +A) Peak list export +B) Alignment result export +C) Molecular spectrum networking export +D) Copy screenshot to clipboard (emf) +E) Parameter export (Tab-delimited text) F) Export as lipoquality database format +G) Export normalization result
+ +A) Peak list export: You can get the peak list information of each sample including retention time, m/z, MS/MS spectra information, and so on. Available formats are MSP, MGF or Text.
+Step1. Choose an export folder path. +Step2. Choose files which you want to export and click button "Add ->". +Step3. Select export format. +Step4. Click the export button.
+ +B) Alignment result export: You can get data matrix or spectral information.
+Step1. Choose an export folder path. +Step2. Choose an alignment file which you want to export. +Step3. Select export format if you want to export the representative spectra. +Step4. Click the export button.
+To export MS/MS data into an MGF (Mascot Generic Format) file from XCMS result, we can use the combineSpectra function. +For more details see the documentation of the consensusSpectrum function in the MSnbase R package. Refer this script to define +a function exportSpectraToMGF to convert the spectra data into MGF format.
+ exportSpectraToMGF <- function(spectra, file) {
+ mgf_data <- lapply(spectra, function(sp) {
+ list(
+ TITLE = paste("Scan", sp@scanIndex),
+ RTINSECONDS = sp@rtime,
+ PEPMASS = c(sp@precursorMz, sp@precursorIntensity),
+ CHARGE = sp@precursorCharge,
+ MZ = sp@mz,
+ INTENSITY = sp@intensity
+ )
+ })
+ con <- file(file, "w")
+ for (spectrum in mgf_data) {
+ cat("BEGIN IONS\n", file = con)
+ cat(paste("TITLE=", spectrum$TITLE, sep = ""), "\n", file = con)
+ cat(paste("RTINSECONDS=", spectrum$RTINSECONDS, sep = ""), "\n", file = con)
+ cat(paste("PEPMASS=", paste(spectrum$PEPMASS, collapse = " "), sep = ""), "\n", file = con)
+ cat(paste("CHARGE=", spectrum$CHARGE, sep = ""), "\n", file = con)
+ for (i in seq_along(spectrum$MZ)) {
+ cat(paste(spectrum$MZ[i], spectrum$INTENSITY[i], sep = " "), "\n", file = con)
+ }
+ cat("END IONS\n\n", file = con)
+ }
+ close(con)
+ }
+