Browse code

added support for ion mobility

Michael Witting authored on 05/11/2020 17:02:22
Showing 2 changed files

... ...
@@ -208,6 +208,12 @@ spectraVariableMapping <- function(format = c("Massbank")) {
208 208
            ms_source_temp = "AC$MASS_SPECTROMETRY: SOURCE_TEMPERATURE",
209 209
            ms_frag_mode = "AC$MASS_SPECTROMETRY: FRAGMENTATION_MODE",
210 210
 
211
+           # ims information
212
+           ims_instrument_type = "AC$ION_MOBILITY: INSTRUMENT_TYPE",
213
+           ims_drift_gas = "AC$ION_MOBILITY: DRIFT_GAS",
214
+           ims_drift_time = "AC$ION_MOBILITY: DRIFT_TIME",
215
+           ims_ccs = "AC$ION_MOBILITY: CCS",
216
+
211 217
            # ms information part II
212 218
            focus_base_peak = "MS$FOCUSED_ION: BASE_PEAK",
213 219
            focus_derivative_form = "MS$FOCUSED_ION: DERIVATIVE_FORM",
... ...
@@ -301,12 +301,12 @@
301 301
   ac$chrom_solvent <- as.list(substring(grep("AC$CHROMATOGRAPHY: SOLVENT", mb, value = TRUE, fixed = TRUE), 28))
302 302
   ac$chrom_transfer_temp <- substring(grep("AC$CHROMATOGRAPHY: TRANSFERLINE_TEMPERATURE", mb, value = TRUE, fixed = TRUE), 45)
303 303
 
304
-  # # analytical chemistry information, ion mobility
305
-  # # preparation for IMS update of MassBank format
306
-  # ac$ims_instrument_type <- substring(grep("AC$ION_MOBILITY: INSTRUMENT_TYPE", mb, value = TRUE, fixed = TRUE), 34)
307
-  # ac$ims_drift_gas <- substring(grep("AC$ION_MOBILITY: DRIFT_GAS", mb, value = TRUE, fixed = TRUE), 28)
308
-  # ac$ims_drift_time <- substring(grep("AC$ION_MOBILITY: DRIFT_TIME", mb, value = TRUE, fixed = TRUE), 29)
309
-  # ac$ims_ccs <- substring(grep("AC$ION_MOBILITY: CCS", mb, value = TRUE, fixed = TRUE), 22)
304
+  # analytical chemistry information, ion mobility
305
+  # preparation for IMS update of MassBank format
306
+  ac$ims_instrument_type <- substring(grep("AC$ION_MOBILITY: INSTRUMENT_TYPE", mb, value = TRUE, fixed = TRUE), 34)
307
+  ac$ims_drift_gas <- substring(grep("AC$ION_MOBILITY: DRIFT_GAS", mb, value = TRUE, fixed = TRUE), 28)
308
+  ac$ims_drift_time <- substring(grep("AC$ION_MOBILITY: DRIFT_TIME", mb, value = TRUE, fixed = TRUE), 29)
309
+  ac$ims_ccs <- substring(grep("AC$ION_MOBILITY: CCS", mb, value = TRUE, fixed = TRUE), 22)
310 310
 
311 311
   # analytical chemistry information, general ----------------------------------
312 312
   ac$general_conc <- substring(grep("AC$GENERAL: CONCENTRATION", mb, value = TRUE, fixed = TRUE), 27)
... ...
@@ -732,6 +732,10 @@ metaDataBlocks <- function() {
732 732
     "AC$CHROMATOGRAPHY: UOA_PREDICTED_RETENTION_TIME",
733 733
     "AC$CHROMATOGRAPHY: SOLVENT",
734 734
     "AC$CHROMATOGRAPHY: TRANSFERLINE_TEMPERATURE",
735
+    "AC$ION_MOBILITY: INSTRUMENT_TYPE",
736
+    "AC$ION_MOBILITY: DRIFT_GAS",
737
+    "AC$ION_MOBILITY: DRIFT_TIME",
738
+    "AC$ION_MOBILITY: CCS",
735 739
     "MS$FOCUSED_ION: BASE_PEAK",
736 740
     "MS$FOCUSED_ION: DERIVATIVE_FORM",
737 741
     "MS$FOCUSED_ION: DERIVATIVE_MASS",