Skip to main content
NIST Author Manuscripts logoLink to NIST Author Manuscripts
. Author manuscript; available in PMC: 2025 Jun 5.
Published in final edited form as: J Am Soc Mass Spectrom. 2024 May 5;35(6):1282–1291. doi: 10.1021/jasms.4c00073

A Portable and Reusable Database Infrastructure for Mass Spectrometry, and Its Associated Toolkit (The DIMSpec Project)

Jared M Ragland 1,2, Benjamin J Place 3
PMCID: PMC11153045  NIHMSID: NIHMS1994613  PMID: 38704738

Abstract

Nontargeted analysis (NTA) is a rapidly growing field of techniques that includes the identification of unknown chemical analytes in complex mixtures such as environmental, biological, and food matrices. The use of reference mass spectral databases is a key component of most NTA workflows, providing a high level of confidence for chemical identification when analytical standards are not available, yet effective interlaboratory sharing of research grade spectra remains challenging. The Database Infrastructure for Mass Spectrometry (DIMSpec) project focused on the creation of an open-source toolkit supporting storage and sharing of high-resolution mass spectra with attached sample and methodological metadata. As a demonstration of its utility, the DIMSpec toolkit was used to create a database of curated mass spectra for per- and polyfluoroalkyl substances (PFAS) generated from various sources. While the underlying toolkit is agnostic to analytical targets, this initial release (along with the database schema, mass spectral data, and database tools) should enable PFAS researchers to use these data for their own studies, including the identification of novel PFAS in the environment.

Graphical Abstract

graphic file with name nihms-1994613-f0008.jpg

INTRODUCTION

Nontargeted analysis (NTA) describes a broad set of advanced techniques aimed at characterizing the chemical composition of a material using high-resolution mass spectrometry (HRMS).1 A component of many NTA workflows is the identification of individual chemical compounds through the combination of HRMS data with computational tools and reference databases to focus efforts on the unknown components. Use of mass spectral libraries or databases is essential for confident identification and reporting of analytical chemistry measurands, whether they be environmental contaminants or novel compounds. Toward that end the U.S. National Institute of Standards and Technology (NIST) provides a series of mass spectral libraries in use at analytical research, development, and contracting laboratories. Even when analytes are “known” (i.e., mass spectral properties have been measured and reported in the literature) different extraction and measurement methods may show slight differences in mass spectral properties, particularly in fragmentation ratios or adduct formation. The gold standard for matching mass spectra is use of a library of mass spectral standards or purified solutions, yet such standards are available only for a small fraction of “known” analytes (Figure 1) and often carry methodological caveats.

Figure 1.

Figure 1.

Compounds with analytical standards comprise only a small fraction of chemical space (cartoon).

For analyte classes studied for decades (e.g., polychlorinated biphenyls, pesticides, etc.), such “known” analytes are generally well covered by analytical standards. This is not the case for analyte classes of more recent interest, such as per- and polyfluorinated alkyl substances (PFAS). Research needs generally run ahead of analytical standard availability. While suspect screening analysis (SSA), where a list of known mass-to-charge values is used to screen data, can be based on theoretical or previously observed data, paradigms such as NTA are necessary to establish analyte identity via mass spectral properties of both the analyte itself and its fragmentation patterns. Analytes characterized in this fashion can then be published for identification in other methods and laboratories. However, methods for directly distributing such in a reusable peer-to-peer fashion lag behind research needs. While efforts to address this are emerging24 and support for interoperability of individual data files is improving5 and continues to grow, there continue to be significant needs to improve sharing and reuse of research grade mass spectral libraries for small molecule research.

Here, we describe an open-source toolkit produced by the NIST Chemical Sciences Division to capture in a formal manner and, perhaps more importantly, use and exchange data from HRMS experiments intended to support NTA projects of environmental interest. The main analytical target for development was small molecules for environmental metrology (e.g., persistent, bioaccumulative, and toxic contaminants), but utility likely exists outside that area. The Database Infrastructure for Mass Spectrometry (DIMSpec) toolkit allows for the creation of portable databases that tie experimental mass spectra with sample and methodological metadata. Currently, these are tied to data structures optimized around chromatographic peaks, ideally where analytes have been identified and resulting fragments have been annotated, storing data at the MS1 and MS2 levels. All data for a given peak are retained for a given scan time; however, supporting storage of MSn data as well as unidentified and unannotated peaks to support data mining, as such, annotations are tied separately from storage of mass spectral data. It uses SQLite3, a common portable database engine, for data storage and a collected set of data management and NTA tools written in the R programming language. This includes the ability to rapidly iterate and launch new databases supporting a particular project, analyte class of interest, or research program and results in a single database file that may be shared widely with few technical restrictions on resulting uses. With the associated toolkit, researchers can leverage some of the NTA tools in active use at NIST for quality assurance and identification of analytes and fragments using current state-of-the-science techniques and to record their data in a format easily shared across the research community. Conceptually, DIMSpec uses a cyclical process for data capture, processing, and use (Figure 2) where newly identified analytes of interest are continually added to a given library for identification in future samples.

Figure 2.

Figure 2.

Conceptual graph of the DIMSpec process for data management and use.

