dataesr/scientific-paragraphs-categorization huggingface dataset:
e. , feature definitions/annotations as row-and sample annotations as column metadata). As an example, a SummarizedExperiment can be generated from xcms pre-processing results by adding the output from the featureValues function on the xcms result object as quantitative assay and the outputs of the featureDefinitions and pData functions as row and column annotations, respectively. Many Bioconductor packages for omics data analysis have native support for such objects (e. g. , pcaMethods, STATegRa, ropls, biosigner, omicade4). For the downstream export of mass spectrometry data from metabolomics or lipidomics experiments, the package rmzTab-M provides support for exporting quantitative and identification results backed by analytical and mass spectrometric evidence into the mzTab-M metabolomics file format  [37].
A typical next step is the annotation of m/z with putative metabolites using accurate mass lookup, or if the molecular formula was calculated, lookup of the formula in metabolite databases. It has to be noted that annotation with accurate mass search is by no means equivalent to identification. Under the assumption that all the metabolites measured in a sample have some biochemical relation, a global annotation strategy as used in ProbMetab can help as well. Here, the individual ranked lists of formulae are re-evaluated to also maximise the number of pairs with (potential) biochemical substrate-product pairs. The masstrixR package contains several utility functions for accurate mass lookup. This enables matching of measured m/z values against a given database or library and can additionally perform matching based on retention times (RT) and/or collisional cross sections (CCS) if available.
In data-dependent acquisition (DDA) the instrument is configured to apply a set of rules, which determine which precursor ions are fragmented and MS/MS spectra acquired. DDA approaches also produce a lot of spectra for background peaks or contaminants, which are often of limited use for the purpose of metabolomics studies. Using the RMassBank package, MS 1 and MS/MS data can be recalibrated and spectra cleaned of artifacts generated. After database lookup of corresponding identifiers, MassBank records are generated. In data-independent acquisition mode (DIA), the isolation windows are broader, or in some cases, all ions are fragmented, e. g. , the Weizmass library  [107]  is based on MS E. The computational challenge for DIA data is to deconvolute the MS/MS data and assign the correct precursor ion.
DIA data analysis support is currently being implemented in several R packages. MS/MS spectra can be further processed for example by selecting a representative MS/MS spectrum among all spectra associated with a chromatographic peak or by fusing them into a consensus spectrum. Subsequently, spectra can be used in downstream analyses such as spectral matching or clustering. Due to the re-use of infrastructure from the MSnbase package, xcms has recently gained native support for MS/MS data handling and hence allows to extract all MS/MS spectra associated with a feature or chromatographic peak for further processing. While DDA and DIA are convenient methods, users might miss the accuracy and full control over what is fragmented in the targeted approach. The packages rcdk, MetShot and RMassBank can be combined into a workflow (see  [108] ) for the generation of records to be uploaded to MS/MS spectral databases (e.
The OrgMassSpecR package contains a simple cosine spectral matching between two spectra. The two spectra are aligned with each other within a defined m/z error window using one spectrum as the reference. The feature-rich compMS2Miner can import msp files and uses the dot product to calculate the spectral similarity, the msPurity package can perform spectral matching using different similarity functions, and MatchWeiz implements the probabilistic X-Rank algorithm  [118]. A growing number of packages, e. g. , LOBSTAHS  [99] , LipidMatch  [100]  and LipidMS  [101] , support the annotation of lipids, see Table  2. They use a combination of lipid database lookup, spectral or selected fragment mass matching and in silico spectra prediction. To improve disambiguation between lipids of the same species that may only differ in their fatty acid chain composition, they usually rely on identifying specific MS/MS feature masses that are indicative of substructure fragments, such as the lipid headgroup, the headgroup with a certain fatty acid attached, or losses of fatty acid(s), and other modifications, such as oxidation.
Reading of Spectral Databases NIST msp files and derived msp-like dialects are a commonly used plain text format for the representation of mass spectra. The msp format is described by NIST as part of their Library Conversion Tool  [119]  documentation, but has many different dialects due to rather loose format definitions. R packages that support the import and export of this file format are able to both use spectral libraries for identification, as well as to create and enrich spectral libraries with new data. There are various R packages that support the import of NIST msp files (see Table  3 ), but the support of different dialects varies, e. g. , the NIST-like spectral libraries from RIKEN PRIME  [120]  cannot be parsed by some readers. In addition, none of these packages currently supports the import of additional attributes such as 'InChIKey: ' or 'Collision_energy: ' as used in the export of MoNA libraries  [121].
In essence, most of the packages support the format shown in Listing S1 (see Supplemental File S1, 'basic NIST' in Table  S1 ). The metaMS package supports NIST msp files as shown in Listing S2 (see Supplemental File S1, termed 'canonical NIST') and RIKEN PRIME provides a similar format with different attributes as shown in Listing S3 (see Supplemental File S1). The packages metaMS, OrgMassSpecR, enviGCMS, and TargetSearch support the export of NIST msp files. The remaining packages partially support the export of results to NIST msp files (see Table  S1 ). One of the most flexible packages for the handling of NIST msp files is metaMS. This package imports and exports the most attributes, although it does not entirely support generic attributes, and the export is very slow (we observed 20 min for an 8 MB file).
The NMRProcFlow  [123]  package provides a graphical and interactive interface for 1D NMR spectral processing and analysis. Additionally, it provides various spectral alignment methods with the ability to use the corresponding experimental-factor levels in a visual and interactive environment, bridging the gap between experimental design and subsequent statistical analyses. Alternatively, peak picking (based on the regions of interest, ROI) can be performed and individual compounds can be identified and integrated prior to statistical analysis. Targeted profiling aims to identify and quantify specific compounds in a sample. The packages that use such approach (ROI) are rDolphin, and rNMR. The bucketed/integrated spectra are normalised to minimise the biological and technical variation. The most common methods are normalisation to a constant sum (e.
g. , total sum of integral/bin intensities), probabilistic quotient normalisation  [124]  and dry weight tissue or protein content. NMR metabolite annotation uses either chemical shifts and multiplicity matching from an existing database, such as Human Metabolome Database  [125] [126] [127] [128]  (HMDB), a literature experimental search, or uses simulated reference library compounds  [129]  to match or to fit the existing biological spectra. 1D NMR data often is not sufficient for a confident assignment of the metabolite peaks  [130]  therefore complementary 2D spectral data acquisition are often required to confirm the assignment  [131]. The only package that explicitly deals with 2D NMR is rNMR that takes a targeted approach where the user defines regions of interest to be quantified and compared.
DOLPHIN, originally written in MATLAB  [132] , uses both 1D and 2D NMR data for targeted profiling that is also available as an R version called rDolphin. We are not aware of other R packages that handle 2D NMR data processing. Several general multiway statistical tools such as PARAFAC  [133] , Tucker3  [134]  and MCR have been described  [135]  that are able to analyse 1D and 2D NMR data, see the section on statistical analysis for a list of packages available for these techniques. BATMAN uses a Bayesian model and some template information such as chemical shifts, J-couplings, multiplicity and intensity ratios derived from spectral database to automatically quantify metabolites in a targeted manner  [136]. Another, in metabolomics sometimes under-appreciated, analytical approach is UV absorption detection, usually coupled with an HPLC or UHPLC system.
In some cases, the photo-diode array detector (DAD or PDA) is part of an LC-MS system, actually an LC-UV-MS setup. There are other detectors (e. g. , fluorescence) with a different principle, but similar characteristics when it comes to the acquired data. Alignment and baseline correction are typically the first steps of pre-processing LC-UV data. Alignment can be achieved for example with the alsace or the ptw package while baseline correction can be achieved using the hyperSpec, ChemoSpec, mdatools (or the baseline packages). The alsace package provides an alternative to using all channels (wavelengths) by first finding unique components (i. e. , "pure" spectra) and then performing peak picking in these components. After alignment, general multiway statistical methods like PARAFAC, simultaneous component analysis (SCA), and Tucker Factor Analysis can be applied in the same manner as feature tables would be handled.
Such techniques are implemented in R packages, which also provide detailed comparisons on real datasets in terms of the stability and the size of the selected signature, the prediction performance of the final model, and the computation time  [176] [177] [178] [179]. A great number of packages are available for performing statistics on metabolomics datasets. Some of them focus on performing several specific tasks, such as sample size estimation, batch normalisation, exploratory data analysis, univariate hypothesis testing, multivariate modeling and omics data integration. Others, listed in the section 'Multiple workflow steps' in Table  6 , adopt a more comprehensive approach, providing statistics toolbox that cover different methods and functionalities. muma is a package designed to be compatible with MS and NMR generated data.
The package mainly focuses on performing statistics. It does not contain functions for data extraction and the user has to provide values arranged in a data. frame format. The pre-processing is limited to missing value imputation, noise filtering, variable scaling and normalisation. The package also provides tools for outlier detection, univariate and multivariate analysis. Notably, the package offers a script for Statistical TOtal Correlation SpetroscopY (STOCSY) on NMR data. MOFA proposes tools for the integration of data coming from different omics disciplines (multi-omics). Using factor analysis, it makes it possible to calculate hidden factors that capture the biological sample variation across multi-omics datasets, thus allowing marker discovery. MOFA also provides various tools for the visualisation of results.
IntLIM also supports integration of other omics datasets with metabolomics data by leveraging linear modeling to identify gene-metabolite pairs whose relationship differs from one phenotype to another (e. g. , positive correlation in one phenotype, negative or no correlation in another). IntLIM includes a user-friendly web interface to perform data quality control of input data, identification of phenotype-dependent gene-metabolite pairs, and interactive visualisation of results. This tool is particularly useful for integrating transcriptomic and metabolomic or other omics data by generating novel hypothesis in a data-driven manner. MetaboDiff is presented as an entry-level, user-friendly package for differential metabolomics analysis. The information contained in the input data (metabolomics measurements and metadata) are stored in S4 objects which are used for the downstream processing.
Handling of Molecule Structures and Chemical Structure Databases There are several packages that can deal with cheminformatics tasks, property calculations, metabolite lookup in (web) databases or mapping between databases or structure format conversions (see  Table 7). A well-established package is rcdk which provide a comprehensive subset of functions from the Chemistry Development Kit  [239]. rcdk provides a computer readable representation of molecular structures and provide a wealth of functions to import structures from different molecule structure description formats, manipulate structures, visualise structures and calculate properties and molecular fingerprints. The package fingerprint can then be used to compare fingerprints. rinchi provides reading and writing of InChI and InChIKeys  [240].
ChemmineR is an alternative to rcdk, providing many similar functions, with more tools for fingerprints, clustering and others through querying the ChemMine Tools web service  [241]. ChemmineR also has significantly faster parsing of SDF files, which can be an advantage when reading large databases. A large number of additional descriptors are available in the package camb which focuses on quantitative predictive models. ChemmineOB provides conversion between a large number of chemical structure formats using OpenBabel  [242]. A notable exception is InChI/InChIKey, which is not directly supported by ChemmineOB or ChemmineR and one would thus have to go through rinchi and rcdk for offline import from InChI to ChemmineR or ChemmineOB. RChemMass is a package that combines the functionality of the rcdk with that of RMassBank, and enviPat.
The package RRDKit makes (part of) the functionality of the RDKit  [243]  toolkit available from within R. Several existing compound databases are useful for metabolomics. These can supply metadata such as common names and synonyms, database identifiers and experimental or predicted properties. The Rpubchem package provides lookup of information available in PubChem  [244, 245] , while the webchem package provide query of a large number of databases including PubChem, ChemSpider  [246] , Wikidata [247], Chemical Translation Service  [248] , PHYSPROP [249], Chemical Identifier Resolver  [250]  and others. BridgeDbR can be used to map identifiers (metabolites, but also genes and proteins, and interactions) between databases, e. g. , PubChem to ChemSpider identifiers; RMassBank and RChemMass also provide some useful web-retrieval functions.
The analysis of identified compounds on the level of substance classes can give biochemical insights which are not obvious from the individual structures, or in case the structures are not fully elucidated. The web tool ClassyFire is able to annotate a given structure with compound classes from their ChemOnt taxonomy as well as different substituents  [251]. The classyfireR package supports the retrieval of substance classes using the RESTful API of the ClassyFire tool based on InChIKeys.
Network Infrastructure and Analysis The R environment offers a general infrastructure for network analysis. Functionality is implemented in a plethora of software packages, among others igraph, tidygraph or the statnet suite. These packages offer functions to generate networks from respective data input (e. g. , adjacency matrices), to analyse networks, calculate network properties and to visualise networks. Generally, any kind of metabolomics data that can be converted to an interpretable format for one of these packages can be analysed by generic network analysis tools. For example, MSnbase offers functionality to calculate similarity scores between MS/MS spectral data that can be readily interpreted as a spectral similarity network (see  [257]  for the pioneering work of mass spectral molecular networking for biological systems).
Such networks can be analysed by the functions provided by the above-mentioned packages or by packages tailored more towards the analysis of biological data (e. g. , RedeR). Specifically interesting for metabolomics applications is DiffCorr, an R package to compare correlation networks from two different experimental conditions that builds on an association measure such as Pearson's correlation coefficient to identify distinctive properties. DiffCorr enables testing of differential correlation of high-dimensional data sets by identifying the first principal component-based 'eigen-molecules' in the correlation networks. DiffCorr then tests these differential correlation values based on Fisher's z-transformation to identify discriminating metabolite pairs that show different response to conditions.
Another package for improving annotation is the package xMSAnnotator, which incorporates a multi-criteria scoring algorithm to annotate mass features into different confidence levels. xMSAnnotator uses coelution, pathway level correlations, correlation and KEGG  [258] [259] [260] , HMDB, Toxin and Toxin Target Database (T3DB)  [261, 262] , LipidMaps  [263]  and ChemSpider  [246]  for annotation and incorporates several filter steps, e. g. , by defining modules of co-expressing m/z features using WGCNA and a topological overlap-based dissimilarity matrix and thereby categorising related metabolites into the same network modules. Molecular networking starting from MS/MS data can enhance the annotation of metabolites. MetDNA, implemented in R, JavaScript and Python (available via a web interface on http://metdna.
Pathway Analysis Several R packages enable pathway analysis that uses quantitative data of metabolites and maps these to biological pathways. The Bioconductor package pwOmics analyses proteomics, transcriptomics and other-omics data in combination to highlight molecular mechanisms for single-point and time-series experiments. In downstream analyses, pwOmics allows for pathway, transcription factor and target gene identification. Another important aspect commonly executed is enrichment analysis to identify pathways that are up-or downregulated given an experimental condition. The R environment offers a whole range of enrichment analysis packages (e. g. , tmod for metabolite data). Targeted more towards pathway analysis, FELLA is a Bioconductor package for enrichment analysis. FELLA detects discriminative metabolic features, maps these to known biological pathways of the KEGG database and detects enriched terms by a diffusion algorithm.
CePa offers enrichment analysis tools extending conventional gene set enrichment methods by incorporating pathway topologies. CePa takes nodes rather than terms for analysis and uses network centralities as weight of nodes incorporating pathways from the Pathway Interaction Database (PID,  [265] ), including NCI/Nature Pathway Interaction, BioCarta  [266] , Reactome  [267]  and KEGG  [258] [259] [260]. MetaboDiff offers functionality to pinpoint to metabolome-wide differences using PCA and t-distributed stochastic neighbor embedding (tSNE) building on the MultiAssayExperiment S4 class. Using t-test or ANOVA, MetaboDiff identified metabolites that differ in their abundance between groups and identifies modules/sub-pathways by using WGCNA that indicate changes in biological pathways. SDAMS (Semi-parametric differential abundance analysis method for proteomics and metabolomics data from mass spectrometry), building upon the SummarizedExperiment S4 class, performs differential abundance analysis on metabolomics data by linking (non-normally distributed) metabolite levels to phenotypic data, containing zero and possibly non-normally distributed non-zero intensity values.
Another R package for biomarker and feature selection is MoDentify which finds regulated modules, groups of correlating molecules that can span from few metabolites to entire pathways, to a given phenotype. These groups are possibly functionally coordinated, coregulated or driven by a similar or same biological process. Score maximisation using a multivariable linear regression model with the candidate module as dependent and the phenotype and optional covariates as independent variables identifies the modules. Furthermore, MoDentify implements Gaussian graphical models, where depending on the resolution nodes reflect metabolites or entire pathways. PAPi (Pathway activity profiling) assigns pathway activity scores to samples to represent the potential pathway activity and statistically detects affected pathways by applying t-test or ANOVA.
PAPi uses KEGG pathway identifiers. pathwayPCA, with gene selection in mind, offers multi-omics data analysis by estimating sample-specific pathway activities, e. g. , taken from the rWikiPathways interface. pathwayPCA takes continuous, binary or survival outcomes as input and estimates contributions of individual genes towards pathway significance. R offers packages to analyse metabolic systems and to estimate biochemical reaction rates in metabolic networks using flux balance analysis, e. g. , BiGGR, abcdeFBA, sybil, and fbar. For example, BiGGR interfaces with the BiGG databases that contains reconstructions of metabolic networks. After importing pathways from the database, flux balance and downstream routines can be performed, e. g. , linear optimisation routines or likelihood-based ensembles of calculated flux distributions fitting experimental data.
Pathway Resources and Interfaces A plethora of pathway resources exist, aptly aggregated by Pathguide. org. Several of these resources can be accessed by R packages, which were partly reviewed in [268]: rBiopaxParser, graphite, NCIgraph, pathview, KEGGgraph, SBMLR, rsbml, gaggle, and PSICQUIC. Of these, graphite stores pathway information for proteins and metabolites of currently fourteen species (version 1. 28. 0). Available databases are KEGG, Biocarta, Reactome, NCI/Nature Pathway Interaction Database, HumanCyc, Panther, SMPDB and PharmGKB. graphite offers in addition topological and statistical pathway analysis tools for metabolomics data by interfaces with the Bioconductor packages SPIA and clipper and supports functionality to build own pathways. Furthermore, RPathVisio enables the creation and editing of biological pathways.
RPathVisio makes it possible to visualise data on pathways, to perform statistics on pathway data, and provides an interface to WikiPathways. KEGGREST makes it possible to access the KEGG REST API via a client interface. The package provides utility to search keywords, convert identifiers and link across databases. The package also makes it possible to return amino acid sequences as AAStringSet or nucleotide sequences as DNAStringSet objects (from the Biostrings [269] package). Another package, paxtoolsr, provides literature-curated pathway using the Biological Pathway Exchange (BioPAX) format by providing an interface to the Pathway Commons database (including data from the NCI Pathway Interaction Database (PID), PantherDB, HumanCyc, Reactome, PhosphoSitePlus and HPRD). rWikiPathways is an interface between R and WikiPathways.
org. Pathways can be queried, interrogated and downloaded to the R session. Furthermore, rWikiPathways associates metabolite information to pathways when providing the system code of a chemical database (e. g. , from HMDB, ChEBI, or ChemSpider). RaMP provides a relational database of Metabolomics Pathways, integrates pathway, gene, and metabolite annotations from KEGG, HMDB, Reactome, and WikiPathways. The database is downloadable as a standalone MySQL dump, for integration with other software, and is also accessible through an R package, and includes a shiny  [270]  web interface that supports four basic queries: (1) retrieve analytes (genes of metabolites) given a pathway name; (2) retrieve a pathway for one or more analytes; (3) retrieve analytes involved in the same reaction; (4) retrieve ontologies (cellular location, biofluid locations, etc.