Skip to contents

The MassSpecEngine R6 class is a framework for parsing, processing and inspecting mass spectrometry (MS) data. The engine has MassSpec as data type. The Analyses active field has class MassSpecAnalyses, where MS data (i.e., spectra and chromatograms, including chromatograms produced by UV detection) can be loaded from mzML and mzXML. See methods MassSpecAnalyses for more details. If msconvert from ProteoWizard is installed and found via CLI (i.e., must be added to the environmental variables), the engine can also load vendor formats (i.e., Agilent MassHunter .d, Thermo Scientific RAW, Shimadzu LCD (except ITOF), Sciex WIFF /WIFF2) by direct conversion to mzML. Note that conversion of vendor formats is only possible under Windows OS. The results active field is a list that can hold the classes: MassSpecResults_NonTargetAnalysis, MassSpecSpectra and Chromatograms. Note that the MassSpecEngine is a subclass of Engine and inherits all methods from the parent class.

Note

The MassSpecEngine is using several patRoon assets for assembly of Non-Target Analysis (NTA) data processing workflows.

References

Helmus R, ter Laak TL, van Wezel AP, de Voogt P, Schymanski EL (2021). “patRoon: open source software platform for environmental mass spectrometry based non-target screening.” Journal of Cheminformatics, 13(1). doi:10.1186/s13321-020-00477-w .

Helmus R, van de Velde B, Brunner AM, ter Laak TL, van Wezel AP, Schymanski EL (2022). “patRoon 2.0: Improved non-target analysis workflows including automated transformation product screening.” Journal of Open Source Software, 7(71), 4029. doi:10.21105/joss.04029 .

Kapoulkine A (2022). “pugixml 1.13: Light-weight, simple and fast XML parser for C++ with XPath support.” Copyright (C) 2006-2018. http://pugixml.org.

Kessner D, Chambers M, Burke R, Agus D, Mallick P (2008). “ProteoWizard: open source software for rapid proteomics tools development.” Bioinformatics, 24(21), 2534–2536. doi:10.1093/bioinformatics/btn323 , http://www.ncbi.nlm.nih.gov/pubmed/18606607.

Chambers MC, Maclean B, Burke R, Amodei D, Ruderman DL, Neumann S, Gatto L, Fischer B, Pratt B, Egertson J, Hoff K, Kessner D, Tasman N, Shulman N, Frewen B, Baker TA, Brusniak M, Paulse C, Creasy D, Flashner L, Kani K, Moulding C, Seymour SL, Nuwaysir LM, Lefebvre B, Kuhlmann F, Roark J, Rainer P, Detlev S, Hemenway T, Huhmer A, Langridge J, Connolly B, Chadick T, Holly K, Eckels J, Deutsch EW, Moritz RL, Katz JE, Agus DB, MacCoss M, Tabb DL, Mallick P (2012). “A cross-platform toolkit for mass spectrometry and proteomics.” Nature Biotechnology, 30(10), 918–920. https://doi.org/10.1038/nbt.2377.

See also

Engine for the parent class.

Engine

Super class

StreamFind::Engine -> MassSpecEngine

Active bindings

MassSpecResults_NonTargetAnalysis

Get/Set for the MassSpecResults_NonTargetAnalysis results class.

MassSpecResults_Spectra

Get/set for the MassSpecResults_Spectra results class.

MassSpecResults_Chromatograms

Get/set for the MassSpecResults_Chromatograms results class.

Methods

Inherited methods


Method new()

Creates an R6 MassSpecEngine class object.

Usage

MassSpecEngine$new(
  metadata = NULL,
  workflow = NULL,
  analyses = NULL,
  centroid = FALSE,
  levels = c(1, 2)
)

Arguments

metadata

A named list or a Metadata object. Each list element must have length one. There is no type restrictions except for name (must be type character), author (must be type character) and date (must be class POSIXct or POSIXt). A file entry must be a character string with a full path to a file.

workflow

A Workflow object, a list of ProcessingStep objects or a character string with a full path to a rds or json file containing a Workflow.

analyses

A MassSpecAnalyses class object or a character vector with full file paths to mzML files or a data.frame with colnames: "file", "replicate" and "blank". The "replicate" column is used to group the analyses and the "blank" column is used to identify the blank samples. The "file" column is the full path to the mzML files. If msconvert from ProteoWizard is installed and found via CLI (i.e., must be added to the environmental variables), the engine can also load vendor formats (i.e., Agilent MassHunter .d, Thermo Scientific RAW, Shimadzu LCD (except ITOF), Sciex WIFF / WIFF2) by direct conversion to mzML. Note that conversion of vendor formats is only possible under Windows OS.

centroid

Logical (length 1). Set to TRUE to centroid data when converting from vendor formats to mzML.

levels

Numeric vector with the MS levels to consider when centroiding data. Default is c(1, 2).

Returns

A new MassSpecEngine class object.


Method add_analyses()

Adds analyses. Note that when adding new analyses, any existing results are removed.

Usage

MassSpecEngine$add_analyses(analyses = NULL)

Arguments

analyses

A character vector with full file paths to mzML/mzXML files. f msconvert from ProteoWizard is installed and found via CLI (i.e., must be added to the environmental variables), the engine can also load vendor formats (i.e., Agilent MassHunter .d, Thermo Scientific RAW, Shimadzu LCD (except ITOF), Sciex WIFF/WIFF2) by direct conversion to mzML. Note that conversion of vendor formats is only possible under Windows OS.


Method remove_analyses()

Removes analyses.

Usage

MassSpecEngine$remove_analyses(analyses = NULL)

Arguments

analyses

Character or numeric vector with names or indexes of analyses in the Analyses object.


Method set_replicate_names()

Set replicate names to the analysis, using a character vector with the same length as the number of analyses.

Usage

MassSpecEngine$set_replicate_names(value)

Arguments

value

An object that highly depends on the method. Check the specific method documentation for details.


Method set_blank_names()

Set blank names to the analysis, using a character vector with the same length as the number of analyses. Note that the names must be one of the replicate names.

Usage

MassSpecEngine$set_blank_names(value)

Arguments

value

An object that highly depends on the method. Check the specific method documentation for details.


Method get_analysis_names()

Gets a character vector with the analysis replicate names.

Usage

MassSpecEngine$get_analysis_names(analyses = NULL)

Arguments

analyses

Character or numeric vector with names or indexes of analyses in the Analyses object.


Method get_replicate_names()

Gets a character vector with the analysis replicate names.

Usage

MassSpecEngine$get_replicate_names(analyses = NULL)

Arguments

analyses

Character or numeric vector with names or indexes of analyses in the Analyses object.


Method get_blank_names()

Gets a character vector with the analysis blank replicate names.

Usage

MassSpecEngine$get_blank_names(analyses = NULL)

Arguments

analyses

Character or numeric vector with names or indexes of analyses in the Analyses object.


Method get_files()

Gets a character vector with the full file paths of each analysis.

Usage

MassSpecEngine$get_files(analyses = NULL)

Arguments

analyses

Character or numeric vector with names or indexes of analyses in the Analyses object.


Method clone()

The objects of this class are cloneable with this method.

Usage

MassSpecEngine$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.