Reproducible Molecular Networking Of Untargeted Mass Spectrometry Data Using GNPS
Global Natural Product Social (GNPS) Molecular Networking is an interactive online chemistry-focused mass spectrometry data curation and analysis infrastructure. The goal of GNPS is to provide as much chemical insight for an untargeted tandem mass spectrometry data set as possible and to connect this chemical insight to the underlying biological questions a user wishes to address. This can be performed within one experiment or at the repository scale. GNPS not only serves as a public data repository for untargeted tandem mass spectrometry data with the sample information (metadata), it also captures community knowledge that is disseminated via living data across all public data. One of the main analysis tools used by the GNPS community is molecular networking. Molecular networking creates a structured data table that reflects the chemical space from tandem mass spectrometry experiments via computing the relationships of the tandem mass spectra through spectral similarity. This protocol provides step-by-step instructions for creating reproducible high-quality molecular networks. For training purposes, the reader is led through the protocol from recalling a public dataset and its sample information to creating and interpreting a molecular network. Each data analysis job can be shared or cloned to disseminate the knowledge gained, thus propagating information that can lead to the discovery of molecules, metabolic pathways and ecosystem/community interactions. 1.0 Introduction: Molecular networking for the analysis of tandem mass spectra of small molecules was introduced in 2012 1 . Upon its introduction, molecular networking was compared to sequencing of environmental DNA to study the microbial communities present in diverse ecosystems 2 . For the first time we were able to get a map of the chemical diversity that is observed in an untargeted mass spectrometry experiment. In addition to providing unprecedented systems-level views of the chemical space in various environments, molecular networking has aided structure elucidation of many compounds [3][4][5][6][7][8][9] .The foundation of molecular networking is pairwise spectral alignment using a modified cosine spectral similarity algorithm originally intended to discover modified forms of peptides and proteins 10 . In a modified spectral similarity search, not only are fragmentation spectra (MS 2 ) from ions at identical m/z compared, but also MS 2 spectra that are offset by the same m/z difference as the precursor ion. By eliminating the amino acid filtering from the original spectral alignment algorithms, it became possible to extend spectral similarity to any set of MS 2 spectra, including those from small molecules and natural products. When a pairwise spectral similarity search/alignment is performed, each MS 2 spectrum in a given dataset is compared against every other, and a network of MS 2 spectral relations is obtained, from which molecular networks are created (Fig. 1). Molecular networking build on the fundamental observation that two structurally related molecules share fragment ion patterns when subjected to MS 2 fragmentation methods such as collision induced dissociation (CID). In order to make the molecular networking algorithm accessible to the scientific community, its script was converted to a web-based platform backed by a supercomputer. This enabled the creation of a community infrastructure supporting both a database and knowledge-base around the needs of the community. The result was the Global Natural Products Social (GNPS) Molecular Networking community effort that started in 2014 and was published in 2016. The user base has expanded to 49 of 50 states in the United States and worldwide to over 150 countries 11 . GNPS is currently widely used by scientists working in industry, academia and government in the fields of biomedical research, environmental science, ecology, Sum of precursor ion intensities in the MS 2 spectra for all ions with the same associated MS 2 detected by the mass spectrometer. tandem MS, MS/MS, MS 2Abbreviations for tandem mass spectrometry, which defines a technique where mass-selected ions are subjected to a second mass spectrometric analysis. In the first stage, also referred to as MS 1 , precursor ions are formed and detected. In the second stage, also referred to as MS 2 or MS/MS, precursor ions are fragmented resulting in a spectral fingerprint 22,23 . All mass spectrometry data used in GNPS, both in the private user workspace or data that are made public, is stored in MassIVE -an interactive virtual environment developed to facilitate and encourage the exchange of mass spectrometry data. MassIVE accepts data files (organized as datasets) and facilitates the sharing of datasets with a unique identifier; one can use this unique identifier as an accession number for publications. In addition, public datasets that the user publishes can, by choice of the depositor, have an associated DOI. Currently, MassIVE is an approved repository for the Journal of Proteome Research (https://pubs.acs.org/journal/jprobs) and Nature Partner Journals (https://www.nature.com/sdata/policies/repositories#chem) and is widely used as a repository for other journals [24][25][26][27][28][29][30][31][32][33] . GNPS-MassIVE has more than a thousand public
<!>Term Definition annotation<!>bucket table<!>cluster index<!>DDA<!>natural product<!>m/z<!>molecular networking<!>MSCluster<!>precursor ion (parent ion)<!>product ion (fragment ion)<!>sample information (metadata)<!>spectral similarity<!>summed ion intensities<!>Alternative methods to this protocol<!>MassBank<!>Expertise needed to implement the protocol<!>Experimental design<!>Reproducibility, blanks, and controls<!>Molecular networking parameters<!>Limitations and challenges<!>EQUIPMENT SETUP Mass spectrometry<!>Procedure<!>1)<!>Data submission to GNPS / MassIVE<!>4)<!>5)<!>1)<!>2)<!>3)<!>5)<!>6)<!>7)<!>8)<!>!CRITICAL STEP Making your dataset public: this is not automatic and must be done explicitly after submitting data and generating a dataset MSV accession number.<!>BOX 2. The Importance of making your GNPS-MassIVE data public.<!>Molecular networking workflow<!>CRITICAL NOTE:<!>For advanced users:<!>Group Mapping and Attribute Mapping Legacy version of metadata file<!>Advanced Library Search Options<!>Score Threshold<!>Maximum Analog Search Mass Difference<!>Filter Below Std Dev<!>Minimum Peak Intensity<!>Filter Precursor Ion Window<!>Visualization of the molecular network<!>Molecular network visualization in browser<!>Data Analysis Option Description<!>Molecular network visualization in Cytoscape -Timing 1-4 hours<!>How to propagate annotations through manual interpretation of the networks<!>Capturing information by adding reference spectra from your data<!>Data sharing & reproducibility of molecular networking<!>Cloning a job<!>Accessing a dataset<!>Subscribing to a dataset and living data<!>Troubleshooting<!>Network is too large to view in Cytoscape<!>I do not know how to include / exclude blanks<!>Metadata does not sync with Cytoscape<!>GNPS job fails due to improper metadata format<!>I cannot see my file(s) after drag and drop upload to GNPS workspace<!>My GNPS network is much smaller (fewer nodes) than expected<!>Cannot convert<!>Anticipated Results
<p>forensics, microbiology, chemistry, and others. This crowdsourced, community-driven analysis infrastructure not only facilitates data and knowledge storage but also enables knowledge capture, sharing, dissemination and data driven social networking while promoting reproducible data analysis. Moreover, GNPS can be accessed on a computer or on any mobile device connected to the internet making any public data set readily accessible for analysis. While there are many analysis tools available within the GNPS infrastructure, molecular networking is the most frequently used tool. Other tools available on GNPS such as network annotation propagation (NAP) briefly discussed in section 3.5. To create a molecular network, GNPS first aligns each MS 2 spectrum in a dataset to each of the others, and assigns a cosine score to each combination to describe their similarity (Fig. 1). Identical mass are collapsed based on a hierarchical cosine clustering algorithm into a single node or consensus cluster due to the high similarity of their fragment ions. This is accomplished using the MS-Cluster algorithm 12 . Structurally related molecules yield comparable MS 2 spectra due to commonalities in their gas phase chemistry 13 , and are represented by separate nodes that connect within the network via edges. Each consensus spectrum (node) is then queried against spectral library databases to assign putative known molecules within a network. Table 1. Terminology</p><!><p>The process of attributing a putative chemical structure to a detected molecule. The level of annotations from spectral matches are considered level 2 or 3 according to the 2007 Metabolomics Standards Initative 14 .</p><!><p>A tab separated table (.tsv file format) downloadable from the GNPS interface, which shows per sample summed precursor ion intensities per MS 2 ion. Pie charts generated in visualization tools are based off of intensities in the bucket table.</p><!><p>Reference identification number for a MS 2 consensus cluster. In Cytoscape this identification number is also called 'shared name'.</p><p>consensus cluster A grouping of MS 2 spectra that are considered identical based on the MS-Cluster algorithm 10,12 . Since GNPS brings together approaches from different scientific communities, there are terms such as "cluster" that have different meanings. Thus, the context in which the term is used should be considered. The term 'consensus cluster' refers to the grouping of MS 2 spectra into a node and is different from clusters of nodes in molecular networks as visualized in Cytoscape 15,16 .</p><p>cosine score A value that represents the MS 2 spectral similarity between two nodes in the molecular network, where a cosine score of 1 represents identical spectra and a cosine score of 0 denotes no similiarity at all. The cosine score takes into account precursor ion, fragment ions as well as peak intensities 1 .</p><!><p>Abbreviation for data-dependent acquisition; a method for tandem mass spectrometry data collection where the most intense MS 1 ions are iteratively selected for MS 2 fragmentation 17 .</p><p>dereplication Rapid identification of previously characterized (known) molecules 18 .</p><p>edge A line connecting nodes that represents related but not identical MS 2 spectra based on a cosine similarity score.</p><p>identification Validation of a molecular assignment using an authentic chemical standard analyzed under the same experimental conditions as the sample containing the unknown compound. Molecular identification requires matching at least one physical characteristic, e.g. retention time, exact m/z, and MS 2 fragmentation pattern 14,19 .</p><p>LC Abbreviation for liquid chromatography; a method used to separate molecules in a mixture using a liquid mobile phase.</p><!><p>A small molecule (< 2000 Da) produced by a biological source 20 .</p><!><p>Mass-to-charge ratio, a dimensionless quantity resulting from dividing the mass number of an ion by its charge number. 21 molecular network A map of all nodes illustrating connectivity that represents the chemical space detected in the experiment.</p><!><p>A computational approach that organizes MS 2 data based on spectral similarity, from which we can infer relationships in chemical structures 1 .</p><!><p>An algorithm used by GNPS to collapse nearly identical MS 2 spectra with the same precursor ion m/z into a single consensus spectrum.</p><p>MS 1 The collection of all precursor ions (m/z) and associated abundancies in a sample. MS 1 is the first stage of tandem mass spectrometry, where compounds can be further fragmented 22,23 . See also tandem MS, MS 2 , MS/MS. node A consensus cluster of identical MS 2 spectra that represent one molecule, or a single MS 2 spectrum if cluster size is 1.</p><!><p>The ionized form of a molecule that is selected for tandem MS fragmentation. In electrospray ionization, the parent ion is a synonym of precursor ion 21 .</p><!><p>An ion originating from a gas-phase reaction of the precursor ion 13 .</p><!><p>Data that provide basic information about the sample and descriptions to facilitate data analysis and interpretation. Examples of sample information include: the identification number, the source and origin of the sample collected, time, age, sex and date of collection.</p><p>small molecule This protocol considers a molecule with a molecular weight < 1500 Da a small molecule.</p><p>spectral alignment An algorithmic approach that aligns related spectra. This is the basis of molecular networking which relies on the assumption that two structurally related molecules share similarity in their MS 2 spectra 1 .</p><!><p>The likeness of MS 2 spectra based on all or some of the following: precursor ion, fragment ions, and relative intensities of these peaks.</p><p>Structurally related molecules tend to exhibit similar fragmentation 13 . In molecular networking spectral similarity is calculated through a modified cosine score.</p><!><p>metabolomics datasets. The GNPS knowledge base includes 221,083 reference MS 2 spectra, provided by the GNPS community, spectral libraries generated for GNPS (GNPS-collections) and third party libraries 11 . Examples are LDB Lichen Database, MIADB Spectral Library, Sumner Spectral Library, CASMI Spectral Library, and Massbank, a large MS data library that is directly synced with GNPS. There are also tags and sample information (metadata) entries provided by the community in the GNPS knowledge base. Furthermore, all public data is periodically searched against the NIST 2017 spectral library and high confidence spectral matches are annotated. GNPS-MassIVE now performs more than 6,000 analysis jobs a month and more than 200,000 page views (excluding developers), with the predominant analysis being molecular networking. As a result, GNPS based analysis has been used for the discovery of hundreds of new molecules in the last few years, ranging from immune regulators to antimicrobials, including antiviral agents and protease inhibitors 9,[34][35][36] . Here we provide a detailed protocol on how to generate a publishable and reproducible molecular network from a mass spectrometry dataset. This protocol will take the reader through the following steps: how to upload data, how to make the data public, how to subscribe to public data for living data updates, and how to reproducibly create publishable molecular networks using standardized sample information (metadata) through the GNPS infrastructure (Fig. 1). Figure 1. Schematic representation of the process for creating a molecular network from tandem mass spectra acquired for metabolites in complex sample mixtures. The colors are used to track how we go from molecules in a sample to nodes in the molecular network. We start by obtaining MS 2 spectra of all ionized molecules in the sample. MS-Cluster first aligns each MS 2 spectrum in a dataset to each of the others. Mass spectra from identical compounds coalesced using MS-Cluster 12 into a single node or consensus cluster due to the high similarity of their precursor ion and fragment ions. Subsequently a spectral alignment is performed enabling for similarity searches even when the precursor ion masses are not identical. This is accomplished using a modified cosine score where all the ions that differ by the mass difference of the two precursor ions are also considered.  Structurally-related molecules yield comparable MS 2 spectra due to commonalities in their 208 gas phase chemistry, and are represented by separate nodes that connect within the 209 network via edges. Each node is then queried against spectral libraries to assign putative 210 known molecules within a molecular network and unknowns can be propagated using 211 chemical rationale. For illustration purposes, the blue node with m/z 409.2949 is cholate, 212 m/z 446.3162 in purple is glycocholic acid (the user would discover this based on MS 2 213 matches to a reference library) while the orange one is unknown but has a mass shift of 214 147.0723 Da. This is a typical mass shift of phenylalanine and thus a prediction can be 215 made that this is a phenylalanine conjugate of cholic acid. The difference between the 216 glycine and phenylalanine conjugate is 90 Data collection and processing procedures will vary depending on the instrument available to the user. Although the user can modify any procedure to fit their specific goals, this protocol specifies a set of starting parameters for acquiring and converting data with various mass spectrometers, including AB Sciex, Agilent, Bruker, Shimadzu, Thermo Scientific, and Waters instruments. We also provide a protocol for the conversion of the data from each of these vendors to an open format (.mzXML, .mzML or MGF) that is usable within the GNPS-MassIVE infrastructure. Once the data is converted to the proper open format, the protocol describes how to upload data files to MassIVE, a public repository that enables community sharing of mass spectrometry data, using either a web browser or FTP client. The resulting datasets can then be subsequently submitted to GNPS for molecular networking analysis, wherein MS 2 spectra are organized in a network according to similarity and compared against a reference database to identify putative known molecules and 'molecular families' in the samples. Finally, visualization and analysis of GNPSgenerated molecular networks can be performed either in the web browser itself or in Cytoscape, an open-source software for visualizing complex networks 37 . 1.2 Applications of the method GNPS molecular networking provides the ability to analyze and compare MS 2 spectra in one or more datasets acquired within the scope of a specific study, across datasets from multiple studies, and also to compare those datasets to all publicly available GNPS-MassIVE datasets, including community curated spectral libraries. In addition, ongoing contributions to spectral libraries and submissions of new public datasets enable continuous identification: the periodic and automated reanalysis of all public datasets. GNPS is being used to network data acquired on a number of different mass spectrometers in a wide variety of exploratory studies, with samples originating from diverse environments and used for varying purposes. These range from the indoor environment [38][39][40] to dissolved organic matter in the oceans 41 , from microbes in culture 9,[42][43][44][45] to mouse 46 or human microbiomes 47,48 or infections [49][50][51] , from clinical samples 32,52,53 to plants 54 , algae 55 , sponges 5,56 and corals 57 , as well as a number of other sample types 26,58 . Additionally, molecular networking has been applied to natural products discovery from a variety of organisms [59][60][61][62] , forensics 63 , small molecule identification 64 and biological discovery in hypothesis-driven research 65 . Furthermore, GNPS facilitates large-scale meta-analyses that can compare and potentially link studies from different laboratories by enabling rapid comparisons across multiple public datasets. Finally, to promote data analysis reproducibility, all analysis jobs are saved together with their parameters, which can be shared or cloned for reanalysis; no other platform provides this service.</p><!><p>Several aspects of the GNPS-based molecular networking protocol are provided elsewhere, but not previously as a coherent workflow in one package. There are several repositories where metabolomics data can be uploaded [66][67][68] . According to the OMICS discovery index, the most widely used are GNPS-MassIVE, Metabolomics workbench 12 and MetaboLights 69,70 .</p><p>Mass spectral library searching, or comparing MS 2 spectra of compounds in a sample to reference data in order to annotate metabolites 71 , has been implemented extensively, and successfully, for decades. Numerous commercial and non-commercial MS 2 reference databases exist, such as the NIST/EPA/NIH Mass Spectral Library 72 , METLIN 73 ,</p><!><p>of Japan (http://massbank.jp) 74 , EU (https://massbank.eu/MassBank/) 75 and North America (http://mona.fiehnlab.ucdavis.edu/), mzCloud 76,77 , and ReSpect 78 , which potentially provides users with access to around 2.4 million MS 2 reference spectra, when GC-MS and LC-MS reference spectra are both considered 66 . Many of these reference databases have an integrated spectral matching tool for compound identification, including mzCloud, METLIN/XCMS Online 79,80 , Metabox 81 , MassBank). The goal of GNPS is not only to provide a spectral matching tool, but also to serve as a data storage and knowledge capture and dissemination platform, and to provide access to a host of other analysis tools not covered in detail here, such as in silico-based dereplication [82][83][84] , network annotation propagation 85 , genome mining tools 86 , and MASST searches.</p><p>GNPS is currently the only online platform that provides molecular networking, a computational tool that compares pairs of MS 2 spectra based on their similarities and connects them to MS 2 reference spectral libraries. Molecular networking enables further propagation of annotations through mass spectral relations. MetGem 87 is a standalone software package that can be used for the generation of molecular networks which works well for smaller data sets, it is not connected to a knowledge base, repository wide analysis tools and additional computational resources that GNPS provides.</p><!><p>Sampling and sample preparation, including sample extraction, should be performed by a trained analytical chemist, and mass spectrometry data should be acquired by a trained mass spectrometrist. It is imperative that the parameters for mass spectrometry be suitably optimized for the experimental conditions and sample type in order to generate meaningful molecular networks. Important instrument parameters to consider may include precursor isolation window, mass resolution, collision energy, data dependent acquisition settings (e.g. duty cycle time and dynamic exclusion parameters), and the mass spectrometer has to be properly calibrated before use. While an expert user will have preferred instrument parameters, recommended data acquisition parameters from major instrument manufacturers are provided below (section 2.6) for newer mass spectrometry users who aim to create molecular networks in GNPS. Basic knowledge of tandem mass spectrometry fundamentals as well as knowledge of sample handling and preparation are required to further optimize the data analysis parameters appropriate to the instrument used and the experimental design.</p><!><p>After running the molecular networking algorithm, GNPS creates a data table that provides as much chemical insight into the data as possible in relation to the metadata (associated sample information) provided by the user. Such data tables can be viewed as networks directly in the GNPS website or exported and manipulated in other data visualization tools and statistical analysis packages. Here we provide a GNPS-based molecular networking tutorial in which we import the table into a third party tool called Cytoscape, a powerful network visualization software. Notably, the information represented in and inferred from a molecular network is dependent on the input, including both the mass spectrometry data 88 and networking parameters selected.</p><!><p>A well organized and well thought-out experimental plan is essential for the successful creation of useful molecular networks, since molecular networks are only as meaningful as the experiment and data from which they originate. This includes providing sample information (metadata) tables and raw data files for the sample set; metadata tables aid the creation of molecular networks that have increased interpretative value. In order to avoid pitfalls associated with large-scale mass spectrometry experiments, e.g. batch effects 89 , sample carryover and/or contamination 90 , and high background signal 91 , and to maximize reproducibility and signal-to-noise ratio 92 , a dataset should include blanks, quality control (QC) samples, and experimental replicates. Dunn et al. 93 describe an appropriate representative experimental design in detail that includes blanks, quality control mixtures, and samples plus internal standards. Petras et. al. 38 provide an example that illustrates control metrics, including evaluation of quality control mixtures and signal deviation of the internal standard.</p><p>We recommend preparing control samples using exactly the same protocols and experimental conditions used to prepare test samples (i.e. the same types of tubes, the same batches of tubes, the same extraction solvent, extraction time, sonication time/power and so on). These blank samples inform which ions come from the experimental conditions and they can be subtracted from test sample signals in the molecular networking analysis (see section 3.4.3). The requirements for QC associated with a broad assessment of the natural product composition of an extract library used in bioactivity screens is different from a detailed clinical study for biomarker discovery. When possible, one should add internal standard(s) to each sample to ensure that the system performs consistently. If the internal standard(s) do not match the user-defined acceptable chromatography variations, the sample needs to be either removed from downstream analysis or rerun. This is particularly useful in applications where thousands of samples, such as natural product extract libraries, are screened. Further, when acquiring data for a large number of samples, especially when multiple batches are used, we suggest acquiring data for additional QC samples to monitor batch and plate effects throughout the experiment in order to assess instrumental variations over time, such as retention time drift. QC samples may either consist of aliquots from a subset of test samples pooled together (pooled QC) or be mixtures of molecules specifically defined for quality assurance. For example, it is common to use the last column of a 96-well plate for the QC mixture to ensure that the instrument and chromatography behave in an identical fashion throughout an experiment. Finally, data from experimental replicates, including both technical and biological replicates should be acquired in a randomized fashion. This is especially important for large-scale population studies to ensure minimized bias. One common problem in metabolomics and LC-MS analysis is sample carryover, caused by residual compound(s) from a previous run. One way to reduce this issue is to insert a wash routine between samples followed by a blank to ensure that no carryover is observed.</p><!><p>GNPS-based molecular networking parameters may be varied significantly and need to be set appropriately for the acquired dataset, based on sample (anticipated molecular masses and types of molecules), instrument resolution and collision energies used for MS acquisition. Networking parameters are described in detail in Section 3.3, Table 1, and should be considered and selected carefully in order to obtain useful networks, which ultimately depend on the quality and quantity of MS 2 spectra.</p><!><p>Since GNPS-based molecular networking utilizes MS 2 data, it is susceptible to the same challenges encountered in any mass spectrometry data acquisition experiment, such as low signal-to-noise, insufficient separation of analytes, or poor peak shape. 94,95 In addition, classical molecular networking can provide only qualitative information about the experiment because only MS 2 scans are considered in the analysis. While feature-based molecular networking (Box 4) incorporates MS 1 and chromatographic data, which approximates quantitation, it is still not strictly quantitative. If calibrated quantitative information is needed to answer the scientific question, follow-up experiments should be performed using targeted LC-MS.</p><p>Additionally, one should consider potential issues that accompany metabolomics experiments, such as sample extraction efficiency and reproducibility, as well as unwanted metabolite degradation. While avoiding degradation or modification of all molecules in a sample is impossible, it is important that all samples for comparison are prepared and analyzed in an identical manner, unless the goal is to understand the effects of sample preparation conditions 96 . While a few publications describe the impact of storage on the detectable metabolome, these are sample type-specific and there is currently no consensus for a "gold standard" [97][98][99] . Ultimately, sample preparation is highly dependent on the type of sample collected, and includes drying, homogenization, and extraction steps 100 . Although every lab has their own preferences for sample treatment, we strongly advocate for samples to be collected and extracted with solvent as soon as possible. The speed of this is dependent on the experimental environment. For example, samples collected in remote areas, at sea using a small boats, or often even in a clinical setting, may be stored for hours or days before they can be extracted, given that some solvents are not easily brought into a clinical setting or used while out at sea. In contrast, samples from a cultured system in a lab or an enzymatic reaction, for example, can be halted in milliseconds using a rapid quench system and can then be extracted in seconds. The choice of solvent and extraction protocol is dictated by the experimentalist's interests and questions. Although there is always overlap among the molecules from even very different extraction protocols, more polar metabolites are extracted with ethanol, methanol and butanol while more hydrophobic metabolites are extracted with benzene, ethyl acetate or chloroform 96 . The samples can then be introduced into the mass spectrometer using frontend separation techniques, most often liquid chromatography or ion mobility. If mass spectrometry cannot be performed immediately, we recommend completely drying the samples before storage at cryogenic temperatures.</p><p>To annotate unknown molecules, GNPS queries MS 2 spectra against MS 2 data in reference libraries and assigns a cosine score based on their similarity. For the GNPS spectral library, MS 2 spectra are acquired from laboratories around the world using a variety of mass spectrometers and sample preparation protocols. Therefore, mass spectra submitted to GNPS can differ in terms of both quality and content. For instance, MS 2 fragment ions and their intensities can vary significantly between instruments, and even on the same instrument if the experimental setup is changed 101 . GNPS requires that the instrument and ion source be specified with each reference spectrum submitted and it is recommended that this be taken into account when assessing the quality of a library hit. Along these lines, annotations of unknown molecules are not all accurate and should be considered putative until confirmed with an authentic chemical standard.</p><p>On average, in 2016 when GNPS was published, only 2% of spectra in an untargeted mass spectrometry metabolomics experiment were annotated 102 . Although this percentage has grown to an average of 5-6% annotations, a large percentage of MS 2 spectra typically remain unannotated. The structures of these unannotated molecules or "dark matter" 103 might be known, but their identity is not revealed because no reference spectra exist in library databases, against which to compare. To improve annotation rates, in silico tools have been developed to match unknown MS 2 spectra to putative chemical structures 104 . Several of these computational tools, which include MetFrag 105 , MetFusion 106 , SIRIUS 107,108 , CSI:FingerID 109 , MS-Finder 110 , Network Annotation Propagation (NAP) 85 , and Dereplicator 82,83 can be integrated into GNPS molecular networking workflows to provide insight into the annotation; the application of such tools is beyond the immediate scope of the networking protocol presented here. 2.0 Materials 2.1 REAGENTS CRITICAL For specific storage and handling instructions, consult the manufacturer of each reagent. Although high grade solvents are used, different batches of the same solvents (even purchased from the same vendors), can give rise to different background contaminants in the experiment. There are also many possible substitutes for the reagents and consumables listed below.</p><p>•  A) for LC-MS by adding LC-MS-grade formic acid to LC-MS-grade water to make a 100:0.1 (vol/vol) water/formic acid mixture. The LC solvents can be stored at room temperature for up to 1 week. ! CAUTION Formic acid is highly corrosive. CRITICAL The aqueous mobile phase for LC-MS should not be stored for more than a week because of the potential for microbial growth. Organic LC-MS mobile phase, Solvent B Prepare the organic mobile phase (Solvent B) for LC-MS by adding LC-MS-grade formic acid to LC-MS-grade acetonitrile to make a 100:0.1 (vol/vol) acetonitrile/formic acid mixture. The LC solvents can be stored at room temperature for up to 1 week. ! CAUTION Formic acid is highly corrosive and should be handled in a flow cabinet while wearing eye protection and gloves.</p><!><p>Both ion source parameters and data dependent acquisition (DDA) parameters are essential for obtaining quality MS 2 spectra to be used for molecular networking. Although many instrument configurations exist, several representative ion source and DDA parameters are described below. Relevant to these MS parameters is the LC method used, an example of which is a gradient profile from 10 to 100% ACN + 0.1% FA in H2O + 0.1% FA (for 12 min), followed by isocratic 100% ACN + 0.1% FA (for 3 min), and 5% ACN + 0.1% FA (3 min) re-equilibration pahse, with a flow rate of 400 µL/min. Suggested instrument parameters for ABSciex, Agilent, Bruker, Shimadzu, Thermo Scientific, and Waters are provided in the supporting information.</p><!><p>In addition to the protocol described in the following, all steps, albeit in less detail, are also described and continuously updated and maintained in the online GNPS documentation at: https://ccms-ucsd.github.io/GNPSDocumentation/ The data submission and molecular networking workflow (section 3.2 onwards) may be followed as a tutorial using an untargeted metabolomics dataset for 3D molecular cartography of the mouse duodenum (paper is in review, MassIVE dataset MSV000083437). This dataset is a subset of a collection of metabolomes analysed from organs of germ free (GF) and specific pathogen free (SPF) mice that led to the discovery of new amide conjugated bile acids made by bacteria that affect host metabolism via farnesoid X receptor (FXR) agonism. The following procedure will take the reader through submission of dataset MSV000083437 to the molecular networking workflow in GNPS, through the molecular networking workflow in GNPS (including input parameters), and through visualization of the generated network using both in browser and Cytoscapebased visualization (Fig. 3). Figure 3. The readers will recreate the mouse duodenum global molecular network depicted above, created from MassIVE dataset MSV000083437 and visualized in Cytoscape. Pie charts represent relative summed precursor ion intensities per MS 2 spectra detected within each metadata group: red for germ-free (GF) and blue for specifcpathogen free (SPF) mice. The Box highlights a cluster we will examine below in terms of chemical interpretation. 3.1 Data conversion -Timing 1 hour up to a few days (varies depending on size of dataset and computer set-up) GNPS-MassIVE converts raw data formats after upload to .mzML format (stored in the ccms_peak folder) for GNPS processing. Nevertheless, to enable immediate use of the data, it is recommended to manually convert the raw data to open file formats prior to uploading to GNPS-MassIVE. The protocol for data conversion depends on the instrument used for mass spectrometry acquisition. MSConvert can be used for the conversion to a GNPS-compatible format of mass spectrometry data acquired on AB Sciex, Agilent, Shimadzu (after initial conversion, SI Methods), Thermo Scientific and Waters instruments. Although one of the most common formats used in GNPS, Bruker files (.d format), at this time, are still not MSConvert compatible. For Bruker files, a separate workflow must be    = Germ free (GF) mice = Specific Pathogen Free (SPF) mice utilized, which applies internal lockmass calibration to the output file. This Bruker workflow is described in more detail in the SI methods. Alternatively, for AB Sciex, raw files (.wiff) could be converted into .mzML format using the AB MS Data Converter (AB Sciex version 1.3 beta, freely available at https://sciex.com/software-support/software-downloads).</p><!><p>MSConvert can be downloaded freely from ProteoWizard at: http://proteowizard.sourceforge.net/download.html. This software is compatible with Windows and Linux operating systems but is not supported for Mac OS. When downloading ProteoWizard, the version of Windows must be specified and .NET Framework 3.5 SP1 and 4.0 must be installed. Then either a traditional workflow or an easy workflow can be used for the file conversion. These two workflows are detailed below. The "traditional" workflow, outlined below, is the manual workflow.</p><p>2) Mass spectrometry files must be converted to open file formats such as .mzXML, .mzML, and .mgf formats for analysis in GNPS, with the prefered formats being .mzXML and .mzML. Although it is encouraged to co-submit the raw data to MassIVE, GNPS does not support .mzData, .xml, .raw, .wiff, .scan, .d, and .cdf formats.</p><p>3) MSConvert is the recommended software for conversion of data acquired on AB Sciex, Agilent, Thermo Scientific and Waters instruments. Conversion can be performed following the steps outlined below: a. In the Start Menu, the ProteoWizard folder can be selected and MSConvert can be opened. b. To select file(s) for conversion, click Browse; then click 'Add' to add file(s) to the workflow and select a directory for the output. c. To convert the vendor file format to an .mzXML file, select .mzXML under Options;</p><p>32-bit should be selected for binary encoding precision and Use zlib compression should be unchecked. d. Choose Peak Picking under the Filters heading and under Algorithm check Vendor, then write in MS-Levels 1-2 and finally add the filter by clicking Add. ! CRITICAL STEP Move the peakPicking filter to the top of filter list. The peakPicking filter must be the first filter in the list or the output file will not be centroided. e. Click Start then check the folder for the .mzXML files in the Output Directory. These files can be opened in SeeMS (Installed with MSConvert), OpenMS TOPPView (https://github.com/OpenMS/OpenMS/releases) 112 or MZmine2 (https://github.com/mzmine/mzmine2/releases) 113 to verify that the conversion worked properly. An "easy" workflow is also available. This simple batch conversion method includes a complete package for Windows users to convert vendor formats to GNPS compatible format (mzXML, mzML, MGF) and is described in the SI Methods. An online data conversion tutorial can be accessed at: https://ccmsucsd.github.io/GNPSDocumentation/fileconversion/.</p><!><p>It is necessary to create an account with GNPS in order to submit datasets and create workflows, as well as to receive emails about the outcomes. Making a GNPS account automatically sets up a MassIVE account that uses the same login and password. To manipulate MS data files in GNPS, they must first be uploaded to MassIVE, which is an online repository for mass spectrometry datasets hosted by the UCSD Center for Computational Mass Spectrometry (CCMS). The user workspace in GNPS / MassIVE provides a personalized location for researchers to curate mass datasets, submit and monitor GNPS workflows, subscriptions to datasets that have been made publicly available by others, or clone and reanalyze either their own or other public datasets. More information on subscriptions to data can be found in sections 3.6. Towards the top center of the page, above the large GNPS logo, click on "Register New Account" (right hand grey box).</p><!><p>On the new page that loads, enter a username, name (optional), organization (optional), email, and password (twice for confirmation) in the spaces provided. 4)</p><p>Click submit.</p><!><p>Sign-in to your new GNPS account http://massive.ucsd.edu/ProteoSAFe/) and check that your GNPS credentials work for logging in to MassIVE. Box 1: Navigating the User Workspace Portal At the top of the GNPS website, users will find a banner that allows them to navigate their personal workspace and access additional resources such as the help forum and molecular networking documentation. Within this space, the 'My User' tab provides a way to view all MassIVE datasets and reference spectra deposited by the user, and the 'Jobs' button allows easy access to all jobs submitted by the user through the GNPS and MassIVE interfaces. Clicking on 'MassIVE datasets' allows the user to browse and subscribe (section 3.7.3) to all public MassIVE datasets with GNPS in the title. Additionally, this banner is a portal to all resources for help using GNPS. The 'Documentation' link in the banner takes the user to the GNPS documentation website, which has step-by-step instructions and links to tutorial videos as well as access to the 'legacy' documentation (from a menu on the right-hand side of the page) that can provide additional information to the user. The 'Forum' button opens a Google groups forum where users can post questions, have discussions and report potential bugs. The corresponding online tutorial can be accessed at: https://ccms-ucsd.github.io/GNPSDocumentation/quickstart/ 3.2.2 Deposit data files by submitting a dataset (SI Fig. 3) : An online tutorial on how to submit a dataset to MassIVE can be accessed at: https://ccmsucsd.github.io/GNPSDocumentation/datasets/#submitting-gnps-massive-datasets There are two steps to submitting a dataset to the GNPS-MassIVE repository:</p><p>Step 1 (SI Fig. 3a). Upload your data files to the MassIVE web server using an FTP client -Timing 10 min to get the upload process started.</p><p>Of the many free dedicated FTP clients, the following are more popular ones that have been tested with MassIVE: WinSCP, CoreFTP, and CoffeeCup Free FTP for Windows, and Cyberduck or FileZilla for Macintosh. Caution: when downloading an FTP client for use, make sure it comes from a trusted source to avoid malware. Data files transferred to MassIVE should be in .mzXML, .mzML, .mgf formats. The data that is uploaded should not be in a file archive (e.g. zip, tar) format. It is also encouraged that the original vendor raw data files (e.g. .wiff for AB Sciex, .yep for Agilent, .d for Bruker, .lcd for Shimadzu, .raw for Thermo Scientific) are uploaded together with the open formats as described below.</p><!><p>Change file protocol to FTP and log onto the FTP server with the host name massive.ucsd.edu using your MassIVE web account username and password in the FTP client program for FTP file transfer. Most FTP clients use this "Quick Connect" feature. Alternatively, type in the FTP server name, username and password, and then connect directly.</p><p>Step 2 (SI Fig. 3b). Run the MassIVE dataset submission workflow on the uploaded files as follows: 1)</p><p>Load the home page for MassIVE from the GNPS home page by scrolling down to the GNPS-MassIVE datasets section and click on the 'Deposit dataset' bar in the 'Create Public datasets' block. Alternatively, click on the 'Submit your data' link in the paragraph titled 'Submit Data' on the MassIVE home page. A direct way to deposit the data is to navigate directly to the MassIVE home page (http://massive.ucsd.edu/ProteoSAFe/). This will bring up the Dataset Submission workflow input form, on which there are varying numbers of fillable fields under each of the following sections described below.</p><p>The reader can follow along (SI Fig. 3), as this has already been completed for the MassIVE dataset MSV000083437.</p><!><p>In the 'Workflow Selection' section: Enter a title for your dataset, noting that GNPS datasets must have a 'GNPS' prefix in the title in order for these GNPS-MassIVE datasets to be visible to GNPS users. Adding GNPS in the title is therefore absolutely !IMPORTANT! for the dataset to become a part of the community and ensures that the data becomes alive (Section 3.6) and enables subscriptions and other analysis features specifically used for the GNPS community (Section 3.6). If a "GNPS" tag is not added at the beginning of the title it will not be part of the GNPS analysis infrastructure. Currently all of MassIVE has almost ~11,000 public mass spectrometry datasets (mostly proteomics), ~1,100 of which are also part of GNPS. If GNPS is not added from the beginning it is possible to go to MassIVE, log-in and edit the title at a later time.</p><p>To satisfy this requirement for the dataset that reader will use in this tutorial, MassIVE dataset MSV000083437 has been titled "GNPS Example Dataset_GF vs. SPF Mouse Duodenum."</p><!><p>In the 'Dataset Metadata' section: To minimize the burden to make datasets for GNPS analysis and to enable as much flexibility in what additional information the user wants to make available, very few metadata fields are absolutely required, although the user is encouraged to provide as much metadata as possible. It should be noted that the datasets that have the most information associated with it are also the datasets that are the most visible to the community. Fields for metadata relevant to the dataset being submitted are listed in the table below. The first three fields ('Species', 'Instrument' and 'Post-Translational Modifications') are backed by lists of standardized controlled vocabulary (CV) terms, maintained by organizations such as the HUPO Proteomics Standards Initiative 114 and many others CVs that the user can implement 114,115 . To search these terms, type at least 3 characters into any of these text boxes, and a drop-down list of supported terms that match your query will be displayed. To select a term, click on it in the drop-down list and it will be added to your dataset. Using the official CV to tag your dataset greatly increases the likelihood that it will be found and processed correctly by any automated software that may interface with the MassIVE repository. If the term you want is not present in the list, you can type your custom text in the text box and click the adjacent 'Add' button to tag your dataset. Gel Images -Any gel image files generated, in the event that twodimensional gel electrophoresis has been used as a separation method. iii)</p><p>Sequence Databases -Any files from protein or other sequence databases that were associated with or searched against in the analysis of this dataset, if applicable (usually .fasta format). For readers that are following the example, peak List files were uploaded previously for dataset MSV000083437, as illustrated in SI Fig 3b, where nine folders (Control, GF1, GF2, GF3, GF4, SPF1, SPF2, SPF3, SPF4) have been added.</p><!><p>'Mapping Spectrum Files to Identification Files' is not necessary for small molecule workflows. In order for a submission to qualify as 'complete', each spectrum (data) file referenced within a "Result File" must be associated with a file from the "Peak List Files" category. This section is where these two types of files are associated with each other as appropriate.</p><!><p>The 'Dataset Publication' section has three optional fields to: a) 'Enter a Password' (e.g. to share selectively with collaborators and manuscript reviewers), b) 'Share on ProteomeXchange' is not applicable to small molecule workflows: checking the box will submit and announce the dataset via the ProteomeXchange consortium at the time that it is made public on MassIVE. The dataset will not appear publicly in either repository until you click the 'Make Public' button on your dataset's status page (see below). c) 'Generate a DOI' if you want a Digital Object Identifier to be generated and assigned to this dataset. This is encouraged for all public datasets and can be used in publications.</p><!><p>The section titled 'Advanced Global FDR Settings' is not applicable to small molecule workflows. It is currently for global False Discovery Rates across submitted files in proteomics datasets.</p><!><p>In the 'Workflow submission' section, enter an email address at which you will receive notifications when workflow jobs are completed.</p><!><p>Once a dataset is submitted to MassIVE, it will have an MSV accession number, and will be a private dataset in the repository, accessible only to the submitter through their personal user interface or via a user approved password protected link (e.g. perhaps during a review for publications). To make a dataset public, first select the 'Jobs' tab of the user workspace portal (Box 1) to find the dataset. In the list of all job submissions, MassIVE dataset submissions will appear as 'MASSIVE-COMPLETE' workflows. Click on 'DONE' next to the MassIVE dataset to be made public and choose 'Make Dataset Public'. On the MassIVE website, to enable immediate use of the MassIVE dataset for GNPS workflows click on the "Convert Spectra" tab. This converts the uploaded files to .mzML in a new folder called "ccms peak". Otherwise, the uploaded data will be queued for this conversion and will not be immediately available. The dataset MSV000083437 has been made public, as illustrated in SI Fig. 3; this feature enables any reader to interact with the data and follow along with this workflow.</p><!><p>Many GNPS users do not realize that when they have a dataset with MSV accession number their data is not yet public and thus remains in their private space, in accordance with GNPS-MassIVE philosophy that the data depositor should define how much and when they want to share their data in the public domain. Alternatively, upon submission, users can choose to make a dataset entirely available or 'public' to the GNPS community for browsing, commenting, subscribing, and/or downloading. This not only promotes robustness and reproducibility in MS data analysis, but also provides the user with access to the knowledge of the entire community. Indeed, the utility of GNPS for all users increases as more data becomes public, and the information and knowledge gained by any one user from this free service to the community derives from contributions made by the rest of the GNPS community. Thus, if you are a GNPS user benefiting from community contributions, by making your datasets public (and contributing network annotations, section 3.5), you are giving back to the community. It is encouraged that all users make their data public as early as possible, which provides the depositor with access to advanced features that are not available for private datasets. These features include being able to subscribe to the dataset, find related datasets, share datasets with collaborators, access living data, and utilize emerging features such as Mass Spectrometry Search Tool or MASST (the equivalent of BLAST for small molecules 119 ). It is expected that features will continue to be developed further, thereby continually increasing the value for the end user, of both their own and other public datasets. 3.3 Molecular networking in GNPS (SI Fig. 4) -Few minutes to several hours/days (depending on dataset size, user expertise) Once MS data files are uploaded as datasets in GNPS-MassIVE, they are available to use for analysis workflows within GNPS. Here we highlight how to execute the molecular networking workflow. A dataset can be recalled from either private or public domains in MassIVE for networking analysis. Once data files have been added, they will be populated in the 'Basic Options' section of the workflow selection. The user must then input a number of parameters before running the GNPS job in both the 'Basic Options' section and in a number of 'Advanced Options' sections. The advanced parameters are dependent on analysis platform, experimental setup and conditions for acquisition of mass spectra, and will require the user to understand their ionization methods, fragmentation conditions and energies, mobile and stationary phases, and the fragmentation behavior of molecules of interest. Suggested settings for a variety of platforms are provided in the experimental section (Equipment Setup, Mass Spectrometry). A GNPS job will take approximately 10 min for small datasets (up to 4 LC/MS files), 1 hr for medium datasets (5 to 400 LC/MS files), and several hrs (to days) for larger datasets (400+ LC/MS files).</p><!><p>1) Log in to GNPS (refer to section 3.2.1 for information about how to set up account).</p><p>The GNPS website banner contains tabs to navigate the platform, including tabs to navigate to MassIVE datasets, help Documentation and Forum, along with Contact information (SI Fig. 1, Box 1). 2) Upload desired dataset(s) to MassIVE (section 3.2.2). This step can be skipped if importing existing data files from MassIVE. Readers following the tutorial can omit this step because the GNPS-MassIVE dataset MSV000083437 already exists. 3) From the GNPS splash screen (home page), start a molecular networking job by clicking the 'Create Molecular Network' button (SI Fig. 4a). This will bring up the main workflow input page which has a number of fillable fields to complete under each of ten sections (SI Fig. 4b). 4) In the 'Networking Parameter Presets' section, one of three options may be selected to set the networking parameters to approximately appropriate values depending on the size of your dataset. Clicking on one of these three options will open a workflow input form in a new tab. The default workflow settings are for 'medium data'. 'Small data' refers to a dataset of up to 4 LC-MS files, 'medium data' corresponds to datasets of 5 to 400 LC-MS files, and 'large data' is applicable to datasets of more than 400 LC-MS files (e.g. MSV000083437 is a medium dataset with 113 files in total). Since readers following the tutorial on the dataset MSV000083437 are guided through selection of parameters, no Parameter Preset should be chosen for this example. 5) In the 'Workflow Selection' section, enter a descriptive name for the job into the 'Title' field to facilitate retrieval of the workflow upon its completion. Readers following the tutorial can type 'GF/SPF Mouse Duodenum Example' in the 'Title' field (SI Fig. 4c). 6) Under 'Basic Options', the user will input the LC-MS files for the molecular networking workflow by choosing the 'Select Input Files' tab next to the 'Spectrum Files (Required)' field. A pop-up window with three tabs will appear: 'Select Input Files', 'Upload Files', 'Share Files' (SI Fig. 4d). If you are interested in analyzing multiple datasets together, you will have to repeat the above procedure with the other MSV numbers to import them into your user space.</p><p>For readers following the dataset MSV000083437 tutorial, files can be imported by selecting the 'Share Files' tab. In the 'Share Files' window enter the MassIVE accession number for the dataset (MSV000083437) in the 'Import Data Share' box (SI Fig. 4e). After clicking 'Import', the dataset will appear in your GNPS user workspace and files can be selected for the GNPS networking workflow under the 'Select Input Files' tab as described below. 7) For inputting mass spectrometry files already in your user workspace choose the 'Select Input Files' tab (SI Fig. 4f). From the list of datasets towards the lower left of the window, select all of the files you want to analyze by clicking on individual files or an entire folder. For readers following the tutorial, GF1, GF2, GF3, GF4, SPF1, SPF2, SPF3, and SPF4 should be selected from the folder labeled 'peak'. 8) Next click on the 'Spectrum Files G1' button (top of left-hand column list, with green arrow) to mark this folder / files for analysis. Your selection(s) should appear in the 'Selected Spectrum Files G1' folder in the right-hand column of the window. For readers following the tutorial, folders containing data for GF1, GF2, GF3, GF4, SPF1, SPF2, SPF3, and SPF4 should now be under 'Selected Spectrum Files G1' (SI Fig. 4g). 9) Load the associated metadata file (see Box 3 for format) separately into the 'Selected Metadata File' folder. To do this, select the file from your workspace list (often within a MassIVE dataset in the folder labeled as 'other'), click on the 'Metadata File' tab with the green arrow, and check that the file appears in the righthand 'Selected Metadata File' folder. For readers following the tutorial, '3DMouse_duodenum_metadata.txt" can be selected from the folder labeled 'other' (SI Fig. 4h). 10) Once files have been selected, the popup window can be closed by clicking on 'Finish Selection'. Datasets from both your private workspace and the public domain can be recalled using either strategy. For readers following the tutorial, the final data input is shown in SI Fig. 4i. 11) In the 'Basic Options' section, fill in the 'Precursor Ion Mass Tolerance' (PIMT) and 'Fragment Ion Mass Tolerance' (FIMT) fields taking into consideration the instrument resolution and calibration, as well as the acquisition parameters and the targeted/anticipated molecular masses (see definitions and Table 2 below). The default is ± 2.0 Da for PIMT and ± 0.5 Da for FIMT because the reference libraries also contain spectra from low resolution instruments (e.g. ion traps of QqQ). These can be adjusted to any appropriate value. For high resolution instruments the values commonly used are ±0.01 Da (Orbitrap) and ±0.02 Da (qTOF) for both PIMT and FIMT.</p><p>For readers following the tutorial example, data were acquired on Bruker MaXis qTOF instrument using ±0.02 Da. The 0.02 Da value translates into a maximum error of 40 ppm at m/z 500, 20 ppm at m/z 1000 for the precursor ion, and 13 ppm at m/z 1500, which is consistent with the typical m/z range for small molecules. (Note that peptidic small molecules may be 2000 Da or more, although multiply charged, and thus PIMT and FIMT values of 0.03 Da should be used.) Therefore, readers should use ±0.02 Da for both PIMT and FIMT for the example dataset (SI Fig. 3c).</p><!><p>The default parameters recommended above for high resolution mass spectrometers will not result in comprehensive searches of the spectral libraries generated on low resolution mass spectrometers, such as ReSpect 78 , large portions of MassBanks 74 , GNPS community contributed; a significant portion of spectra that were annotated by matching to the NIST Mass Spectral Library with Search Program Data Version: NIST v17 (https://www.nist.gov/srd/nist-standardreference-database-1a-v17) are also low resolution. In addition the natural products community contributes annotated spectra that may be high or low resolution, from a range of different spectrometers. !CAUTION! Though using low resolution parameters may increase the number of annotations, it will also increase the number of false positive annotations. PIMT: This parameter is used for MS-Cluster 10,12 and spectral library searching, and the value influences the clustering of nearly identical MS 2 spectra via MS-Cluster. FIMT: For every group of MS 2 spectra being considered for clustering (consensus spectrum creation), this value specifies how much fragment ions can be shifted from their expected m/z values. Table 3. Absolute mass differences (Da) and associated mass error (parts-per-million, ppm) for illustrative m/z values</p><!><p>12) The user should complete the remaining fillable fields in 'Advanced Network Options', 'Advanced Library Search Options', and 'Advanced Filtering Options' according to their experimental design. Recommendations and values used for the example dataset are provided in Default setting is 100 -this value can be set to 0 to allow for an unlimited number of nodes or a higher setting can be used for larger datasets or for datasets containing many structurally-related molecules. (Use 100 for example MSV000083437)</p><p>Metadata File (= sample information file)</p><p>File added to the analysis that describes the experimental setup and details to allow for better downstream data visualization, analysis and interpretation Add as a .txt file that follows the template and instructions available in the supporting information (Metadata file uploaded is described in step 9, section 3.3. Example metadata can be found in SI Tables 10 and  11, and a description of how to create a metadata file can be found in Box 3.)</p><!><p>It is encouraged to use the metadata table instead</p><!><p>Library Search Minimum number of shared The default value is 6. Dependent on the aim Min Matched Peaks fragment ions to make a library match.</p><p>of the experiment: a lower value may yield more tenuous matches to library spectra, suitable for exploratory structure searching; a higher value, selecting for closer matches, facilitates dereplication of putative known compounds. The impact of this parameter is discussed in Scheubert et al. 120 (Use 4 for example MSV000083437)</p><!><p>Minimum cosine similarity score to make a library match.</p><p>The default setting is 0.7. Dependent on the aim of the experiment: a lower value may yield more tenuous matches to library spectra, suitable for exploratory structure searching; a higher value, selecting for closer matches, facilitates dereplication of putative known compounds.</p><p>(Use 0.7 for example MSV000083437)</p><p>Search Analogs Matches query spectra against library spectra with a modification tolerant search within a specified range for mass differences.</p><p>Precursor ion m/z are allowed to deviate up to a user-defined maximum.</p><p>Fragment ions that differ by the mass difference of the two parent ions are also considered.</p><p>Dependent on the user's preferences, selecting 'Do Search' requires more computing time but also the results are more exploratory. It allows for dereplication not only of identical molecules but also related molecules.</p><!><p>Maximum mass shift allowed between the query spectra and library spectra m/z values to make a library match.</p><p>Use default parameter of 100 Da: may increase or decrease the value depending on properties such as anticipated molecular mass shift of related molecules in the samples. (e.g. 162 Da is a common mass shift for oligosaccharides). The larger this value the more likely spurious matches will be found.</p><!><p>Applied before MS-Cluster.</p><p>For each MS 2 spectrum, the 25% least intense fragment ions are collected and the std-dev is calculated, as well as the mean. A minimum peak intensity is calculated as mean + k * std-dev where k is userselectable. All peaks below this threshold are deleted. By default, this filter is Using this filter is not recommended. A default value of 0 should be used so that no filter is applied.</p><p>inactive (value is set to 0).</p><!><p>All fragment ions in the MS 2 spectrum below this raw intensity will be deleted.</p><p>This filter is infrequently used. Use a default value of 0 so that no filter is applied, especially if the raw intensities of your data are very low.</p><!><p>All peaks in a +/-17 Da around precursor ion mass are deleted. This removes the residual precursor ion, which is frequently observed in MS 2 spectra in the comparison of all spectra for molecular networking.</p><p>Apply filter, which is the default option.</p><p>Filter Library Applies the above precursor ion window filter to the library as well.</p><p>Apply filter, which is the default option Filter Peaks in 50 Da Window Removes peaks that are not one of the top 6 most intense within a +/-50 Da window.</p><p>This is commonly turned on. Dependent on the dataset: if samples contain a large number of low mass molecules or are complex mixtures containing compounds of low titer, this filtering should be turned off, as it may filter out relevant peaks that could be signals. BOX 3: Sample information (metadata) collation and input -Timing typically 1-2 hours for a small dataset; up to a few days for large complex metadata entries of large datasets 121 . The inclusion of a metadata (sample information) table is extremely valuable for interpreting the molecular network that is generated using the data. Although a time consuming step, it is also one of the most valuable steps for interpreting the final molecular network. The more time spent on curating sample information (metadata), the more useful the resulting molecular network will be. The metadata table links the MS files uploaded and selected for molecular networking analysis in GNPS with various attributes of the collated data based on the filename (such as "Filename.mzXML"). For instance, the metadata table provides the necessary information to visualize the "origin" of the detected metabolites when "origin" is one of the attributes used in the metadata table (e.g. column heading: ATTRIBUTE_Origin). A metadata file can be created as follows:</p><p>1) The metadata table must be provided as a text file (tab separated) and can be prepared in a text editor of choice (e.g. Microsoft Excel, Notepad++ for Windows, gedit for Linux, and TextEdit or TextWrangler for Mac OS) . a) When uploading metadata associated with a GNPS job, specifically formatted column headers are required. The first column header must be "filename" (no capitals, case-sensitive and no unusual characters such as @, #, !). Important: The filenames must be the filenames of the data (to be) uploaded to GNPS-MassIVE otherwise the metadata cannot be linked to the data. We recommend not to use any special characters such as @, #, ! or spaces in any of the metadata fields. b) Each other column must begin with the phrase "ATTRIBUTE_" before any header description (e.g. ATTRIBUTE_Origin) 2) In order for sample information (metadata) to be incorporated into global metaanalyses, the template provided in SI Table 10 should we utilized and labeled "gnps_metadata.tsv". There are a number of advantages to uploading a metadata table associated with a GNPS job. When the network generated after data processing is subsequently opened in Cytoscape, the nodes of sub-networks can be visualized based on their associated metadata. This can be represented as a pie chart contained within each node. Additionally, metadata can be used to color-code categories of samples when visualizing the MS 2based statistics, such as principal coordinates analysis (PCoA) in browser using the EMPeror package 122 available in Qiime2 123 . This allows the user to quickly attribute the molecular differences of the samples to certain characteristics found in the metadata. For example, if two distinct groups appeared in the PCoA plot, it would then be possible to color all samples of type one blue and all samples of type two red in order to determine if this attribute could be responsible for the separation. However, it is important to note that PCoA is only visual and doesn't give any statistical support; a PERMANOVA analysis would have to be performed in order to actually test whether an attribute is responsible for separation. Finally, data sharing is a vital part of modern science because it gives opportunities for collaboration, wider scope analyses, and transparency promotes reproducibility and thus scientific rigor. Without metadata attached, public data has less value, will not be discovered as easily by others, and will not provide meaningful results with MASST 119 . A metadata text-based search is being engineered in GNPS so that all public data files with specific metadata entries may be re-analyzed together. When no metadata is available, these public data will not be included in such searches. In short, the visibility and value of data goes up by improving the amount of metadata that is uploaded. Therefore, uploading metadata associated with the MS data to GNPS promotes a more universal approach to science.</p><p>3) In cases where you want to add a new/external metadata file (tab delimited text format) into your workspace, under the 'Upload Files' tab: select the destination folder for the upload on the left and drag the file for upload to the 'File Drag and Drop' box on the right before following the same actions listed in this step. The online tutorial on metadata formatting, including a template file, can be accessed at: https://ccmsucsd.github.io/GNPSDocumentation/networking/#metadata. Metadata format for 'ili 111 For 2D or 3D molecular cartography using 'ili, metadata must contain the following additional information. The spatial coordinates that dictate the spatial distribution of a detected metabolite in a 2D (.PNG format) or 3D image (.STL format) must be included. In addition to the column "filename", extra columns containing the following information: "COORDINATE_x", "COORDINATE_y", "COORDINATE_z", "COORDINATE_radius" have to be added. The x, y and z correspond to the 3D coordinates and the radius corresponds to the approximate values of radii of the sampling points. An image viewer can be used to estimate this value; for example, half of the difference between boundaries of a sampling point in a horizontal or vertical dimension can be estimated. Additional information related to 'ili can be obtained through https://github.com/MolecularCartography/ili.</p><!><p>To visualize molecular networks generated, the user can either (1) directly visualize their network in the GNPS web browser for exploratory purposes, or (2) import data tables generated for viewing in third party software, such as Cytoscape 37 , which is a free software tool that enables visualization of the entire molecular network. These methods are complementary to one another and the user should choose the preferred visualization strategy based on their data analysis needs. The GNPS in-browser visualization tool is a quick, simple way to begin analyzing data, particularly if the user wants to view and compare MS 2 spectra within the network. However, in-browser visualization only allows the user to view one molecular family (sub-network) at a time. For more advanced data analysis and formating options, the user can visualize their network offline in Cytoscape, a program originally introduced by the systems biology community to allow visualization of the complex relationships in biological sequence data. With Cytoscape, one can visualize the chemical space that was detected in the mass spectrometry experiment as a molecular network and provides a way to encode any property of the network (i.e. node label, shape, color or size as well as edge label, thickness, etc.) with a metadata category (i.e. cohort, cosine score, compound source). An online tutorial can be accessed at: https://ccmsucsd.github.io/GNPSDocumentation/networking/#online-exploration-of-molecularnetworks.</p><!><p>After completing the above molecular networking workflow, data analysis can be performed directly in the GNPS web interface. The user can access the in-browser data analysis options from the job status page (Fig. 4), several of which are described in Table 5. Figure 4. GNPS Job Status Page.</p><!><p>View all library hits (SI Fig. 5a) View all spectra with reference database matches and assess the quality of the MS 2 match using the 'View Mirror Match' option. Readers following the tutorial example can view the mirror plot for cholic acid (SI Fig. 5a) in order to compare experimental spectra with library annotation. Readers can investigate mirror plots for other bile acids, as bile acid discovery is the focus of this example.</p><p>View unique library compounds (SI Fig. 5b)</p><p>View all unique spectral matches to the reference database and perform side-by-side comparison between the query spectrum and reference spectrum.</p><p>Readers following the tutorial can view query and reference spectra for cholic acid (SI Fig. 5b).</p><p>View all clusters with IDs (SI Fig. 5c) View all consensus MS 2 spectra that make up a node.</p><p>View spectral families (SI Fig. 5d)</p><p>List of all spectral families (nodes that are connected to one another) and view individual sub-networks using in browser visualization View EMPeror PCoA plot Measures the binary Jaccard distance between samples based on presence/absence of molecular features with associated MS 2 spectra as defined by the mass spectral molecular network. Interactive Principal Coordinates Analysis (PCoA) visualization is enabled through EMPeror 122 . The "View spectral families" option lists each individual molecular family that contributes to the entire molecular network and displays the number of MS 2 spectra and spectral matches to the reference library that contribute to a given sub-network. This function also allows users to visualize each sub-network individually in the web browser by selecting the "Visualize network" link. Once the in browser network is displayed, the user can immediately distinguish between nodes with library matches (blue circles) and unannotated nodes (gray circles). Edges are represented by gray arrows that point from the low mass spectra to the high mass spectra. Further data analysis can be performed in this online interface as described below:</p><p>• Node Labels -Nodes can be labeled by their index number given by MS-cluster, parent mass, or library annotation name. Additionally, the node can be labeled by a binary system to denote if the parent mass is even (1) or odd (0) to assist in visualizing the nitrogen-rule 124 , or with a peptide annotation label (see Search Peptide below). If no node label is desired, select 'None'. • Node Coloring -This legacy feature creates pie charts to visualize mapping of metabolites into different groups. However, this option does not use the sample information (metadata) table and will work only if files were inputted into different groups by the user. !CAUTION! Note also that this is not a quantitative representation of the data because it relies only on MS 2 spectral counts. Rather this feature can be used to understand presence versus absence of compounds in specific groups. • Edge Labels -Edges connecting two nodes can be labeled with either the cosine score or the mass difference between the parent m/z values ('DeltaMZ'). If no edge label is desired, select 'None'. • Edge Highlights -Edges by default are represented as arrows pointing from low mass spectra to high mass spectra, and can be colored. Users are able to enter a mass difference (m/z delta) of their choice in the 'Edge MZ Delta' field, causing those edges to be highlighted in red. Clicking on the graph icon next to 'Edge MZ Delta' opens a new windows containing a graph that shows the distribution of all edge m/z delta values in the sub-network. Selecting a peak in this 'Network MZ Delta Histogram' highlights the corresponding edges in red. The same function can be performed for 'Edge Score Minimum' to highlight edges that have a cosine score greater than what the user enters. • Node size/color -The size and color of nodes can be adjusted based on spectral counts, precursor intensity, number of files, parent mass, even/odd mass, or precursor charge. • Node MS 2 Peaks Highlight -This option allows users to search the sub-network for molecules that contain an MS 2 fragment of interest. To perform this query, first click the download button within this box to pull all of the MS 2 spectra into the browser. The desired m/z value can then be entered into the field to highlight the nodes comprising spectra which contain the desired product ion. Alternatively, the histogram icon can be selected to visualize all product ions from the MS 2 spectra in the sub-network. • Align Spectra -This function enables direct comparison between the spectra of two connected nodes at the peak level. To perform this analysis, the user should first select an edge connecting two nodes, which pulls up the spectra for each node in the right display window. Clicking the "align spec" button overlays the spectra, where red peaks represent peaks of the exact same masses shared between the top and bottom spectra and blue peaks denote peaks matching at shifted masses. • Search Peptide -This is a function added to GNPS to support proteomic and peptidomic dataset analysis. If a peptide sequence is found to be associated with the molecular family and was found through automated peptide mining in MassIVE then the amino acid sequence entered here will be searched. Figure 5. In browser visualization of the bile acid spectral family from dataset MSV000083437. 3.4.2 Assessing the quality of a library hit. All spectral matches are putative annotations 6 until experimentally validated. Spectral matches from molecular networking analysis are annotations at level 2 (compounds that have been putatively annotated e.g. no reference standards) or 3 (compounds that can be putatively assigned to a chemical class based on physicochemical properties and/or spectral similarity) before validation with chemical standards. For level 1 annotation, the molecules would have to be isolated and structures elucidated or confirmed with other techniques such as NMR or X-ray analysis, or matching MS 2 and retention times, together with co-analysis with pure standards, ideally under more than one chromatographic condition. All non-annotated molecules in a molecular network are level 4 unless they are part of a molecular family containing a library match. Levels were defined by the 2007 Metabolomics Initiative 14 , and subsequently refined by the Compound Identification work group of the Metabolomics Society at the 2017 annual meeting of the Metabolomics Society 125 . In order to judge the quality of a match, it is important to consider the mass accuracy of the reference spectra (resolution and calibration of the instrument) as compared with that of the experimental spectra. The sample type, experimental setup, and associated sample information (metadata) should also be taken into account when judging the accuracy of the matches. Notably, MS 2 spectra typically cannot differentiate regio-or stereo-isomers and additional experiments, including comparison with standards, are required to assign the absolute structure.</p><p>To decrease the impact of this variation all spectra, when compared, are subjected to a square root conversion. This decreases the high intensity ions and increases the low intensity ions. Furthermore, to address variability in data quality and source of the reference spectra, GNPS utilizes a ranking system for submitted reference spectra, to enable filtering of the reference library either before performing molecular networking or afterwards, which is the default approach. Similarly the instrument that the reference data were collected on can be considered after doing the analysis in GNPS using postmolecular networking filtering capabilities. 'Gold' reference spectra can only be submitted by approved users and must originate from fully characterized synthetic or purified compounds. This is the same gold standard by which other metabolomics reference libraries such as NIST17 72 , METLIN 73 mzCloud (https://www.mzcloud.org/) 76 , WeizMass (https://www.weizmann.ac.il/LS_CoreFacilities/weizmass-spectral-library-highconfidence-metabolite-identification) 126 libraries are curated. Gold level spectra comprise 83% of the MS 2 spectra provided to GNPS as libraries. A 'silver' rating signifies that the spectrum was submitted with an associated publication. However, GNPS also curates crowdsourced knowledge from users in the community. All remaining reference spectra provided by the user community receive a 'bronze' rating to denote that the annotation is contributed by users including partial or putative annotations. The annotation within GNPS can be made directly from the data and thus relies on the expertise of the experimentalist and purification of the molecules is not required. This gives access to a curated reference database that is crowdsourced and does not rely on commercially available standards. For example, most natural products from microbes, food and plants are not commercially available and thus the crowdsourced knowledge capture provides a resource of information that is inaccessible any other way. The only other resource that currently accepts putative and partial annotations is MassBank EU (https://massbank.eu/MassBank/). Examples of useful but partial annotations include modifications of molecules, such as oxidation of a molecule in which the site of oxidation is unknown 127 and thus a SMILES or InChI cannot be drawn but the partial annotation provides valuable insight to the end user. Additional partial annotations would include adduct clusters such as sodium formate clusters or polymeric substances, including oligosaccharides, commonly detected in mass spectrometry where a structure cannot be drawn but is useful knowledge for the community when performing an untargeted LC-MS/MS experiment. Users can use the above information along with the corresponding cosine score, which takes into account the number of matching fragment ions and differences in peak intensities, and parent mass accuracy to assess the quality of annotation. An empirical cut-off for cosine scoring of 0.7 with 6 MS 2 ions matching is the default setting in GNPS. On average this gives rise to 91% accurate annotations, and ~1% incorrect annotations, with the remainder being attributed to possible isomers (4%) or having not enough information by the user to judge (4%) 120 . However, using a target decoybased method to estimate confidence measures of annotations and false discovery rates (FDR) in large scale metabolomics experiments, revealed that the annotation quality is dataset-dependent and dependent on analysis settings such as number of ions that are required to match. The general trend was that when few MS 2 ions are required to match, a much higher cosine is required and fewer matches will be obtained at the same FDR compared to when more MS 2 ions are required to match the reference spectra. When more ions are matched, the cosine score can be lowered. There is an dataset-dependent optimum for the maximum number of spectral library matches at a specific FDR that is typically around 4 to 6 minimum matched peaks 120 . Although the confidence of the spectral matches increase when more MS 2 fragment peaks are required, there are fewer spectra that have a larger number of ions, resulting in a diminished number of annotations, especially for low MW compounds.</p><!><p>In addition to in-browser visualization, networks can be visualized using third party tools. One popular GNPS-derived molecular network visualization tool is Cytoscape 37 , a convenient software tool to use for data visualization. The steps outlined below provide the user with a working knowledge on how to configure a network in Cytoscape. Readers following the tutorial example can not only reproduce the same properties described in the the steps below to generate a publishable network but also use this network to specifically focus on the cluster containing bile acids in order to discover novel compounds. There are a few options for exporting molecular networks for visualization in Cytoscape. Once molecular networks generated from GNPS are imported into Cytoscape, a number of simple commands can be used to make the network generated more informative, visually appealing, and accessible (SI Fig. 6). Documentation on how to use Cytoscape (versions after 3.7 release) and a Cytoscape community forum are available to assist with troubleshooting and to learn about the latest plugins (also called Cytoscape Apps): https://cytoscape.org/documentation_users.html, https://cytoscape.org/community.html. An online version of this tutorial is accessible at: https://ccmsucsd.github.io/GNPSDocumentation/cytoscape/.</p><p>1. To begin using Cytoscape, download the latest version of the software from: https://cytoscape.org/ according to their instructions (SI Fig. 6a). 2. Once Cytoscape has been downloaded, molecular networks can be imported and visualized using two different strategies. The first option (a) will show a network with no preset layout, while the second option (b) will show a network with default layout settings. a. In order to import data for a network with no layout present (option 1), click on "Download GraphML for Cytoscape" in the GNPS Job status window (SI Fig. 6b). This will prompt an immediate download of a compressed folder containing the .graphML file of interest; after uncompressing this folder using a variety of programs, Cytoscape can be opened. The import network button (three nodes connected by edges, SI Fig. 6c) in Cytoscape can be selected, permitting selection of the .graphml file to load the network of interest. b. The second option for opening a network in Cytoscape is to click on "Direct Cytoscape Preview/Download" in the GNPS Job Status window (SI Fig. 6d). This will direct the user to a new window where a pre-configured version of the molecular network will be displayed. In this window, click on "Download Cytoscape File" to download the file as a Cytoscape session file (.cys file) with the visualization parameters already defined. Cytoscape can then be opened by double clicking on the downloaded .cys file and this network will come preloaded with GNPS default layout.</p><p>c. Readers following the tutorial can use either strategy to open the completed GNPS job run on dataset MSV000083437. 3. Once the molecular network has been loaded into Cytoscape, it can be customized for viewing. By altering many properties of nodes, edges, and networks such as colors, sizes, shapes, and labels, the default network can be transformed into a chemically informative molecular network. Readers following the tutorial example are guided through this process in steps 3a-3j. In the Control panel window, located on the left side of the screen, the style and select tabs offer many options.</p><p>To alter a node style, click on the "Style" tab at the top of the Control Panel, then click on the "Node" tab at the bottom of this window (SI Fig. 6e).</p><p>a. The node labels can be changed in Cytoscape by selecting the dropdown arrow next to the "Label" tab. Readers following the tutorial example can label nodes by selecting "precursor mass" as column and "Passthrough Mapping" for mapping type (SI Fig. 6f). b. Node shape can also be changed. Readers following the tutorial example can click directly on the "Shape" symbol button and select "Ellipse" shape or change to another desired shape (SI Fig. 6g). If using ellipse, the shape can be converted into a circle by checking the box labeled 'lock node width and height' (SI Fig 6h). c. To change the node color, click on "Fill Color" dropdown. Under this column, readers following the tutorial example can select the desired value (i.e. "ATTRIBUTE_host_microbiome") and use this to discriminate groups (i.e. germ free vs. specific pathogen free) from one another. Readers can select "Discrete Mapping" under the "Mapping Type" column, which allows for the selection of a color to be associated with each group (SI Fig. 6i). d. Alternatively at the "Fill Color" option, the "Image/Chart 1" tab can be used to visualize the relative ion distribution from each chosen group in the nodes as a pie chart. Readers following the tutorial can perform this type of visualization by clicking on the "Image/Chart 1" button, selecting the "Charts" tab, and choosing a chart type (the pie chart is chosen in this example). The spectral count information from groups defined in the metadata file can then be selcted from the "Available columns" to the "Selected columns" (SI Fig. 6j) and the user can edit the chart color scheme using the "Options" tab. In this example, "Germ free" and "Specific Pathogen free" can be selected and colored pink and blue, respectively. e. To visualize the variation in the occurence of each ion across samples (e.g count of 1 if not zero) as a function of the node size, go to Size option, select "number of spectra" or "sum(precursor intensity)" as Column and "Continuous Mapping" as Mapping Type. The opened window allows to modify the node size in function of the node metadata column chosen. Begin by setting the value for minimum and maximum node size value with the button Set Min and Max, and then OK. Then move the cursor at each extremities. For readers following the tutorial example, set to the min size at 92 and the max at 362 (SI Fig. 6k). f. Edge style can also be altered by clicking on the "Edge" tab at the bottom of the Control Panel (next to the "Node" tab) (SI Fig. 6l). Readers following the tutorial example can select this tab to make alterations in edge color and width, in addition to other settings. g. To change an edge label, readers following the tutorial can click on the "Label" dropdown arrow then select desired value. For example, mass_difference can be selected as "Column" in the "Passthrough Mapping mode (SI Fig. 6m). h. Edge width can be altered by clicking on the dropdown arrow next to "Width."</p><p>Under the "select value" tab next to the "Column" tab, the desired value used for scaling edges (such as cosine_score) can be selected. At this point, "Continuous Mapping" can be selected under "Mapping Type" (SI Fig. 6n).</p><p>Cosine_score can be selected in the column tab and "continuous mapping" can be chosen under mapping type to easily visualize the approximate cosine score of all edges. i. The ions from experimental conditions present in the blank sample can be subtracted from the molecular networks. In the table panel, readers following the tutorial example can go to the colunm GNPSGROUP:blank, select every rows with ion occurrence (>0), then click on the right mouse buttom and "select nodes from selected rows" can be choose (SI Fig. 6o). The selected nodes were automatically highlighted in yellow in the network. Then, do a right click to choose in the select row "hide selected nodes and edges" (SI Fig. 6p). However, it is possible to remove the ions from experimental conditions before generating a molecular network by data processing 128 . j. To separate one or some specific desired network(s), press "ctrl" or "command" (windows or MacOS, respectively) at the same time selecting the network(s) with the mouse. Then, click on the bottom as shown in SI Fig. 6q. Automatically, the sub-network is created. For going back to the main network, go into the Control Panel by selecting Network, then click on the main network bottom. 4. At this point, readers following the tutorial example have generated a publishable network in Cytoscape from the output of molecular networking in GNPS. This network should look like that shown in Fig. 3. Interested readers can look more closely at the sub-network containing key bile acids in order to practice manual propagation of annotations throughout a sub-network (Fig. 3). Style options are described in more detail in the Cytoscape manual: http://manual.cytoscape.org/en/stable/Styles.html.</p><!><p>A molecular network can be very useful in propagating annotations through manual interpretation of networks in parallel with raw MS 2 spectra. Manual annotation can be performed by looking at mass differences (deltas) in the molecular network and assigning the source of these deltas, i.e. charge retention fragmentations such as retro-Diels Alder reactions or McLafferty rearrangements and charge migration fragmentations such as simple inductive cleavages or ɑ-or β-eliminations 129 . The novel bile acids found in the mouse duodenum provide an example of the utility of manual interpretation of networks (SI Fig 7b). One can use the mass deltas between unknown nodes and neighboring library hits to determine new structures. In the above example, three unknown nodes were determined to be novel bile acids conjugated with phenylalanine, leucine, and tyrosine based on their mass deltas with respect to glycocholic or glycomuricholic acid. A description of how manual propagation of annotations can be performed in the context of the example is given below:</p><p>1) The Cytoscape's toolbar can be used to search nodes or edge metadata (e.g., "shared name"). Readers following the tutorial example can enter "glycocholic acid" with the quotation marks. The node of interest at m/z 466.316 that matches glycocholic acid in the GNPS library are automatically selected and highlighted in yellow in the network (SI Fig. 6g). 2) Manually propagate annotation based on mass shifts. In SI Fig. 7a, glycocholic acid connects to a node with m/z 556.363. Based on the mass shift of 90.047, the unknown node can be manually annotated as glycocholic acid conjugated with phenylalanine. Analogously, nodes with m/z 572.358 and 522.379 could be manually annotated as glycocholic acid conjugated with tyrosine and leucine respectively, accounting for mass shifts of 106.042 and 56.063 Da.</p><p>3) The select function is helpful to find the annotated nodes within the network with a m/z error from 0 to 10 ppm between precursor ions. This tool is available in Control Panel at the Select tab, and can be used to create a selection of nodes and/or edges based on their metadata and/or network topology. Readers following the tutorial example can click on the "+" button and choose "MZErrorPPM" as column filter and move the cursor from 0 to 10, then click on Apply (SI Fig. 7b). These nodes are automatically selected and highlighted in yellow in the network. 4) Advanced computational tools can also be used for automated annotation propagation, such as the Network Annotation Propagation (NAP) tool 85 , or manual annotation can be performed using the results of Dereplicator 82,83 and Mass2Motifs, 130 which can be accessed through GNPS at https://gnps.ucsd.edu/ProteoSAFe/static/gnps-theoretical.jsp.</p><!><p>Once an MS 2 spectra has been fully annotated, it can be added as a reference spectrum to GNPS. Because the GNPS library database is crowd-sourced, users are encouraged to submit spectral annotations because knowledge they have is captured through these annotations of reference spectra and reusable by others. This enables the creation of reference spectra from MS 2 spectra in the dataset without needing to purify the molecule. The assumption is made that the people who collected the data are experts in their samples and thus are in the best position to curate. Additionally, if the same user or lab then uploads another related dataset, and it contains the same molecule, it will be automatically annotated. Users can upload a single reference spectrum by first clicking on "View All Clusters With IDs" in the job status page, then selecting the cluster desired for annotation from the "ClusterIdx" column. Once the cluster is selected, the "AnnotatetoGNPS" button can be selected. This button brings up the workflow for annotation, where input files, sample parameters, desired annotation, advanced annotations and library selections can be added and the job can be submitted. Users can also add a known spectrum to the library from a file uploaded to MassIVE by selecting "Contribute" under the "Add Your Spectrum" heading on the main page, even if molecular networking has not been performed on this file. Additionally, if the user wishes to upload >50 reference spectra to GNPS, a separate batch upload can be performed to streamline the process as detailed in the online help documentation at https://ccmsucsd.github.io/GNPSDocumentation/batchupload/. All annotations can be refined at a later step, and the provenance of each curation is retained within the GNPS-MassIVE environment. For example one person may annotate that they think it is a lipid, the next person may update and specify it is a phosphatidylcholine and the next person may refine this to be 1-oleoyl-2-palmitoyl-phosphatidylcholine and this is all logged in the CCMS spectral library for each MS 2 spectrum.</p><!><p>GNPS users are encouraged to share both the raw mass spectrometry data and associated molecular networking jobs that contributed to peer-reviewed publications by providing the MassIVE accession number (e.g. MSV000083437) and a hyperlink to the GNPS job in the methods or experimental details section of the publication. Datasets uploaded to MassIVE ideally include all raw and peak picked mass spectrometry data and associated sample information (metadata). GNPS records all data inputs, manipulations and analyses of the data, providing a historical record of the data and its origins. This data provenance promotes reproducibility and ultimately quality of the data and its annotations.</p><!><p>Once a job's URL address is shared, any GNPS user can clone the job by following the provided link and clicking 'clone' on the job status page (SI Fig. 8). Cloning a job allows users to view all parameters and files that were used to create the existing network and easily rerun the molecular networking job with the same (or adjusted) parameters and files. Cloning a GNPS job is an extremely useful tool that promotes reproducibility and scientific rigor. This is a feature many users use to submit multiple molecular networking jobs with modified parameters. Note that if data were imported from your private user workspace and not from within MASSIVE, other users will not have access to the mass data and consequently will not alter the analysis in GNPS. If a job has been run in the previous V1 version of GNPS (i.e. it ran using the 'METABOLOMICS-SNETS' workflow), it can be cloned and re-run in version 2 (V2) of GNPS by simply clicking 'Clone Job to Latest Molecular Networking V2 Workflow' on the job status page (SI Fig 8b).</p><!><p>If a dataset is public, users are able to download all files for reanalysis, including raw data and the sample information table (metadata). To access a MassIVE dataset of interest, users should select 'MassIVE Datasets' in the GNPS workspace portal (Box 1) and enter the MassIVE accession number or defining keywords into the search bar. The user can then click on the MassIVE accession number highlighted in green to link to the 'MassIVE dataset information page', and select the 'FTP Download' link to download files. Alternatively, this link can be pasted into the quick connect box of an FTP client.</p><p>In contrast, private datasets can only be viewed by the user who uploaded the data and anyone who has a link to the job status page. The user can create a password protected link. When downloading data from a private dataset, you will be prompted to enter a password for that MassIVE dataset ID. If using an FTP client, you will need to enter the MassIVE ID as the username, followed by a password. If the submitter did not specify a password, then it should be accessible using the password 'a'.</p><!><p>Public datasets remain alive long after publication: for example, they will be searched periodically against the ever growing annotated GNPS spectral libraries, potentially yielding new putative annotations within those datasets. Beyond new identifications within a dataset, subscribers will receive email notifications of other datasets that exhibit chemical similarities to the subscribed dataset. This allows for users to be connected via their research interest to similar datasets. Updates are sent out about once a month and only when there is new information associated with the dataset. To subscribe to a dataset, the user should navigate to the 'MassIVE dataset information' page as described above in section 3.7.2 and click 'Subscribe'. This feature changes the way we interact with data. Previously, data was periodically reanalyzed by the submission of new jobs, but in GNPS, data is automatically reanalyzed and updates are sent to the subscribers. Therefore, data may give rise to useful results a few weeks or even a few years later after it is uploaded or it may enable the dissemination of all the knowledge of this dataset to all lab members or collaborators. BOX 4: Feature-based molecular networking (FBMN)</p><p>The above described molecular networking analysis represents the type of molecular networking that is most widely used currently. This workflow connects clustered MS 2 spectra as nodes based on spectral similarities and makes use of MS 2 data only, even for quantitation. The chromatographic dimension and MS 1 data are not considered in classical molecular networking. However, in MS-based metabolomics studies, statistical analysis is done predominantly from MS 1 -based peak abundances from extracted ion chromatograms (XIC). These chromatigraphic peaks with a specific accurate mass-tocharge ratio are described as features. In order to bridge this gap between MS 1 abundance and MS 2 qualitative information, there is a workflow to link MS 1 intensities derived from LC-MS features with MS 2 information from molecular networking 131,132 . This workflow is called feature-based molecular networking (https://ccmsucsd.github.io/GNPSDocumentation/featurebasedmolecularnetworking/) and can be performed using open acess mass spectrometry processing tools such as MZmine 2 113 , XCMS 79 , MS-DIAL 133 , or OpenMS 112 . In this workflow, feature finding is the computational process of selecting and identifying features in the MS 1 across multiple samples and must be performed prior to generating a network. These tools allow the export of a feature table and corresponding MS 2 scans for each feature, which can be submitted to feature-based molecular networking through GNPS. Furthermore, the integration in MZmine 2 allows a direct submission to GNPS even without being a registered GNPS user. However, by providing the username and password, the new networking job is directly created in the specified user space.</p><!><p>Table 6 below lists some more common scenarios or questions encountered when using GNPS. We also recommend to check the forum link from the banner in GNPS where users can post questions to the GNPS community. This means that the spectral library search step used too much memory and had to be terminated. This is likely caused by changing the set of spectral libraries used in search (such as removing the spectra filtering). This issue can potentially be resolved by increasing the maximum cluster size value to reduce the number of searched spectra. It is not recommended to change the set of libraries included unless you are an advanced user. Please remove all libraries except for the default "speclibs" and rerun.</p><!><p>If a dataset cannot be loaded into Cytoscape, a sub-network of interest can be opened. Alternatively, larger networks can be opened on a computer with more RAM.</p><!><p>This is most easily addressed if the blanks are included in the metadata. Then the user can opt to visualize spectra found in blanks using discrete mapping in Cytoscape or other visualization tool.</p><!><p>The metadata (sample information) table must be formatted correctly. In particular, check whether the first column is named 'filename', whether all file names match exactly the files uploaded to GNPS and have '.mzXML' extensions (or other compatible file format), and whether each metadata column uses the prefix "ATTRIBUTE_" and there are no trailing spaces in any of the headings.</p><!><p>The metadata file must be formatted as a tab-separated .txt file.</p><!><p>Check that the targeted folder is highlighted before dragging and dropping file.</p><!><p>Check that you selected the mzXML peaklist files from the 'ccms_peak' folder of your MassIVE dataset for the GNPS workflow, not the mzXML files generated directly from the raw data files in the 'raw' folder. The value of the minimum cluster size can be reduced. The minimum cosine score can also be decreased to increase the number of edges in the networks.</p><!><p>Waters .raw files to .mzXML / .mzML from data acquired in the MSE mode of Waters mass Datasets acquired on a Waters mass spectrometer using the MSE mode can currently only be converted to .mzML using the vendors UNIFI platform. Alternatively, data need to be collected in DDA or MS 2 mode, for which data conversion to .mzXML/.mzML is enabled through ProteoWizard. spectrometers using ProteoWizard Molecules that I know are structurally similar do not appear to form a cluster Check consensus spectra for the molecules of interest. It is possible that low abundance noisy spectra are included which results in poor consensus. For some classes of compounds that do not fragment efficiently, e.g. certain lipids, the MS 2 spectra are not informative enough to build menaingful network.</p><!><p>Molecular networking of LC-MS/MS data according to the protocol described herein integrates an associated sample information table (metadata file) with the latest molecular networking workflow, to yield a network (.graphml file) that may be visualized directly in GNPS or imported into Cytoscape. The tutorial example followed throughout the protocol demonstrates how contemporary GNPS molecular networking can be used to discover a new set of conjugated bile acids from the mouse gut microbiome as described in section 3.5. 65 The network produced from the protocol should contain a molecular family of conjugated bile acids that includes a library hit for glycocholic acid (Figure 5a). This annotation can be propagated to identify new bile acids by converting the mass differences of the edges into structural motifs. For instance, the user can identify the m/z 546.309 node as a sulfated cholic acid by using its mass difference of 79.993. This strategy was key in determining the structures for the new phenylalanine (m/z 556.362) and tyrosine (m/z 572.358) conjugated cholic acids. This example also showcases how manual comparison of the MS/MS spectra that make up the conjugated bile acid molecular family can also be critical for structural annotation. For example, spectra of Gly-, Phe-, and Tyr-conjugated cholic acid all contain fragment ions identical in mass to their respective amino acid conjugates (Figure 5b). Furthermore, the mass difference between the precursor ion and the common peak at m/z 337.25, which corresponds to amide bond cleavage, matches the exact mass of the conjugated amino acid. In addition to the conjugated bile acids, the user can also find hits for cholic acid and deoxycholic acid in the network. These compounds are present only in colonized mice, as microbes deconjugate tauro-and glycoconjugated bile acids in the duodenum. In addition to the tutorial example, which highlights how molecular networking can be used for the discovery of new endogenous metabolites related to human health, two more examples are presented from published studies 11,50 . One highlights the use of molecular networking in natural products discovery and the other integrates metabolomic and microbiome data into 3D maps. It is worth noting that the molecular networking workflow in GNPS continues to be updated and additional reference library entries are continually added by the GNPS community, which may result in some new network annotations since the original publication. The current reference libraries used (curated in speclibs, December 2018) are listed in the supporting information (SI Table 11). To illustrate the utility of GNPS in revealing the extent of suites of related natural products, the discovery of new stenothricins-GNPS 1-5 from Streptomyces strains reported in Wang et al. 11 is revisited here. The dataset MSV000083381 comprises MS 2 data for n-butanol and methanol extracts from each of Streptomyces sp. DSM5940 and S. roseosporus NRRL 15998 cultures grown on solid agar, together with a metadata table that links each of the four MS 2 data files with the originating Streptomyces strain. In reproducing the observation of a distinct sub-network comprising the MS 2 data from Streptomyces sp. DSM5940 connected to known S. roseosporus stenothricin analogs, we highlight the effect of minimum consensus cluster size, PIMT and FIMT settings, and advanced filtering options (Fig. 6). Importantly, the choice of low resolution settings for PIMT (2.0) and FIMT (0.5) to facilitate library searching enables annotation of multiple stenothricin analogues in an expansive sub-network, which is otherwise lost with more stringent mass tolerance settings of 0.03. Minimum consensus cluster size also has a pronounced effect on the range of stenothricin analogues detected. As is common for many natural product molecular families, a few major stenothricin analogues are likely accompanied by numerous minor stenothricins, for which the MS 2 spectra generated readily fall below the threshhold for representation as a node. The distinct clustering of stenothricins from Streptomyces sp. DSM5940 in Fig. 6a is because the parent ion m/z values for these  nodes are 41 Da less than the corresponding values for the known S. roseosporus stenothricin compounds, consistent with the substitution of serine for lysine in stenothricin-GNPS 1-5 11 . To further illustrate that molecular networking in GNPS can be used for a diverse range of applications, we highlight that molecular networking can be used to visualize quinolones produced by Pseudomonas isolated from a patient lung 50 . Fig. 7 reproduces the previous analysis (MSV000083359), where the orange nodes represent quinolones detected in both lung tissue extracts and cultured microbial isolates, while cyan nodes represent those only detected in cultured microbial isolates. With a network in hand, there are a number of data analysis tools and experimental validation steps that may be performed. As discussed in section 3.4.2, to legitimize a library annotation beyond inspecting mirror plots, the user should verify molecular formula and identify associated adducts using MS 1 data. Additionally, rationalization based on biological source is recommended. Ideally, an annotation is authenticated by comparison with a known standard compound or isolation and full characterization. In the example followed throughout the protocol, the molecular structures of the new conjugated bile acids from the mouse duodenum were confirmed by comparison with synthetic standards. For more complex structures such as those in the stenothricin example 11 (Figure 6), the most abundant analog, stenothricin-GNPS 2, was purified for acquisition. The struture was assigned from 1D and 2D NMR data, Marfey's analysis 134 , and manual comparison of the MS 2 spectra with MS 2 spectra for previously reported stenothricin D. Genome mining further supported the conclusion that the -41 Da mass shift observed for stenothricin-GNPS 1-5 is due to a Lys to Ser substitution. For nodes that are not annotated, the in silico Dereplicator may predict peptidic natural products, while NAP (Network Annotation Propagation) can use annotated nodes to predict related metabolites. Molecular formulas may be generated using additional tools, one of which is SIRIUS 108 . This software uses MS 2 features to arrive at the best molecular formula for the precursor MS 1 ion, and works best for smaller molecules (<600 Da). In the example of the human lung colonized by Pseudomonas bacteria (Figure 7) 50 , the authors use spatial mapping to visualize annotated molecules on an exploded lung, and then correlate the distribution of molecules to microbiome maps generated from 16S rRNA gene amplicon sequencing. This study shows how molecular networking can be used to elucidate spatial variation in chemical profile and how this can be correlated with microbial makeup using 3D maps. Statistical analyses of microbiome sequence data were performed in QIIME2; a number of additional statistical tools as well. Ongoing developments in GNPS include the integration of some of these statistical analysis tools into GNPS. Ultimately, it is envisioned that streamlined integration of pre-and postnetworking tools with the GNPS platform will facilitate both creation and mining of molecular networks.</p>