dataesr/scientific-paragraphs-categorization huggingface dataset:
Once all this data is produced, the next step generally consists in analyzing them. An ubiquitous analysis in medical imaging is the so-called region-of-interest based analysis that consists in comparing statistics of MR signals over sets of predefined regions  (Poldrack, 2007). Such an analysis needs to iterate over all MR volumes of interest to read them and to extract the relevant statistics. To the best of our knowledge, there is no dedicated framework to ease such tasks, which may result in lengthy technical analysis codes. miet -acronym of medical imaging extraction tools -is an R package attempting to fill that gap. More specifically, miet is designed to specify and extract tibbles  (Müller & Wickham, 2019) , which is an improved data. frame structure, ready for data analysis from a specified folder hierarchy and a set of extraction formulas.
A short example miet is based on the following three successive steps: 1. Populate: Given a description of how the folders are structured, build a "population" tibble gathering information about data hierarchy and location. 2. Extract: Build a tibble that contains, for each element from your population, values extracted from the associated MRI volumes. 3. Expand: Gather information from a set of generated tibbles into a single tibble. At the end of these three stages, we end up with a tibble ready for data analysis. The four next subsections present an example involving a data set of spinal cord MRI volumes and use it to illustrate the three previous operations. For a reproducible example with publicly available (synthetic) data, see the miet readme (https://gitlab. inria. fr/miet/miet).
To conclude this simple example To conclude this simple example, we outline that using miet avoided us to explicitly: • write loops over patient/acquisition/… • deal with MRI files and thus allows code writing and reviewing to focus on the statistics of interest. The example developed in this section is intentionally designed to be minimal: all default arguments match well with the situation. miet provides ways to deal with a variety of other situations. See the miet vignette (available at https://gitlab. inria. fr/miet/miet/blob/master/ doc/vignette. pdf) for more details.
After administration to humans or animals, small-molecule drugs most frequently undergo several biochemical transformations by the endogenous enzymatic machinery, called phase I and phase II metabolism. These molecular processes allow organisms to eliminate xenobiotics through modification of their chemical properties and generate metabolites. With recent advances in analytical chemistry, LC-HRMS/MS has become an essential tool for metabolite discovery and detection. Even if most common drug transformations have already been extensively described, manual search of drug metabolites in LC-HRMS/MS datasets is still a common practice in toxicology laboratories, disabling efficient metabolite discovery. Furthermore, the availability of free open-source software for metabolite discovery is still limited.
In this article, we present MetIDfyR, an open-source and cross-platform R package for in-silico 1 drug phase I/II biotransformations prediction and mass-spectrometric data mining. MetIDfyR has proven efficacy for advanced metabolite identification in semi-complex and complex mixtures in in-vitro or in-vivo drug studies and is freely available at github. com/agnesblch/MetIDfyR.
However, manual processing is time-consuming and can be error-prone, especially in case of successive modifications, possibly leading to incomplete metabolite identification and suboptimal detection. In addition, cross-platform and database-free solution for metabolite prediction and evaluation through LC-HRMS data are still limited. In this article, we present the development of MetIDfyR, a R  33, 34  package to predict and detect metabolites out of EC(s) and LC-HRMS/MS data. MetIDfyR evaluates each predicted biotransformation via a multi-layer strategy. Each detected m/z is evaluated at MS level, considering its intensity and quality of isotope pattern and also at MS/MS level, through MS/MS fragment matching and MS/MS spectra similarity assessment with DoI. This package has shown rapid and efficient metabolite identification capabilities in semi-complex and highly complex matrices.
Indeed, MetIDfyR could highlight multiple referenced metabolites of LGD-4033 (also named "Ligandrol or VK5211"), an investigational selective androgen receptor modulator (SARM) after horse in-vitro phase I metabolism experiments but also Cocaine and its related metabolites in a positive case of drug abuse in human urine. MetIDfyR uses computer processor parallelization allowing high-throughput analysis and all steps may be realized via a code-free Shiny  35  graphical user interface and is freely available at github. com/agnesblch/MetIDfyR.
LGD-4033 datasets For data-independent acquisition (DIA) experiment, the method was split into four scan events (two positive and two negative) composed of a full scan MS acquisition within 250-650 m/z range, automatic gain control (AGC Target) set to 3e6 and maximum accumulation time (MaxIT) set to 20 ms and a DIA loop. The DIA scans were defined to select the com-plete 250-647 m/z range and fragment it by 9 successive isolations of all precursor ions within a 45 m/z window, windows being overlapped by 1 m/z (1 st window: 250-295, 2 nd : 294-339 and so on until 9 th : 602-647). Selected ions within the m/z-ranges were fragmented in the HCD cell with 20, 35, and 50 as stepped normalized collision energy values (NCE), AGC Target was set to 1e6 and MaxIT to 23 ms. Data were recorded in profile mode with mass resolutions set to 60 000 and 15 000 at m/z 200 for MS and MS/MS acquisition, respectively.
Chemoinformatics MetIDfyR allows the prediction of metabolites in LC-HRMS/MS samples based on the Drug of interest (DoI) elemental composition (EC) and few parameters. The software is divided in few steps (Figure  1 ) and involves multiple R packages, notably Rdisop,  38  MSnBase 39 and mzR  40  to compute spectral properties and mzML file mining (see supplementary information for complete list and versions). To optimize throughput, MetIDfyR can parallelize in-silico transformations and MS searches, thanks to the doParallel package. Based on the DoI EC and expected adducts in both ESI polarities, a list of possible metabolites is generated (Figure  1 A ). The number of successive transformations (N successive loops of transformations) can be set to consider simple (N = 1) or complex (N ≥ 2) transformations, listed in Table  1.
At MS/MS level, DIA or DDA MS/MS spectra of each mz-RT are compared with parent drug spectra (provided externally or automatically picked in the chromatogram) considering common and/or shifted m/z (M S2p) (Figure  1 C ). M S2p is calculated as to a M S2p of 100 % means all DoI fragments are found as common and/or shifted in the mz-RT MS/MS spectra. On the other hand, a M S2p of 0 % means none of the DoI fragments were found as common or shifted in the mz-RT spectra. Additionally, a composite M S2cosθ 41 is computed comparing DoI spectra with the metabolite spectra where shifted m/z are unshifted (see Result section for case example). To enable MS/MS evaluation when the DoI is not detected (i. e. complete metabolization), it is possible to incorporate an external DoI MS/MS spectra as a tabulation separated table with positive and/or negative fragments m/z and their relative intensities, which is similar to identification software using a spectral database.
Calculation performances As shown on Figure  2  obtained after analysis of the in-vitro phase I metabolism LGD-4033 datasets with various configurations, MetIDfyR displays rapid molecule-testing properties. Indeed, analysis speed varies between 15 molecules/min (N = 1 with single core search in DDA) to 400 molecules/min (N = 5 with ten cores search in DIA) on a calculationdedicated computer in peak-picked mode (Figure  2 , left), where N is the number of successive transformation loops. Because profile data structure is considerably more complex, MetIDfyR offers slower testing capabilities, with speeds varying between 10 molecules/min to 150 molecules/min (Figure  2 , right). As expected, speed is increasing with higher core number for transformations combinations N ≥ 2, whereas it remains limited for N = 1.
This later observation may be a consequence of the limited number of predicted molecules (86 molecules tested for N = 1), probably not high enough to reach maximum analysis speed. Thus, both peak-picked and profile data analyses are considered as high-throughput when employing multiple core strategies. q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q Peak-picked Profile DDA DIA Core count q q q q q q q q q q 10 9 8 Interestingly, even if the DIA dataset displays a greater spectrum count than its DDA equivalent in the LGD-4033 datasets (> 30 %), analysis of a DIA dataset is significantly faster than DDA (Figure  2 ).
These properties should be kept in mind of analysts when reviewing the results. To demonstrate compatibility and assess calculation speeds on a common computer, we analyzed the profile-mode LGD-4033 DIA dataset on a laptop with core count of 3 and 4 and compared speeds with the calculation server in similar conditions. First, analogous speed behaviour was observed as to increases with N and core numbers with both configurations. Laptop speed reaches maximal values for N = 3 & 4, which may be linked to laptop hardware (Figure  3 ) and be explained by memory and/or core overload when using 100 % of available cores (Figure  3 ). More generally, analysis speed was significantly higher when analysis ran on a calculation server (Wilcoxon rank sum test p-value = 0. 0104), as expected. However, considering the analysis speed reached by the Laptop setup (Figure  3 , dashed line) with maximum speed being close to 20 molecules tested/min, it is convincing that the molecule testing speed of MetIDfyR surpass manual processing.
M1c LGD-4033 -H-b M4a M3 q q q q q q q q q q q q q q q LGD-4033 + H+ LGD-4033 -HF + H+ LGD4033 -HF + H2O+ M5a M2 M5b q q q q q q Negative mode Positive mode  The scoring approach implemented in MetIDfyR successfully ranked best mz-RT found in the dataset as top candidate metabolites as shown on Figure  4  where larger points indicate higher scores determined by the software. However, even if the software succeeded in finding in-vitro generated metabolites in the LGD-4033 datasets, the data is considered as moderately complex.
were recorded in DIA positive mode. Method consisted in a Full scan MS within 100-600 m/z range, AGC Target was set to 3e6 and MaxIT to 20 ms and a DIA loop. The DIA scans were defined to select the complete 100-581 m/z range and fragment it by 20 successive isolations of all precursors within a 25 m/z window, windows being overlapped by 1 m/z (1 st window: 100-125, 2 nd window: 124-149 and so on until 20 th : 556-581). Selected m/zranges were fragmented in the HCD cell with 20, 40, and 60 as stepped NCE value, AGC Target was set to 1e6 and MaxIT to 23 ms. Data were recorded in profile mode with mass resolutions set to 60 000 and 15 000 at m/z 200 for MS and MS/MS acquisition, respectively.
this article, we presented MetIDfyR a free, cross-platform and open-source R-based analysis pipeline to assist analysts during in-vitro and/or in-vivo drug metabolism studies. The tool is designed to analyze positive and/or negative LC-HRMS/MS data from standard file format mzML, enabling cross-manufacturer analysis. MetIDfyR has proven metabolite identification capabilities of two model compounds in semi-complex matrix for horse in-vitro S9 fraction metabolism, but also complex matrix in a positive case of drug abuse in human urine. These results demonstrate its efficiency towards comprehensive LC-HRMS/MS analysis of drug biotransformations. The candidate ranking process is based on intensity, isotopic distribution and MS/MS spectral properties via spectral comparison with drug of interest and has shown efficiency to identify top candidate metabolites in DDA/DIA-based LC-HRMS/MS datasets.
From LDA to neural models, different topic modeling approaches have been proposed in the literature. However, their suitability and performance is not easy to compare, particularly when the algorithms are being used in the wild on heterogeneous datasets. In this paper, we introduce ToModAPI (TOpic MOdeling API), a wrapper library to easily train, evaluate and infer using different topic modeling algorithms through a unified interface. The library is extensible and can be used in Python environments or through a Web API.
Furthermore, the algorithms are often evaluated on different datasets and different scoring metrics are used. In this work, we have selected some of the most popular topic modeling algorithms from the state of the art in order to integrate them in a common platform, which homogenises the interface methods and the evaluation metrics. The result is ToModAPI 1 which allows to dynamically train, evaluate, perform inference on different models, and extract information from these models as well, making it possible to compare them using different metrics. The remaining of this paper is organised as follows. In Section 2, we describe some related works and we detail some state-of-the-art topic modeling techniques. In Section 3, we provide an overview of the evaluation metrics usually used. We introduce ToModAPI in Section 4.
ToModAPI: a Topic Modeling API We now introduce ToModAPI, a Python library which harmonises the interfaces of topic modeling algorithms. So far, 9 topic modeling algorithms have been integrated in the library (Table  1 ). For each algorithm, the following interface methods are exposed: • train which requires in input the path of a dataset and an algorithm-specific set of training parameters; • topics which returns the list of trained topics and, for each of them, the 10 most representative words. Where available, the weights of those words in representing the topic are given; • topic which returns the information (representative words and weights) about a single topic; • predict which performs the topic inference on a given (unseen) text; • get training predictions which provides the final predictions made on the training corpus.
Where possible, this method is not performing a new inference on the text, but returns the predictions obtained during the training; • coherence which computes the chosen coherence metric -among the ones described in Section 3. 1 -on a given dataset; • evaluate which evaluate the model predictions against a given ground truth, using the metrics described in Section 3. 2. The structure of the library, which relies on class inheritance, is easy to extend with the addition of new models. In addition to allowing the import in any Python environment and use the library offline, it provides the possibility of automatically build a web API, in order to access to the different methods through HTTP calls. Table  2  provides a comparison between the ToModAPI, Gensim and STMM. Given that we wrap some Gensim models and methods (i.
Datasets and pre-trained models Together with the library, we provide pre-trained models trained on two different datasets having different characteristics (20NG and AFP). A common pre-processing is performed on the datasets before training, consisting of: • Removing numbers, which, in general, do not contribute to the broad semantics; • Removing the punctuation and lower-casing; • Removing the standard English stop words; • Lemmatisation using Wordnet, in order to deal with inflected forms as a single semantic item; • Ignoring words with 2 letters or less. In facts, they are mainly residuals from removing punctuation -e. g. stripping punctuation from people's produces people and s. The same pre-processing is also applied to the text before topic prediction. 7 https://github. com/D2KLab/ToModAPI.
20 NewsGroups The 20 NewsGroups collection (20NG)  (Lang, 1995)  is a popular dataset used for text classification and clustering. It is composed of English news documents, distributed fairly equally across 20 different categories according to the subject of the text. We use a reduced version of this dataset 8  , which excludes all the documents composed by the sole header while preserving an even partition over the 20 categories. This reduced dataset contains 11,314 documents. We pre-process the dataset in order to remove irrelevant metadata -consisting of email addresses and news feed identifiers -keeping just the textual content. The average number of words per document is 142.
Agence France Presse The Agence France Presse (AFP) publishes daily up to 2000 news articles in 5 different languages 9  , together with some metadata represented in the NewsML XML-based format. Each document is categorised using one or more subject codes, taken from the IPTC NewsCode Concept vocabulary 10. In case of multiple subjects, they are ordered by relevance. In this work, we only consider the first level of the hierarchy of the IPTC subject codes. We extracted a dataset containing 125,516 news documents in English and corresponding to the production of AFP for the year 2019, with 237 words per document on average. Table  3  summarizes the number of documents for each topic in those two datasets. In AFP, a single document can be assigned to multiple subject, so we take each assignment into account.
Wikipedia Corpus We also describe the Wikipedia corpus (Wiki) 11 , which is a readily extracted and organised snapshot from 2013 that includes pages with at least 20 page views in English. This corpus has been used in other works, for example, for computing word embeddings  (Leimeister and Wilson, 2018). The corpus is distributed with some pre-processing already applied, like lower-casing and punctuation 11 https://storage. googleapis. com/ lateral-datadumps/wikipedia_utf8_ filtered_20pageviews. csv. gz stripping. However, we performed additional operations such as lemmatisation, stop-word and small word (2 characters or less) removal. The dataset consists of around 463k documents with 498M words. This corpus will not be used for training but only for evaluating the models (trained on 20NG or AFP) in order to reflect on the generalisation of the topics models.
Experiment and Results We empirically evaluate the performances of the topic modeling algorithms described in Section 2 on the two datasets presented in Section 5 using the metrics detailed in Section 3. For each algorithm, we trained two different models, respectively on 20NG and AFP corpus. The number of topicswhen required by the algorithm -has been set to 20 and 7 when training on 20NG and AFP, respectively, in order to mimic the original division in class labels of the corpora (except for GSDMM and HDP which infer the optimal number of topics). Each model trained on either 20NG or AFP is tested against the same dataset and the Wikipedia dataset to compute each metric. Table  4  shows the average coherence scores of the topics computed on the 20NG dataset, together with the standard deviation, while the results of Table  5  refer to models computed on the AFP dataset.
The results differ depending on the studied metric and the evaluation dataset. LFTM generalises better when evaluated against the Wikipedia corpus, probably thanks to the usage of pre-trained word vectors on large corpora. Overall, LDA has the best results on all metrics, always being among   the top ones in terms of coherence. When trained on AFP, all topic models benefit of a bigger dataset; this results in generally higher scores and in different algorithms maximising specific metrics. We also consider the time taken by the different techniques for different tasks like training and getting prediction (Table  6 ). The results have been collected selecting the best of 3 different calls. The inference time has been computed using the models trained on the 20NG dataset, on a small sentence of 18 words 12.
Conclusions and Future Work In this paper, we introduced ToModAPI, a library and a Web API to easily train, test and evaluate topic models. 9 algorithms are already included in the library, while new ones will be added in future. Other evaluation metrics for topic modeling have been proposed  (Wallach et al. , 2009)  and will be included in the API for enabling a complete evaluation. Among these, metrics based on word embeddings are gaining particular attention  (Ding et al. , 2018). For further exploiting the advantage of having a common interface, we will study ways to automatically tune each model's hyper-parameters such as the right number of topics, find an appropriate label for the computed topics, optimise and use the models in real world applications. Finally, future work includes a deeper comparison of the models trained on different datasets.
Acknowledgments This work has been partially supported by the  French National Research Agency (ANR)  within the ASRAEL (grant number  ANR-15-CE23-0018 ) and  ANTRACT  (grant number  ANR-17-CE38-0010 ) projects, and by the  European Union 's  Horizon 2020 research and innovation program  within the  MeMAD  (grant agreement No. 780069 ) and  SILKNOW  (grant agreement No. 769504 ) projects.
Sampling for a DMM GSDMM https://github. com/rwalk/gsdmm Non-Negative Matrix Factorization NMF https://radimrehurek. com/gensim/models/nmf. html Hierarchical Dirichlet Processing HDP https://radimrehurek. com/gensimLSI https://radimrehurek. com/gensim/models/lsimodel. html Paragraph Vector Topic Model PVTM https://github. com/davidlenz/pvtm Context Topic Model CTM https://github. com/MilaNLProc/contextualized-topic-models.
1) and Tris-EDTA (TE) buffer (10 mM Tris-HCl, 1 mM EDTA pH8. 1). Samples were eluted in Elution buffer (10 mM Tris-HCl pH 8. 0, 300 mM NaCl, 55 mM EDTA, 0. 5% SDS) with Proteinase K at 65 °C overnight, then chromatin resuspended in water following phenol-chloroform-isoamyl alcohol extraction. Samples were stored at -80 °C prior to DNA quantification by qRT-PCR, as detailed above. Primers spanning the three putative CRE sites at -104 bp to -5 bp of the Star promoter (Forward 5′-TTCCATCCTTGACCCTCTGC-3′, Reverse 5′-AGATCAAGTGCGCTGCCTTA-3′, Invitrogen) were designed using NCBI Primer-BLAST, as determined via NCBI GenBank. Promoter pulldown was quantified using mouse genomic DNA, normalised to the total levels in the chromatin input (promoter content in chromatin not subjected to immunoprecipitation).
5-fold at 15min and remained significantly elevated at 60 min (5. 8-fold). To investigate whether these changes in pCREB and Star transcription are associated with differential changes in CRTC subtype nuclear translocation, we measured the dynamics of cytosolic and nuclear levels of CRTC1, CRTC2 and CRTC3. ACTH had no significant effect on cytosolic CRTC1, CRTC2 or CRTC3 levels in Y1-BS1 (Fig. 2A ; data not shown) or ATC7-L cells (Fig. 3A ; data not shown). Y1-BS1 cells exhibited a significant overall increase in nuclear translocation of CRTC1 (P = 0. 04), CRTC2 (P = 0. 01) and CRTC3 (P = 0. 04; Fig. 2A  and B ). Nuclear levels of CRTC3 were already significantly increased by 3 min, whilst nuclear levels of CRTC1 and CRTC2 were significantly increase at 7 min. A significant overall effect of ACTH on nuclear CRTC1 and CRTC3 was also detected in ATC7-L cells (CRTC1: P=0.