Although originally developed for high resolution LC-MS/MS data, CluMSID can also be used to find similarities in GC-EI-MS data, i.e. data from hard ionisation mass spectrometry.
As the peak picking and spectral merging differs considerably from data dependent ESI-MS/MS, we cannot use the standard
mergeMS2spectra(). In fact, the analysis of mass spectra from hard ionisation mass spectrometry resembles the one of MS1 pseudospectra in ESI-MS. Thus, we can use the CluMSID function
extractPseudospectra() in conjunction with pseudspectra generated by the
CAMERA sometimes have difficulties in handling GC-EI-MS data, we use the
metaMS package that enables workflows specialised to the analysis of such data. We also require the
metaMSdata package from which we import the
FEMSsettings object that contains
CAMERA settings for GC-EI-MS data.
As example data, we use GC-EI-MS metabolomics data from pooled cell extracts of Pseudomonas aeruginosa measured on a Thermo Scientific ITQ linear ion trap that has been converted to netCDF using Thermo Xcalibur. A netCDF file is available in the
To generate a list of (pseudo)spectra, we first need an xsAnnotate object as generated by
CAMERA. In the case of GC-MS data, it is more convenient to use to use the
runCAMERA() than actual
metaMS::runCAMERA requires an
xcmsSet object which we generate by using
xcms::xcmsSet on our netCDF file (we can do that in one go). We used standard GC-MS settings for
runCAMERA() as they are proposed in the
xsAnnotate object, we can now extract the (pseudo)spectra using the
extractPseudospectra() function as we would do for MS1 pseudospectra from LC-ESI-MS data.
Adding annotations is not as easy as with LC-(DDA-)MS/MS data, because only the retention time and the spectrum itself describe the feature and no precursor m/z is available. Thus, feature annotations/identifications made in a different programme, in this case MetaboliteDetector, have to be compared to the spectra in the
Like with LC-(DDA-)MS/MS data, we can use
addAnnotations() to add external annotations. The table output from
writeFeaturelist() will give
NA for all precursor m/z.
To facilitate manual annotation, it helps to plot the spectra along with the relevant information for every feature/pseudospectrum. That can be done by CluMSID’s
In this example, we load the list of feature annotations from
This list of spectra in turn serves as an input for
distanceMatrix(). As we are dealing with low resolution data, we have to adjust the m/z tolerance. The default value, 10ppm, is suitable for time-of-flight mass spectrometers while linear ion traps or single quadrupoles which are commonly used in GC-EI-MS only have unit mass resolution, equivalent to a relative mass error of 0.02 to 0.001 depending on the m/z of the analyte. We chose 0.02 to be tolerant enough for low molecular weight analytes:
Starting from this distance matrix, we can use all the data exploration functions that
CluMSID offers. In this example workflow, we look at a cluster dendrogram:
It is directly visible that the resulting clusters are not as dense as with the LC-MS/MS example data. In turn, there are more between-cluster similarities. This also shows in the correlation network, resulting in a chaotic plot when used with the default minimal similarity of
networkplot(pseudodistmat, highlight_annotated = TRUE, show_labels = TRUE, exclude_singletons = TRUE)
By choosing a higher similarity threshold of e.g.
0.4, it is far easier to identify clusters:
networkplot(pseudodistmat, highlight_annotated = TRUE, show_labels = TRUE, exclude_singletons = TRUE, min_similarity = 0.4)
Presumably, the high between-cluster similarities are due to the low resolution data and the resulting fact, that fragment with different chemical composition but same unit resolution mass cannot be distinguished.
We can also use hierarchical clustering to identify clusters of similar (pseudo-)spectra. Here, too, we have to adjust
h to account for higher between-cluster similarities:
We see that e.g. octadecanoic acid, hexadecanoic acid and dodecanoic acid form a nice cluster as well as the phosphorate containing metabolites phosphoenolpyruvic acid, glyceric acid-3-phosphate, glycerol-3-phosphate and phosphoric acid itself. It is also apparent that some features have a similarity of 1 and could therefore represent the same compound, like e.g. the features 98, 67 and 72. Those three features cluster together with AMP and UMP, suggesting that they could be related to nucleotides.
To illustrate the use of CluMSID’s accessory function with this type of data, we take another look at nucleotides: A signature fragment for nucleotides in GC-EI-MS is m/z 315 that derives from pentose-5-phosphates. We see this fragment in Figure 1, the spectrum of UMP (derivatised with 5 TMS groups). We can use findFragment to see if there are more spectra outside the cluster that freature this fragment. As we deal with unit masses, we would like to find m/z of 315 +/- 0.5 which we can do by setting
tolerance = 0.5/315:
fragmentlist <- findFragment(apslist, mz = 315, tolerance = 0.5/315) #> 6 spectra were found that contain a fragment of m/z 315 +/- 1587.30158730159 ppm. vapply(X = fragmentlist, FUN = accessID, FUN.VALUE = integer(1)) #>  2 14 20 21 27 35
We find four more spectra that contain a 315 fragment that could be investigated closer.
In conclusion, every annotation method is extremely limited if only low resolution data is available and so is CluMSID. Still, we see that the tool works independently of chromatography and mass spectrometry method and even has the potential to give some good hints for feature annotation in GC-EI-MS metabolomics.
sessionInfo() #> R version 4.2.0 RC (2022-04-19 r82224) #> Platform: x86_64-pc-linux-gnu (64-bit) #> Running under: Ubuntu 20.04.4 LTS #> #> Matrix products: default #> BLAS: /home/biocbuild/bbs-3.15-bioc/R/lib/libRblas.so #> LAPACK: /home/biocbuild/bbs-3.15-bioc/R/lib/libRlapack.so #> #> locale: #>  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C #>  LC_TIME=en_GB LC_COLLATE=C #>  LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 #>  LC_PAPER=en_US.UTF-8 LC_NAME=C #>  LC_ADDRESS=C LC_TELEPHONE=C #>  LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C #> #> attached base packages: #>  stats4 stats graphics grDevices utils datasets methods #>  base #> #> other attached packages: #>  metaMSdata_1.31.0 metaMS_1.32.0 CAMERA_1.52.0 #>  xcms_3.18.0 MSnbase_2.22.0 ProtGenerics_1.28.0 #>  S4Vectors_0.34.0 mzR_2.30.0 Rcpp_22.214.171.124 #>  BiocParallel_1.30.0 Biobase_2.56.0 BiocGenerics_0.42.0 #>  CluMSIDdata_1.11.0 CluMSID_1.12.0 #> #> loaded via a namespace (and not attached): #>  backports_1.4.1 Hmisc_4.7-0 #>  plyr_1.8.7 igraph_1.3.1 #>  lazyeval_0.2.2 splines_4.2.0 #>  GenomeInfoDb_1.32.0 ggplot2_3.3.5 #>  digest_0.6.29 foreach_1.5.2 #>  htmltools_0.5.2 fansi_1.0.3 #>  magrittr_2.0.3 checkmate_2.1.0 #>  cluster_2.1.3 doParallel_1.0.17 #>  limma_3.52.0 sna_2.6 #>  matrixStats_0.62.0 MsFeatures_1.4.0 #>  jpeg_0.1-9 colorspace_2.0-3 #>  xfun_0.30 dplyr_1.0.8 #>  crayon_1.5.1 RCurl_1.98-1.6 #>  jsonlite_1.8.0 graph_1.74.0 #>  impute_1.70.0 survival_3.3-1 #>  iterators_1.0.14 ape_5.6-2 #>  glue_1.6.2 gtable_0.3.0 #>  zlibbioc_1.42.0 XVector_0.36.0 #>  DelayedArray_0.22.0 DEoptimR_1.0-11 #>  scales_1.2.0 vsn_3.64.0 #>  DBI_1.1.2 GGally_2.1.2 #>  viridisLite_0.4.0 htmlTable_2.4.0 #>  clue_0.3-60 foreign_0.8-82 #>  preprocessCore_1.58.0 Formula_1.2-4 #>  MsCoreUtils_1.8.0 htmlwidgets_1.5.4 #>  httr_1.4.2 gplots_3.1.3 #>  RColorBrewer_1.1-3 ellipsis_0.3.2 #>  farver_2.1.0 pkgconfig_2.0.3 #>  reshape_0.8.9 XML_3.99-0.9 #>  nnet_7.3-17 sass_0.4.1 #>  utf8_1.2.2 tidyselect_1.1.2 #>  rlang_1.0.2 munsell_0.5.0 #>  tools_4.2.0 cli_3.3.0 #>  dbscan_1.1-10 generics_0.1.2 #>  statnet.common_4.5.0 evaluate_0.15 #>  stringr_1.4.0 fastmap_1.1.0 #>  mzID_1.34.0 yaml_2.3.5 #>  knitr_1.38 robustbase_0.95-0 #>  caTools_1.18.2 purrr_0.3.4 #>  RANN_2.6.1 ncdf4_1.19 #>  RBGL_1.72.0 nlme_3.1-157 #>  compiler_4.2.0 rstudioapi_0.13 #>  plotly_4.10.0 png_0.1-7 #>  affyio_1.66.0 MassSpecWavelet_1.62.0 #>  tibble_3.1.6 bslib_0.3.1 #>  stringi_1.7.6 highr_0.9 #>  lattice_0.20-45 Matrix_1.4-1 #>  vctrs_0.4.1 pillar_1.7.0 #>  lifecycle_1.0.1 BiocManager_1.30.17 #>  jquerylib_0.1.4 MALDIquant_1.21 #>  data.table_1.14.2 bitops_1.0-7 #>  GenomicRanges_1.48.0 R6_2.5.1 #>  latticeExtra_0.6-29 pcaMethods_1.88.0 #>  affy_1.74.0 network_1.17.1 #>  KernSmooth_2.23-20 gridExtra_2.3 #>  IRanges_2.30.0 codetools_0.2-18 #>  MASS_7.3-57 gtools_3.9.2 #>  assertthat_0.2.1 SummarizedExperiment_1.26.0 #>  GenomeInfoDbData_1.2.8 parallel_4.2.0 #>  grid_4.2.0 rpart_4.1.16 #>  tidyr_1.2.0 coda_0.19-4 #>  rmarkdown_2.14 MatrixGenerics_1.8.0 #>  base64enc_0.1-3