Data collected in the modern age should seek to adhere to the FAIR principles.6 These outline a series of guidelines and goals modern data products can and should adopt to improve impact, sharing, and future use of data, emphasizing machine-actionability requiring little or no human intervention. Technical implementation guidelines are still under development, but the goal is to create modern data artifacts that are “Findable”, “Accessible”, “Interoperable”, and “Reusable”. In a modern data landscape dominated by search engines and online data warehouses, adherence to these principles decreases the likelihood of data being consigned to the dust bin of irrelevance through obfuscation or illegibility. Many efforts over the past decade have focused on making data findable and accessible through data warehouse platforms such as government outlets (e.g., https://www.data.gov and the NIST Science Data Portal (https://data.nist.gov/sdp) or online searchable repositories and registries [e.g., Kaggle (https://www.kaggle.com/), Google Data set Search (https://datasetsearch.research.google.com/), Registry of Open Data (https://registry.opendata.aws/), and Data World (https://data.world/datasets/open-data)], among others. Individual disciplines also have a variety of public data repositories; the NORMAN Network (https://www.norman-network.com/nds), MassBank of North America (https://mona.fiehnlab.ucdavis.edu/), and the USEPA CompTox Dashboard (https://comptox.epa.gov/dashboard) are all examples that include curated mass spectrometry data.

Most data sources are accessed through public facing web interfaces or application programming interfaces (APIs), providing a convenient, yet largely static, method of obtaining or interacting with underlying data. Such hosted solutions scale easily but often lack easy access to granular metadata regarding the context of how spectra were generated, which can be important for NTA. Such solutions are also limited to features present in the user interface and require providers to actively curate both data and data interaction features. The approach presented here focuses instead on retaining as much context as possible and providing a local implementation for direct interaction. Additionally, other databases curate underlying data to differing degrees prior to serving it through their interfaces, while the DIMSpec toolkit includes the DIMSpec-QC application (described below), allowing users to directly screen their annotations for common data entry errors; quality assessment results are then attached directly to spectra. The goal again is providing context rather than restriction. It is hoped these aspects combine to support and empower research teams at the bench and allow easier peer-to-peer distribution of smaller, more focused data sets to enhance collaboration. DIMSpec aims not to provide any given database as a single source of truth but rather to enable research groups to produce fit-for-purpose in-house databases that are contextually aware.

Tool sets for HRMS-based NTA have proliferated similarly [see several Bioconductor (https://bioconductor.org) packages, e.g., patRoon7 and RMassBank8]; some also use SQLite3 as a data container [e.g., ProteoWizard’s BiblioSpec (https://skyline.ms/project/home/software/BiblioSpec/begin.view)]. The “-omics” disciplines benefit heavily from many years of ongoing mass spectral data standards development (e.g., see mzSpecLib and mzPAF for in-progress standards) after needs similar to those outlined here were identified over a decade ago. Frank et al.9 and Lam10 laid out a similar need for proteomics, and, shortly after, Griss et al.11 highlighted the powerful impact shareable data sets and standards could have. The same needs and visions are now recognized in the small molecule space with an emphasis on NTA1 to address environmental contaminants of emerging concern.

Proliferation of tool sets combined with increased accessibility to high-resolution mass spectrometers has given rise to an abundance of often heavily customized workflows in the small molecule space. To provide flexibility for existing workflows and tool sets, the DIMSpec toolkit is focused on the creation of portable databases intended for easy distribution and does not recommend any particular workflow or standard at this time, save conversion of raw data into the well-established .mzML12 format. Rather, design criteria behind DIMSpec focused on file size minimization for portability and annotation of critical contextual metadata about how data were generated and the samples from which those data were produced.

Data collected as part of NTA (or other mass spectrometry) projects can quickly require multigigabyte levels of storage in raw form. Despite a wealth of data produced, the breadth of techniques and analytical platforms makes direct interoperability (the “I” in FAIR) difficult, to say the least. Schema crosswalk between data format standards is desirable; as SQLite files, DIMSpec databases should be easily exportable to any existing or future standard. Making those data truly reusable (the “R” in FAIR) requires adequate metadata regarding experimental conditions, sample properties, and data provenance. Two recent contributions toward increasing reusability in the context of NTA for PFAS include the need for consistent communication of analyte identity13 and communication of confidence in analyte or fragment identification through controlled vocabulary.14 To address those two examples, the DIMSpec schema provides a comprehensive alias list, including machine-interpretable structure notation (e.g., SMILES, InChI, etc.) and external identifiers (e.g., CompTox DTXCID), and a normalization table (a database engineering term roughly analogous to “lookup table” that improves both data fidelity and performance) for confidence. Optionally, given a single machine-interpretable structure notation, the DIMSpec toolkit includes the ability to generate other machine-interpretable formats that can be used as additional identifiers.

Research programs in quickly expanding areas (e.g., PFAS) often collect high-quality data, yet, despite prevalent online sharing resources, face difficulties in making their data publicly available. An internally consistent and rapidly iterable storage mechanism should not only accelerate research but also facilitate inclusion in data repositories and registries. As the DIMSpec tool set creates portable databases, these can be reused quickly within any research area, and institutions can choose when and at which level to engage dissemination, including direct peer-to-peer dissemination as an option. Widespread use should therefore lower barriers to data storage and sharing without sacrificing the needs of individual research groups. Consistency allows individual research groups to more easily leverage institutional strategies to make data findable and accessible. As DIMSpec does not propose a new data sharing standard but rather provides a toolkit built around a data container, import from and export to any current or future discipline-specific data standard is possible. Import routines can be custom built to fit different data workflows, normalization tables can apply any controlled vocabulary necessary, and export routines can likewise supply data to any number of repositories or formats, resulting in improved interoperability and reusability. Needs for both users and developers were considered during development. For many users, using an established DIMSpec database to identify analytes and fragments requires only local installation and use of a provided web application (MSMatch). For developers and data managers, the tool set includes flexible component customizations such as network hosting options, rapid integration of other NTA workflows written in R and Python, and an API.

In summary, the DIMSpec project seeks to improve data sharing among research groups by providing a toolkit to rapidly establish, populate, and evaluate portable databases of HRMS for small molecules; these are easily interchangeable between groups using the toolkit. It is currently targeted at NTA projects for environmental contaminants but is agnostic to analyte class. Included are web interfaces for schema exploration, quality control assessment of MS2 annotations, and mass spectra matching at the MS1 and MS2 levels. A template application in the “shiny” framework is included to quickly build new applications as needed. These are built on a provided API and include the ability to host both web applications and the API on internal networks if desired, making data held in such databases available to entire research groups and collaborators. Data sets held in DIMSpec databases can provide extensive metadata describing instrumentation settings, sample descriptions, and contributor information. Furthermore, these benefit from data size reduction greater than 99% compared with the .mzML format and such databases are completely portable, allowing for easy publication or direct peer-to-peer sharing for collaboration. Compared with existing data banks of HRMS data, DIMSpec is an infinitely extensible self-contained toolkit, can be installed on network-isolated instrumentation, and can be integrated into existing data workflows. As a local-first toolkit, it also is not limited to features and data available from larger public facing data repositories and can be completely controlled by the research groups using it, easing any concerns around proprietary data and when to publish data under review.

We believe strongly in the public availability of and open access to research data and tools. Our hope is that the tool set described here can be of use in moving the environmental NTA research community toward practices that will facilitate sharing and reuse of such data, moving toward alignment with the FAIR principles.6 Additionally, interest in leveraging machine-learning tools is expanding rapidly and requires some degree of standardization tying adequate metadata to analytical data for each discipline; that need is broadly understood to become even more critical in the near future. Toward that end, the DIMSpec project uses only readily available, stable, open-source products to provide a portable and reusable infrastructure around commonly used frameworks, in this case R, Python, and SQLite.

METHODS

A full user guide for the DIMSpec project is available as a webbook (https://pages.nist.gov/dimspec/docs). It will be updated as the project develops and serves as the definitive “how to” on using the DIMSpec toolkit. The following sections serve as an introduction to the project providing context for evaluation of DIMSpec use cases among stakeholders.

Database Schema.

Schema are defined in a series of scripts in standard query language (SQL) and structured in a series of “nodes”, increasing flexibility and extensibility. Each node file defines the tables and views necessary to store and serve data for a set of conceptually related entities in the database. A data dictionary is available as a .json file describing all tables and views in the current schema for programmatic navigation, and an entity relationship diagram is available for visual navigation.15 An opinionated comment decoration scheme is used to facilitate translatability to R. See the DIMSpec User Guide for more details on the comment decorations and how these are read and interpreted by database communication functions. These allow for an R session to interpret the schema and provide programmatic access for certain operations.

Currently there are 4 main nodes in the database. The analyte node contains identifying information for chemical entity identification (both analyte and fragment) resolution including machine actionable structure expressions. To establish a chain of attribution, each contribution to a DIMSpec database stores information identifying the data contributor. Instrument settings can have a large impact on produced data, and so settings are described in the methods node; support is provided to describe not only the mass spectrometer but also chromatographic conditions. It abstracts methods to discrete combinations of analytical instrument settings, implicitly grouping data to particular data collection conditions. The data node contains all information about samples used to generate results, peaks generated from those samples, mass spectral data recorded from those peaks, and related expressions of identification confidence and quality control measures. Nodes are tied together through foreign keys and linkage tables. A supplementary reference node includes tables for basic use such as installation ID (set when a database is built, easily updateable if necessary), chemical element information, logs, etc. There is no practical limit to the number of views that can be added combining these nodes or to additional tables extending the database schema. Researchers are encouraged to contact the authors at pfas@nist.gov with extensions to either the database schema or the attached toolkit that add value and merit inclusion in the project.

Data Population.

As SQLite files, DIMSpec databases may be read or populated by almost any data processing workflow. At this time, DIMSpec does not include a CRUD (create, read, update, delete) GUI application; direct manipulation of the database can be accomplished through the user’s choice of database interface software. Additionally, as DIMSpec is intended to be a portable and reusable database, no publicly available interfaces are hosted by NIST at this time; the project is intended to be downloaded, and optionally customized, by each user to accommodate their use cases. Three data preprocessing steps were used in the current case, and the approach should fit many use cases.

Given the breadth of potential DIMSpec applications, only one data import workflow is provided in the initial release. It leverages the two custom built tools for NTA projects described here, the NTA-MRT and the DIMSpec-QC application. This section describes the provided import routine following the process of submitting data to NIST; others may be developed to support additional workflows making use of the DIMSpec toolkit.

In most cases, conversion of raw data files produced by a mass spectrometer into the .mzML format12 using Proteowizard’s msConvert software16 is necessary; msConvert supports most mass spectrometer vendor formats. Specific parameters are required during conversion; these include (a) filter: threshold peak filter, (b) threshold type: absolute, (c) orientation: most intense, (d) value: 1, (e) filter: peak picking, (f) algorithm: vendor, and (g) MS levels: 1–2 [these details, and others are provided in the user guide or as a vignette (https://pages.nist.gov/dimspec/docs/file_convert.pdf)].

Annotations for identified features of interest within that .mzML file are then recorded using a macro-enabled Microsoft Excel workbook, called the Non-Targeted Analysis Method Reporting Tool (NTA-MRT). This allows for the systematic collection of sample, method, and compound information related to analytes identified in a sample. Using controlled vocabulary and a defined workflow, the NTA-MRT will produce files in the JavaScript Object Notation (.json) format describing each feature of interest in a data file. This does somewhat limit convenience by requiring the ability to run macro-enabled workbooks, but any workflow able to output .json files with the same structure may be used as a replacement. The NTA-MRT is described in more detail below.

Finally, .mzML and .json files are used with the DIMSpec Quality Control (DIMSpec-QC) application provided with the project to perform quality assurance checks and produce .json files for import into an existing DIMSpec database; command line versions of all quality control checks are, of course, available. If data are submitted to an existing project controlled by NIST, this last step is not required and will be performed during evaluation of the data submission. The DIMSpec-QC application is described in more detail below.

NTA Method Reporting Tool:

Description of Data Files Using Controlled Terminology.

The NTA-MRT provides the ability to collect sample and method-specific information with controlled ontology on specific parameters, such as sample classification, chromatographic column stationary phase chemistry, and mass spectrometric ionization technique. In addition, the NTA-MRT has a “peaks” section to record analytes identified in the sample and provide a designated level of confidence for that identification (for PFAS, these are based on the PFAS Confidence of Identification scale described by Charbonnet et al.14). Finally, the NTA-MRT generates MS2 fragment annotation tables for users to provide elemental formulas and structures (if available) for observed fragments of individual analytes. The fragment annotation step is highly recommended as it results in the most complete characterization for an identification but is not required for importing data. Once data are entered, the NTA-MRT converts these to .json files which can be used by subsequent tools in the data collection workflow in conjunction with a converted .mzML raw data file. This tool may be downloaded from GitHub (https://github.com/usnistgov/NISTPFAS/tree/main/methodreportingtool); its use does require users be able to enable Microsoft Excel macros. Instructions for completing it are contained within the tool itself.

DIMSpec Quality Control:

Evaluation of Data and Metadata.

While quality control metrics can be evaluated from the R command line interface (CLI), these have been streamlined into the DIMSpec-QC application (described below) included in the project. Using both the .mzML raw data file and the .json file(s) exported from NTA-MRT, data are evaluated for a variety of useful quality control metrics developed by NTA researchers at NIST. Results of this evaluation are attached to data during the import process. Seven data quality checks are included at the present: (1) precursor ion(s) are within reported mass accuracy bounds given an ideal ion mass for each identified analyte, (2) MS1 isotopic pattern(s) match the calculated isotopic pattern(s) above an acceptability threshold, (3) precursor ion(s) are present in the provided data file, (4) any annotated fragments are present in the provided data file, (5) mass accuracy of any annotated fragments are within reported instrumental error ranges given an ideal ion mass for each identified fragment, (6) the elemental formula for each annotated fragment is a valid subset of the identified analyte, and (7) if there is a SMILES structure, provided that it reasonably fits the elemental formula of the annotated fragment. Additionally, parameters for an optimized uncertainty mass spectrum are calculated for import which facilitates searching of unknown data against recorded fragmentation patterns.

Import of Mass Spectral Data.

Once converted to .mzML, annotated using the NTA-MRT, and evaluated by DIMSpec-QC, resulting .json files may be imported into a DIMSpec database from the R command line. Feedback is provided when additional information is required. Data normalization tables are leveraged throughout, matching the controlled vocabulary of the NTA-MRT, and should suffice for many uses; additional normalization values may be added at any time, and if unrecognized values are provided for normalized columns during the import process, users are prompted to fill those records with necessary data. This workflow was used to populate the example PFAS database provided with the project and is provided as an example in the DIMSpec User Guide.

Data Analysis Toolkit.

The DIMSpec toolkit has been tested on both Windows 10 and a virtual machine running Ubuntu 20.0.4.3 LTS 64-bit platforms and should run on any system able to install R, Python, SQLite3, and a web browser, though installation details may vary by operating systems. Follow the instructions for each requirement on the target operating system. The only hard requirement is R v4.1+17 and many packages (which will be installed as part of the compliance script), as well as RTools for Windows users (https://cran.r-project.org/bin/windows/Rtools/); as the project is distributed as an RStudio project, it is strongly recommended that users also install the RStudio18 integrated development environment for ease of use.

If using DIMSpec to build new databases, develop on top of the toolkit, or integrate it with existing computational workflows, other recommended software installs include SQLite3 (https://www.sqlite.com/download.html) and its CLI tool (https://www.sqlite.org/cli.html) to simplify aspects of reuse, a lightweight database interface such as DBeaver Community Edition (https://dbeaver.io/), and Git (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) for project version control; for best results the Git and SQlite3 CLI executables must be available to the system compute environment. Chemometric support is included by default using an integration of the RDKit19 Python library; it is recommended but not required to install Python 3.9+ and a package manager such as miniconda, though the installation routine from within R will install these automatically if necessary. Refer to relevant sections of the full user guide if the machine using DIMSpec already has installations of Python for other purposes, as set up requirements may vary widely. Recommended software listed here is only necessary if the use case includes direct interaction with the database or development on top of DIMSpec; others may exist as needed to integrate the toolkit with existing workflows. DIMSpec includes a populated database of per- and polyfluorinated alkyl substances (PFAS) for demonstration.

To get started setting up the project toolkit, fork the current release or download it as a .zip archive from GitHub (https://github.com/usnistgov/dimspec). It is important to note that DIMSpec is not at this time provided as a formal R package to allow maximum transparency and configuration flexibility. A set up script has been provided as part of the project that will install all necessary dependencies. The majority of the project infrastructure is written in R and provides for database creation, tying database connections to an active session, communication through those connections, and functionality for NTA projects (e.g., fragment and analyte identification using an attached database). Additionally, flexibility to turn on and off various DIMSpec functionality such as those described below is provided. Initial setup generally takes less than an hour on systems with no prerequisites installed and does require an Internet connection to download packages. See the DIMSpec User Guide (https://pages.nist.gov/dimspec/docs) for full detail on getting started, which provides a number of set up options supporting different use cases; a Quick Guide (https://pages.nist.gov/dimspec/docs/quick_install.pdf) is also available for the installation process. Documentation for R functions is provided from an R session (via fn_guide() or fn_help(“X”) where “X” is the name of a DIMSpec function) and as an appendix in the full user guide. At any point from an established R session, the user guide is available using the user_guide() function; these are packaged with the project and still available to offline installations. By default, R sessions include logging and argument verification to assist with development, though these may be turned off to increase performance.

Chemometrics.

Several chemometrics platforms exist that assist in molecular calculations. The DIMSpec project by default includes the Python wrapper to RDKit19 to generate molecular images and machine actionable aliases. This requires binding an R session to a Python environment through the reticulate20 package. Requirements are installed (if required) during execution of the setup script and will build the environment even if the user has not yet installed Python or a Python environment manager. Existing custom functionality and workflows may be included by adding to the environment established during set up or by adding RDKit and reticulate to an existing environment.

Application Programming Interface.

Modern application frameworks often leverage Representational State Transfer (REST) application programming interfaces (APIs) for data exchange. In DIMSpec projects this is provided by the plumber package,21 by default running in a background process. Briefly, this allows R functions to be available to any machine able to communicate with the host machine using uniform resource identifiers (URIs). Several end points are defined. End points may be added or refined quickly and the server relaunched with included R functions start_api() and api_reload(). The API may be accessed either locally (the default) or on a network (by changing set up values prior to starting a DIMSpec session) and serves as the data source for all web applications described here. Functionality is detailed in the DIMSpec User Guide.

Web Applications.

For many use cases involving simply using a DIMSpec database, the majority of user interaction will be through graphical user interfaces providing access to the underlying data and functionality. Web applications in the DIMSpec project are powered by the shiny package.22 Provided applications communicate with the database through the API, though others can be readily developed that connect directly to the database.

Three web applications are currently included in the DIMSpec project. Once the compliance script has been executed, launch any of them using the provided start_app(“X”) function where “X” is the name of the application. Environment resolution scripts also allow for easily launching from a terminal opened at the project directory using shiny::runApp(“X”) where “X” is the path to the application, nominally located inside the /inst/apps directory. All are created in the “3-file” format using a dashboard presentation. Additionally, a template application is provided that contains all the code necessary to connect to the same defined API server and quickly build new applications in the same format and style.

Table Explorer.

To facilitate exploration of the database structure, the Table Explorer application provides information about tables and views in an intuitive interface and details not only their contents but the entity definition and relationships to other entities in a human-readable format. It includes only two screens, one (“Table Viewer”) to preview data and to view structural information for the selected entity and another to view the entity relationship diagram; view a high-resolution version in a separate browser tab with the right-click context menu. Launch it from an active DIMSpec session with start_app(“table_explorer”). The interface is extremely simple (Figure 3); change the selected entity using the drop-down menu to update.

Figure 3.

Figure 3.

Easily inspect database entities using the provided “Table Explorer” application.

DIMSpec Quality Control (DIMSpec-QC).

Due to the nature of NTA projects, it is recommended to perform quality control checks of experimental data. As described above, the DIMSpec-QC application was developed to facilitate application of quality control metrics developed by NIST and will create DIMSpec compliant import files in .json format that meet all requirements by combining the results of experimental data (in .mzML format) and the annotations provided by the NTA-MRT. Launch it from an active DIMSpec session with start_app(“dimspec-qc”). Navigation is straightforward through data import, quality review, and data export. Default thresholds for all quality control checks are provided; these may be adjusted, if necessary, on the “QC Settings” page. Checks are performed on all peaks within each raw file; navigate through the checks by selecting a raw file and peak on the “Quality Review” page to see QC results on the right (Figure 4). See the full DIMSpec User Guide for more details (https://pages.nist.gov/dimspec/docs/dimspec-qc-home.html).

Figure 4.

Figure 4.

Data quality assessments are available using the provided DIMSpec-QC application.

Mass Spectral Match (MSMatch).

The most extensive application included with the DIMSpec project is MSMatch. This application matches features of interest in user-provided .mzML files against analytes and fragments in the connected DIMSpec database, automatically annotating known fragments and providing context for how matching spectra were produced. Hints in the form of tooltips are provided throughout, but the general process is similar to that of using DIMSpec-QC: load data, process, and evaluate. Users load a .mzML file, set instrument parameters to match their experiment, fill out a list of features to identify, and click a button to proceed. Features may be added or adjusted manually, and feature lists in CSV or MS Excel formats may be imported from other software outputs. Results may be explored either at the analyte level (matching spectra for a known analyte) or at the fragment level (where an analyte match is not possible). Contextual narratives are provided throughout describing how reference data were produced.

At the analyte level, matches are generated using a modified dot product function with both MS1 and MS2 scores, both forward and reverse, if possible. Spectra stored in DIMSpec databases include uncertainty mass spectra used for matching purposes as detailed in 2021 by Place.23 This allows match score uncertainty to be easily evaluated by bootstrapping around uncertainty mass spectrum, increasing confidence in the match score. Information about each match is also provided, such as the number of annotated fragments, structures, citations in the matched spectrum (Figure 5), and a narrative of how the selected reference spectrum was generated. Both MS1 and MS2 spectra can be investigated interactively, and MSMatch provides for uncertainty evaluation of match scores through a bootstrapped evaluation.

Figure 5.

Figure 5.

Identify analytes by matching against known spectra using the provided MSMatch application.

Perhaps more applicable to NTA workflows, when analyte matches are not found, data may be investigated further for fragmentation matches to assist in identifying the feature of interest. MSMatch automatically annotates recognized fragments and provides graphical and tabular displays for all fragments indicating whether a match was annotated by formula or known structure (Figure 6). Additional information is also provided, including mass error of the measurement against idealized mass, SMILES notation (if available), etc. Given the contextual information available to DIMSpec records, MSMatch also displays a molecular model and all compounds and chromatographic peaks within which that fragment has been previously annotated (Figure 7). All tabular elements can be downloaded.

Figure 6.

Figure 6.

Automatically annotate known fragments using the MSMatch application.

Figure 7.

Figure 7.

Explore data about known fragments using the MSMatch application. All fragment matches for the current spectrum are displayed (left) and may be saved locally (A), with a descriptive narrative about the match (center), and analytes within which that fragment has been previously annotated (right). Results may be downloaded (A) and information about associated peaks displayed (B).

RESULTS AND DISCUSSION

In its distributed form, the DIMSpec project currently includes a database populated with empirical high-resolution tandem mass spectra for PFAS. Samples from analytical standards (n = 83), aqueous film-forming foam solutions (n = 18), and commercial formulations (n = 3) are represented. From these, 24,451 curated HRMS spectra were collected from 351 peaks representing 132 discrete PFAS analytes. This database is provided as part of the DIMSpec project repository as an example; its official (i.e., citable) source is the NIST Public Data Repository.15

For the initial population of the database with PFAS mass spectra, there were two sources of data: internally generated mass spectra from commercially available analytical standards from Wellington Laboratories (Guelph, ON, Canada) and specialty-synthesized standards provided by the USEPA24 and mass spectra generated from PFAS in technical mixtures and aqueous film-forming foam formulations from the study by Barzen-Hansen et al.,25 provided by Dr. Jennifer Field of Oregon State University. All data were generated via data-dependent analysis using two vendors of mass spectrometers with different mass analyzers (QTOF and Orbitrap).

By extracting only relevant portions from raw .mzML files, providing normalization, and implicitly grouping metadata, total file size for this data set was reduced by 99.6% from 12.56 GB to 53.04 MB, facilitating distribution. Using any given DIMSpec database requires only changing a single file pointer prior to running the startup routine. Convenience functions are provided to establish new DIMSpec databases for cross-project compatibility. Such new databases can also be easily seeded with project-relevant information using preformatted data sources (e.g., for normalization tables and analyte lists) as part of the provided build routines. Within the NIST Chemical Sciences Division, we envision creating “living” databases such as these in support of new research areas or projects, growing as necessary, providing data internally via API, and quickly disseminating resulting database files through our public data repository. This shares some conceptual similarities with database “sharding” if attached API services are launched on a research agency’s internal network.

With a transparent schema and accessibility provided by open-source tools, functionality is easily extensible. In its current form, data can be exported to the .msp format used by the NIST Mass Spectral Library with a single function call; while that export loses much of the detail wealth housed in DIMSpec, it does make it easier to include in existing workflows. Exports to other formats required by stakeholders would be of interest to develop as they are identified and should further increase interoperability. While not intended to support quantitative measurements at this time, data storage is focused around chromatographic peaks and could easily support quantitation by adding a table referencing peak records, with columns storing measures such as integrated intensity, calculated mass fraction, and units, as well as Supporting Information regarding those calculations.

CONCLUSION

In this paper we present the DIMSpec project, a freely available and open-source toolkit to create portable database libraries for environmental mass spectrometry. If used widely, the ability to rapidly produce databases supporting nontargeted analysis of high-resolution mass spectrometry projects should facilitate sharing and reuse of data. Portability allows use on non-networked instrument controllers and peer-to-peer dissemination in a single file, while networked instruments can connect to an internally hosted version of the MSMatch application to identify analytes and fragments of interest directly from the bench. Included in the project repository is the first DIMSpec database containing curated, high quality HRMS (MS1 and MS2) spectra scans for more than 130 distinct per- and polyfluorinated alkyl substances annotated across more than 100 samples. As all aspects are built on open-source software, the toolkit and database schema can be customized for a wide variety of use cases by extending both the schema and toolset or including it as part of a larger NTA workflow. This report describes only the first version of this project. As stakeholder needs and use cases expand, so will functionality. If suitable data are contributed to NIST, the underlying database will grow to match. Future development should focus on cross disciplinary harmonization of terms within existing and new ontologies to further increase interoperability and reusability.

ACKNOWLEDGMENTS

We gratefully acknowledge contributions and support from all members of the NIST PFAS Program. Funding for this work was provided in large part by the U.S. Department of Defense Strategic Environmental Research and Development Program project ER20-1056.

Footnotes

NIST-developed software is provided by NIST as a public service. You may use, copy, and distribute copies of the software in any medium, provided that you keep intact this entire notice. You may improve, modify, and create derivative works of the software or any portion of the software, and you may copy and distribute such modifications or works. Modified works should carry a notice stating that you changed the software and should note the date and nature of any such change. Please explicitly acknowledge the National Institute of Standards and Technology as the source of the software. NIST-developed software is expressly provided “AS IS.” NIST makes no warranty of any kind, express, implied, in fact, or arising by operation of law, including, without limitation, the implied warranty of merchantability, fitness for a particular purpose, non-infringement, and data accuracy. NIST neither represents nor warrants that the operation of the software will be uninterrupted or error-free, or that any defects will be corrected. NIST does not warrant or make any representations regarding the use of the software or the results thereof, including but not limited to the correctness, accuracy, reliability, or usefulness of the software. You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. The software developed by NIST employees is not subject to copyright protection within the United States. Additional system dependencies may be required on Linux systems and should be installed prior to running the compliance script. See footnotes in the Instructions section of the DIMSpec User Guide. Any mention of commercial products is for information only; it does not imply recommendation or endorsement by NIST.

The authors declare no competing financial interest.

Complete contact information is available at: https://pubs.acs.org/10.1021/jasms.4c00073

Contributor Information

Jared M. Ragland, National Institute of Standards and Technology, Material Measurement Laboratory, Gaithersburg, Maryland 20899, United States Present Address: Hollings Marine Laboratory, 331 Fort Johnson Rd, Charleston, SC 29412, United States.

Benjamin J. Place, National Institute of Standards and Technology, Material Measurement Laboratory, Gaithersburg, Maryland 20899, United States

REFERENCES

  • (1).Benchmarking and Publications for Non-Targeted Analysis (BP4NTA). Reference Content. https://nontargetedanalysis.org/reference-content/ (accessed 2023-04-19).
  • (2).Getzinger GJ; Higgins CP; Ferguson PL Structure Database and In Silico Spectral Library for Comprehensive Suspect Screening of Per- and Polyfluoroalkyl Substances (PFASs) in Environmental Media by High-Resolution Mass Spectrometry. Anal. Chem. 2021, 93 (5), 2820–2827. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (3).Alygizakis NA; Oswald P; Thomaidis NS; Schymanski EL; Aalizadeh R; Schulze T; Oswaldova M; Slobodnik J NORMAN Digital Sample Freezing Platform: A European Virtual Platform to Exchange Liquid Chromatography High Resolution-Mass Spectrometry Data and Screen Suspects in “Digitally Frozen” Environmental Samples. TrAC Trends in Analytical Chemistry 2019, 115, 129–137. [Google Scholar]
  • (4).Xue J; Guijas C; Benton HP; Warth B; Siuzdak G METLIN Ms2Molecular Standards Database: A Broad Chemical and Biological Resource. Nat. Methods 2020, 17 (10), 953–954. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (5).Deutsch EW; Albar JP; Binz P-A; Eisenacher M; Jones AR; Mayer G; Omenn GS; Orchard S; Vizcaíno JA; Hermjakob H Development of Data Representation Standards by the Human Proteome Organization Proteomics Standards Initiative. Journal of the American Medical Informatics Association 2015, 22 (3), 495–506. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (6).Wilkinson MD; Dumontier M; Aalbersberg IJ; Appleton G; Axton M; Baak A; Blomberg N; Boiten J-W; da Silva Santos LB; Bourne PE; Bouwman J; Brookes AJ; Clark T; Crosas M; Dillo I; Dumon O; Edmunds S; Evelo CT; Finkers R; Gonzalez-Beltran A; Gray AJG; Groth P; Goble C; Grethe JS; Heringa J; t Hoen PAC; Hooft R; Kuhn T; Kok R; Kok J; Lusher SJ; Martone ME; Mons A; Packer AL; Persson B; Rocca-Serra P; Roos M; van Schaik R; Sansone S-A; Schultes E; Sengstag T; Slater T; Strawn G; Swertz MA; Thompson M; van der Lei J; van Mulligen E; Velterop J; Waagmeester A; Wittenburg P; Wolstencroft K; Zhao J; Mons B The FAIR Guiding Principles for Scientific Data Management and Stewardship. Scientific Data 2016, 3 (1), 160018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (7).Helmus R; ter Laak TL; van Wezel AP; de Voogt P; Schymanski EL patRoon: Open Source Software Platform for Environmental Mass Spectrometry Based Non-Target Screening. Journal of Cheminformatics 2021, 13 (1), 1 DOI: 10.1186/s13321-020-00477-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (8).Stravs MA; Schymanski EL; Singer HP; Hollender J Automatic Recalibration and Processing of Tandem Mass Spectra Using Formula Annotation. Journal of Mass Spectrometry 2013, 48 (1), 89–99. [DOI] [PubMed] [Google Scholar]
  • (9).Frank AM; Monroe ME; Shah AR; Carver JJ; Bandeira N; Moore RJ; Anderson GA; Smith RD; Pevzner PA Spectral Archives: Extending Spectral Libraries to Analyze Both Identified and Unidentified Spectra. Nat. Methods 2011, 8 (7), 587–591. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (10).Lam H Spectral Archives: A Vision for Future Proteomics Data Repositories. Nat. Methods 2011, 8 (7), 546–548. [DOI] [PubMed] [Google Scholar]
  • (11).Griss J; Perez-Riverol Y; Lewis S; Tabb DL; Dianes JA; del-Toro N; Rurik M; Walzer M; Kohlbacher O; Hermjakob H; Wang R; Vizcaíno JA Recognizing Millions of Consistently Unidentified Spectra Across Hundreds of Shotgun Proteomics Datasets. Nat. Methods 2016, 13 (8), 651–656. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (12).Deutsch EW Mass Spectrometer Output File Format mzML. In Proteome Bioinformatics; Methods in Molecular Biology; Humana Press: Totowa, NJ, 2010; Vol. 604, pp 319–331, . [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (13).Place BJ; Ragland JM Speaking the Same Language: The Need for Accurate and Consistent Reporting of Novel Per- and Polyfluoroalkyl Substances. Environ. Sci. Technol. 2022, 56 (15), 10564–10566. [DOI] [PubMed] [Google Scholar]
  • (14).Charbonnet JA; McDonough CA; Xiao F; Schwichtenberg T; Cao D; Kaserzon S; Thomas KV; Dewapriya P; Place BJ; Schymanski EL; Field JA; Helbling DE; Higgins CP Communicating Confidence of Per- and Polyfluoroalkyl Substance Identification via High-Resolution Mass Spectrometry. Environmental Science & Technology Letters 2022, 9 (6), 473–481. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (15).Ragland JM; Place BJ Database Infrastructure for Mass Spectrometry Database of Per- and Polyfluoroalkyl Substances v 1.1.0, National Institute of Standards and Technology. NIST Public Data Repository, 2023, DOI: 10.18434/mds2-2905. [DOI] [Google Scholar]
  • (16).Adusumilli R; Mallick P Data Conversion with ProteoWizard msConvert. Methods in Molecular Biology (Clifton, N.J.) 2017, 1550, 339–368, DOI: 10.1007/978-1-4939-6747-6_23. [DOI] [PubMed] [Google Scholar]
  • (17).R Core Team. R: A Language and Environment for Statistical Computing, Version 4.1.0; R Foundation for Statistical Computing: Vienna, Austria, 2021. [Google Scholar]
  • (18).RStudio Team. RStudio: Integrated Development Environment for r, Version 2022.02.3; RStudio, PBC: Boston, MA, 2020. [Google Scholar]
  • (19).RDKit: Open-Source Cheminformatics, v 2021.09.4; Zenodo, 2021, https://www.rdkit.org, DOI: 10.5281/zenodo.58352. [DOI] [Google Scholar]
  • (20).Ushey K; Allaire J; Tang Y Reticulate: Interface to ‘Python’, R package version 1.2.6. 2022. [Google Scholar]
  • (21).Schloerke B; Allen J plumber: An API Generator for R, R package version 1.2.2. 2022. [Google Scholar]
  • (22).Chang W; Cheng J; Allaire J; Sievert C; Schloerke B; Xie Y; Allen J; McPherson J; Dipert A; Borges B Shiny: Web Application Framework for r, R package version 1.8.1. 2021. [Google Scholar]
  • (23).Place BJ Development of a Data Analysis Tool to Determine the Measurement Variability of Consensus Mass Spectra. J. Am. Soc. Mass Spectrom. 2021, 32 (3), 707–715. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (24).Carlson LM; Angrish M; Shirke AV; Radke EG; Schulz B; Kraft A; Judson R; Patlewicz G; Blain R; Lin C; Vetter N; Lemeris C; Hartman P; Hubbard H; Arzuaga X; Davis A; Dishaw LV; Druwe IL; Hollinger H; Jones R; Kaiser JP; Lizarraga L; Noyes PD; Taylor M; Shapiro AJ; Williams AJ; Thayer KA Systematic Evidence Map for over One Hundred and Fifty Per- and Polyfluoroalkyl Substances (PFAS). Environ. Health Perspect. 2022, 130 (5), 056001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • (25).Barzen-Hanson KA; Roberts SC; Choyke S; Oetjen K; McAlees A; Riddell N; McCrindle R; Ferguson PL; Higgins CP; Field JA Discovery of 40 Classes of Per- and Polyfluoroalkyl Substances in Historical Aqueous Film-Forming Foams (AFFFs) and AFFF-Impacted Groundwater. Environ. Sci. Technol. 2017, 51 (4), 2047–2057. [DOI] [PubMed] [Google Scholar]

RESOURCES