dataesr/scientific-paragraphs-categorization huggingface dataset:
Engine At the heart of METASPACE is a high-performance engine implementing our recent method for MS1-based metabolite annotation for imaging MS  13  (Figure  1a ). The engine is open-source and exploits big data computing technologies for scalable parallel processing in cloud environment ( https://github. com/metaspace2020 ). After receiving an imaging MS dataset in the imzML centroided format  17  , the engine screens for molecules from over ten public metabolomics or lipidomics databases including HDMB  18  , ChEBI  19  , LIPID MAPS  20  , SwissLipids  21  and provides molecular annotations on the level of molecular formula (Level 2 according to the Metabolomics Standards Initiative  22  ). Annotating a dataset of 10 GB takes below 10 minutes on a default cloud cluster. For each metabolite annotation, the engine provides its molecular formula, ion adduct, and metabolite ion image.
Importantly, it also provides all isomeric molecular structures corresponding to this formula in the screened-for database thus helping understand the isomeric ambiguity of the results. The estimated Metabolite-Signal Match (MSM) score ranks the molecular formulas by their likelihood  13. The estimated FDR value quantifies the confidence of the results and makes them comparable between datasets. Importantly, FDR-controlled annotation serves as a quality control, as the engine provides no or only a few annotations for datasets of poor quality, e. g. when the mass spectra are misaligned or not properly calibrated  13. Overall, the engine enables rapid and comprehensive search for metabolites, lipids, and small molecules in imaging MS data and, through providing a yet missing capacity, bridges the gap between the imaging MS technology and biomedical applications.
Knowledge base The METASPACE knowledge base is a community-populated resource containing public results from the annotation engine, with every dataset including metabolite annotations, metabolite images, and associated metadata. Users can make the results public either during submission or later. As of January 2019, the knowledge base encompasses over 6 million metabolite images from over 140 contributors from over 70 laboratories who already submitted over 3200 public datasets from tissue sections from various organisms (human, mouse, rat etc. ) and organs (liver, brain, breast etc. ) as well as other samples (Figure  1b-d ). METASPACE includes data from all major ultra-high-resolution imaging MS technologies (MALDI-, DESI-, IR-MALDESI-, coupled with either Orbitrap and FTICR analyzers) and sample preparation protocols with various MALDI matrices represented (Figure  1e ).
Each dataset is provided with metadata (Supplementary Figure  S1 ) describing sample, sample preparation, and mass spectrometry that enables searching, filtering or large-scale analysis. The knowledge base can be accessed either interactively through the webapp or programmatically (see "python-client" at https://github. com/metaspace2020/metaspace ). METASPACE knowledge base, as a large collection of data from various laboratories, helps understand the state of the art of imaging MS. A key advantage of imaging MS for untargeted analysis its high molecular coverage (or the number and types of molecules detectable in one experiment). Using METASPACE, we quantified the coverage as the number of annotations per dataset at FDR 10% and demonstrated that indeed, imaging MS has a high coverage detecting up to 10 3 annotations with the most common numbers being in low hundreds (Figure  1f ).
Web app The primary way to access METASPACE is through its web app for interactive exploration and sharing of spatial metabolomes ( http://metaspace2020. eu/#/annotations ). The web app can be opened in any web browser to submit data, access results, browse molecular images, overlay them with a microscopy image, perform molecular and metadata search, filter datasets by their metadata, organize own datasets into projects, as well as share projects, datasets or individual images using permalinks (Figure  1i-j ). Not counting our team, the web app serves each month 10. 000-25. 000 pageviews or 600-1000 sessions with the most visitors being from the United States (30%), Germany (24%), France (7%), and the UK (7%) (Supplementary Figure  S2 ). Figure  2  summarizes key scenarios of exploring metabolite images in METASPACE by illustrating them with images of various intestinal metabolites from whole-body animal tissue sections.
Given a molecule of interest (e. g. taurocholic acid, a bile acid solubilizing fats in intestines; Figure  2a ) one can browse other molecular images from the same dataset to search for co-localized ones (e. g. arginine, a known intestinal metabolite; Figure  2b ). Next, one can visualize structurally-related molecules in the same dataset (e. g. arginyl-aspartate; Figure  2c ). To confirm an association between a molecule of interest (e. g. taurocholic acid) and an anatomical or histological region, one can visualize its localization in another dataset (e. g. intestinal localization of taurocholic acid in another dataset; Figure  2d ). Further exploration of other datasets can reveal molecules which are structurally-similar yet associated with the same anatomical region (e. g. glycocholic acid, a bile acid, shows intestinal localization in a rat whole-body tissue section; Figure  2e ).
Exploring spatial metabolomes on the levels of tissues and organs In a case study, we explored how imaging content of METASPACE can generate or support hypotheses about localization of molecules within particular organs. We started the analysis with investigating data from whole-body animal model tissue sections originally used for drug development. For validation, we prepared, imaged and examined an organs-mimicking tissue section containing six wells embedded in gelatine, each contained homogentated mouse tissue from one of six organs (liver, heart, muscle, lung, kidney, and brain) following an earlier published protocol 23. First, we investigated molecular images of glutathione (GSH), a major endogenous antioxidant with a high prevalence in METASPACE (Figure  3a ). In mouse and rat whole-body sections, GSH is localized predominantly in the liver as well as in the salivary gland, lung, intestinal wall, and testis.
Large-scale analysis of spatial metabolomes Using the METASPACE molecular network, we demonstrate how large-scale analysis of big semi-structured data from METASPACE helps infer biologically relevant knowledge (Figure  4 , Supplementary Figure  S3 ). The organisation of the network in two distinct parts, each containing datasets collected using either negative or positive ion polarity (Figure  4a , Supplementary Figure  S4 ), suggests that the ion polarity is a major driver of the molecular content in imaging MS. The Cohen's kappa analysis confirmed the ion polarity to be indeed the most predictable factor with the next factors being the contributing laboratory and the organ (kappa of 0. 95, 0. 85 and 0. 77, respectively; Supplementary Table  S1 ). This is in line with other untargeted mass spectrometry analyses reporting that 90% of small molecules are detectable only in one ion polarity mode  34.
The markers for liver were: linoleic acid (or conjugated linoleic acid), diacylglycerol DG(34:1), and a bile acid. With the continuing growth of METASPACE, we expect to obtain enough data to create comprehensive organ-specific molecular atlases for these and other organs. The METASPACE molecular network can help explore associations between metabolites and disease. Figure  4c  shows a subnetwork showing only datasets containing N-acetylaspartic acid (NAA). NAA is the second most abundant amino acid in the brain  35  that is illustrated with its localization in a whole-body mouse section (Figure  4d ). Interestingly, NAA was detected not only in the brain, but also in two ovarian cancer cohorts: by the Takats lab, Imperial College London, and the Eberlin lab, University of Texas Austin. This, together with the fact that NAA was not detected in other cancer cohorts by those laboratories (Figure  4c ), indicates its potential association with the ovarian cancer.
This corroborates a recent report associating NAA with the reduced survival of patients with the high-grade serous ovarian cancer 36. Screening for drugs and their metabolites METASPACE helps annotate and explore images not only of endogenous but also exogenous molecules, particularly drugs or other bioactive compounds as required in drug development. As of January 2019, 101 datasets were publicly shared by seven pharma companies ( link to all datasets ). As a case study, we explored a published dataset which was originally used for spatial quantitation of drugs in a rat liver  14  ( dataset link , Figure  5 ). Using METASPACE, we reproduced the original results  14  showing erlotinib in the liver of the cassette-dosed animals and olanzapine in both the cassette-and discrete-dosed animals.
Moreover, when searching for metabolites of olanzapine from the DrugBank database  18  (Figure  5b ), we discovered metabolites of olanzapine (isomeric 7-hydroxyolanzapine and 2-hydroxymethylolanzapine as well as 4'-N-desmethylolanzapine) which were not reported in the original publication (Figure  5c ). Their presence in the liver sections but not in the mimetic tissue with drug standards confirms the expected in vivo metabolism of olanzapine. These images could be missed either due to targeted search for olanzapine only, or due to smaller intensities of the metabolites compared to olanzapine (by one and two orders of magnitude, respectively). This case study illustrates the potential of METASPACE in supporting drug development as well as creating additional value from the contributed public data.
Discussion Here, we presented METASPACE, a community-populated knowledge base of spatial metabolomes already encompassing over 3200 public datasets. We illustrated how METASPACE facilitates metabolite annotation for imaging MS, reveals the state of the art of the imaging MS technology, enables large-scale analysis of spatial metabolomes, and supports drug development. METASPACE, although not yet published, was already used in several publications  [37] [38] [39] [40] [41] [42] [43]  and highlighted in numerous reviews that indicates the significance and uniqueness of this resource for the imaging MS field. With the current rate of growth of 1000 datasets a year, its molecular and biological coverage will soon increase enough to provide spatial metabolomics atlases for various tissues, organs, and organisms.
Our further steps include improvements of the engine to explore the unannotated "dark matter" of the already contributed datasets, implementation of various data analysis strategies in particular illustrated in this manuscript and supporting statistical and pathways analyses, further integration with repositories and resources for metabolomics  44  and other -omics, and engagement of computer scientists to optimize computations and build new services on top of METASPACE. This will multiply the positive effect of public data and support spatial metabolomics guide discoveries in health and disease. A : Optical image of liver sections from five animals including control, cassette dosage 2h-post and 6h-post, discrete (olanzapine only) 2h-post and 6h-post as well as a liver mimetic tissue section with drug standards; adapted from the original publication  14.
Annotation engine The annotation engine is a high-performance implementation of our computational method for metabolite annotation published earlier  13. The engine design follows the Resilient Distributed Datasets paradigm and is implemented using the Apache Spark framework and the pySpark binding. The engine is deployed onto the Amazon Web Services cloud and leverages a cluster of several cloud instances, usually three AWS c4. 2xlarge instances each with 8 vCPU and 15 GiB memory. The engine is open-source, available on GitHub ( https://github. com/metaspace2020/metaspace , repository "engine") and developed by a team of professional software developers following modern software practices including Agile development, unit testing, integration testing, and code review. The engine takes as input a centroided imaging MS dataset in the imzML format  17  , a molecular database including molecular formulas, and ion adducts.
For each ion, the engine predicts its fine isotopic structure considering the resolving power provided upon submission and uses the 3ppm tolerance for pulling m/z-images of four principal peaks from the imzML file. Several molecular databases are available for the metabolomics and lipidomics annotation. The Human Metabolome Database, HMDB,  18  is used as the default database when screening for metabolites in human and animal models samples. We also prepared an HMDB-endogenous version of HMDB which contains only those molecules which are labelled in HMDB as endogenous (the HMDB property "Source" is equal to "Endogenous") to reduce potential false positives when screening for endogenous metabolites. Another imported database, Chemical Entities of Biological Interest, ChEBI,  19  is recommended for integrating results with other -omics, since its chemical entities are organized in a chemical ontology linked to GeneOntology, UniProt and the BRENDA database of enzymes.
Knowledge base and web application The METASPACE knowledge base is a collection of public metabolite annotation results contributed by users. At the heart of the knowledge base is a cloud software which integrates the following services operating individually and communicating with each other via REST APIs by using a GraphQL interface: 1) the metabolite annotation engine described earlier, 2) a service containing and providing molecular databases, 3) a web application for submitting data as well as browsing and sharing the results, and 4) API for programmatic access of the annotations and metadata ("engine", "mol-db", "webapp", "python-client" repositories at https://github. com/metaspace2020/metaspace , respectively). An essential component of the knowledge base that ensures future re-use of data is the metadata contributed for each dataset during the submission (Supplementary Figure  METADATA ).
The required metadata includes information about the sample (organism, organ, condition), sample preparation (sample stabilization, tissue modification, MALDI matrix, matrix spraying), mass spectrometry (source, analyzer, mass resolving power), and contributor contact information (laboratory, name, principal investigator). The storage of the metabolite annotation results is organized for sustainable handling of big data and includes a PostgreSQL relational database for consistent storage and an ElasticSearch search engine for fast querying and access. ElasticSearch was estimated to be at least 10x faster than PostgreSQL for our type and size of data. This high-performance access is especially beneficial, since the knowledge base encompasses a large number of annotations (over 6 million as of January 2019).
For data upload, we use a big data upload service which restarts in case of an interrupted connection. The imzML files are stored on the Amazon S3 storage. The web app is implemented using the Vue. js JavaScript framework and enables data submission, annotations browsing, searching, or filtering, as well as visualization of ion images and other diagnostics information. The web app uses TypeScript to increase stability and improve our productivity when working on the codebase. The GraphQL, a data query and manipulation language , is used as the interface between the services, to provide an API for the web application, as well as for programmatic access to the knowledge base. RabbitMQ is used for queuing and synchronization of the services. We provide data management capabilities, where a user needs to be authenticated for submission and handling their private data.
Users from the same laboratory can be organized into groups by their group admins and share their private data with each other. Users can also organize their data in projects which can be both private and public. This allows users to organize data by associated experiments as well as to share datasets for publication by creating a project and sharing all the datasets from this project using a URL. Regular snapshots of the knowledge base including all public annotation results are provided at https://github. com/metaspace2020/pixel-annot-export.
Tf-idf modeling of datasets For data mining, we represented METASPACE datasets as vectors in a molecular space. Inspired by natural language processing approaches to clustering, classification, and searching text documents  47  , we modelled METASPACE datasets as "documents" and molecular formulas annotated within the dataset as "words". For each molecular formula annotated in a dataset, we calculated the term frequency-inverse document frequency (tf-idf) statistic which quantifies how characteristic the molecular formula is for this dataset compared to all other METASPACE datasets. The tf-idf statistic is defined as where is a the ratio between the number of all datasets in METASPACE and the number of those datasets D where the molecular formula was annotated with FDR 50%. As a result, we represented each m dataset as a tf-idf vector in the space of all molecular formulas annotated in METASPACE.
Quantifying the influence of metadata parameters on the molecular content We developed the following approach to quantify how much a metadata parameter (e. g. ion polarity, laboratory, organism, organ, or MALDI matrix) influences the molecular content of the associated data. First, for each metadata parameter (e. g. organ), we considered its values M (e. g. "brain", "kidney", etc). For each dataset, we found its first-nearest-neighbor (NN) dataset among all datasets according to the cosine similarity in the tf-idf space. This search resulted in the so-called NN-pairs of datasets. We calculated , the percentage of the NN-pairs of p N N datasets having the same value of the metadata parameter (e. g. for a "brain" dataset its NN M dataset is also a "brain" dataset). Next, for each dataset we randomly selected another dataset that resulted in the so-called random pairs.
We calculated , the percentage of those p random random pairs whose values of the metadata parameter coincide. As a measure of M predictability of the metadata parameter in all datasets, we used the Cohen's kappa M 48. The Cohen's kappa is a enrichment-factor-like statistic 1 (1 p )/(1 p ) ϰ = --N N random which compares the observed accuracy vs the expected accuracy. The Cohen's kappa compensates for a random chance and accounts for different numbers of parameter values and uneven group sizes thus producing values comparable between different metadata parameters. The Cohen's kappa takes values from -1 to 1 and the higher is the value for a metadata parameter , the higher is the predictability of this parameter from the data, or the higher is M influence of the parameter on the molecular content of the data.
Co-localization score In order to find ions co-localized within a dataset for an ion of interest, we used the following method. For ions annotated in the dataset with an FDR <= 50%, we applied a hotspot removal by quantile thresholding with the quantile 0. 99. Then, we calculated a co-localization score as a pairwise cosine similarity between pixel-wise intensity vectors for each two ions in the dataset using the Python library gensim v2. 3. 0 and considered top ions most similar to the ion of interest.
Data Sources A de novo model was built to estimate the survival associated with nivolumab compared with observation in the absence of OS data from CheckMate-238. Alternative data sources were required because head-to-head trial data for nivolumab compared with observation were lacking and OS data from CheckMate-238 were unavailable. Data sources were identified through a systematic literature review of adjuvant melanoma studies, and additional searches were conducted for long-term melanoma data. These searches identified several data sources that were used to model the effectiveness of adjuvant nivolumab compared with observation (Table  1 ). A phase III randomised controlled trial comparing ipilimumab with placebo for patients with resected stage III melanoma, CA184-029 (NCT00636168), was used along with CheckMate-238 to form an ITC between nivolumab and placebo  [14, 15].
Pembrolizumab, and dabrafenib, in combination with trametinib, have also been recently approved for adjuvant treatment for adults with stage III melanoma. The phase III randomised controlled trial Check-Mate-238 (NCT02388906) was conducted in patients with resected stage III or IV melanoma and investigated adjuvant nivolumab compared with ipilimumab  [7]. The 24-month minimum follow-up data showed a significant RFS benefit for nivolumab compared with ipilimumab (hazard ratio (HR) 0. 66; 95% confidence interval (CI) 0. 54-0. 81; p < 0. 0001)  [8]. The overall survival (OS) data in CheckMate-238 were too immature to report any results. Recently, a network-meta analysis (NMA) was conducted combining randomised controlled trials in the adjuvant melanoma setting to produce one evidence network comparing nivolumab with other comparators: interferon, observation/ placebo, bio-chemotherapy, pembrolizumab, and dabrafenib plus trametinib  [9].
Recurrence-Free Survival An ITC was performed between CheckMate-238 and CA184-029 to compare nivolumab with placebo, in which placebo outcomes were used as a proxy for observation. A patient-level meta-regression was performed between the two trials, which is considered the 'gold-standard' in population adjustment between studies and was the most robust ITC possible between nivolumab and placebo given the availability of patient-level data for both CheckMate 238 and CA184-029  [19]. In addition, this method does not rely on the proportional hazards assumption, which is not required when patient-level data are available  [20]. Covariateadjusted parametric curves were produced from the ITC, and these informed the proportion of patients who were recurrence free over time for each model option.
For other treatments, the efficacy was based on reported trial outcomes, and data sources were selected to keep the comparative efficacy between treatments clinically plausible. Further details of the sources used to estimate the survival of each treatment are presented in Table  3  in the ESM. This approach relies on the assumption that the different data sources are suitably comparable. Furthermore, it was assumed that the effect of Fig. 2  Indirect treatment comparison results-recurrence-free survival using log-logistic distribution. RFS recurrence-free survival each subsequent treatment was the same regardless of adjuvant therapy and that the patient populations from each trial were generalisable to our patient population. The proportion of patients who received each treatment and informed the weighted distant recurrence curve was taken from CheckMate-238: for nivolumab, subsequent treatment data from the nivolumab arm were used and, for observation, subsequent treatment data from the ipilimumab arm were used as a proxy.
Long-Term Survival Long-term data using the latest melanoma-specific registry data  [17]  were incorporated into the model as an option to inform long-term estimates at a certain cut-off. Stage III data from the American Joint Committee on Cancer (AJCC) version 8 were digitised, and pseudo-patientlevel data were created and fitted with a generalised gamma curve. To estimate long-term RFS, an HR was calculated from the long-term data in the adjuvant melanoma trial E1697  [18]  comparing RFS and OS using a Cox regression model. The log-cumulative hazard plot showed that the proportional hazard assumption between RFS and OS was reasonable. This HR was then applied to the RFS curves after 10 years (HR RFS vs. OS : 1. 98; 95% CI 1. 63-2. 41). Background general population mortality data were also used to ensure that the probability of death was never less than that of the general population  [29].