dataesr/scientific-paragraphs-categorization huggingface dataset:
FUNDING This work was supported in part by the  National Natural Science Foundation of China  under Grant  62161004 , in part by the  Natural Science Foundation of Guizhou Province  under Grant Qiankehe J No. [2020] 1Y255 , in part by the  Program PHC-Cai Yuanpei 2018  under Grant  41400TC , in part by the  Guizhou Province Education Department Project  under Grant Qianjiaohe  KY[2016]321 , and in part by the  Guizhou Science and Technology Plan Project  under Grant  Qiankehe ZK[2021]002.
In second place, virtual reality (the models of simulation / to take back real behavior numerically) and in third place is cyber-physics. Also in 2015, China offered a plan called: the made in China of 2025 intended to stimulate energy and innovation. It is about a Chinese version of industry 4. 0 (W. MIAO, 2015;  Wang et al. 2018 ). This has conducted to signi cant nancial support for manufacturing research; for example, in the European Union, about 7 billion euros will be invested by 2020 in factories of the future (A. Kusiak, 2017). Moreover, Lee and his colleagues (2015) analyzed the innovation of service of industry 4. 0 and huge databases. In fact, they explained relation between the creativity of service and industry 4. 0 from the ux of information of the lines of production of the predictions of the state of equipment, industrial model and other aspects (J.
Barari (2021)  who makes an editorial of a short historical and future perspective on Intelligent and Smart Manufacturing Systems, underlining its main characteristics (A. Barari et al. , 2021). Practically, G. Li-xiong a simulated model of motorcycle coating product line based on FlexSim (G. Li-xiong et al. , 2014). Moreover, he has proposed a simulation platform for automobile mixed assembly line in the context of industry 4. 0 based on FlexSim software, which is controlled by a cyber-physical production system (G. Li-xiong et al. , 2019). In our paper, we proposed a simulation platform for a brass accessories production workshop controlled by a cyber-physical production system and based on FlexSim. Nowadays, modern manufacturing industries have to incorporate an integrated manufacturing environment.
For this, we model the production of accessories A1, B1 and A2 by a Master Production Program (MPP) of the MRP approach. In the context of 4. 0, production planning requires a certain amount of data for its implementation. These are essential to establish such a master production program (MPP), from which the component requirements planning derives. FlexSim is a three-dimensional simulation software and an object-oriented for discrete systems supports C++ language. It is widely applied for manufacturing (G. Li-Xiong et al. , 2014). The FlexSim software according to the process recently; we build the model of the bushels production workshop. The simulation model consisted of more than 150 elements, 300 connections and more than 1500 code lines. Now, we de ne the main entities of the simulation model as shown in Table  3.
Moreover, Fig. 6  shows the inputs and outputs of the simulation platform. Hence, Fig. 5  below shows the simulation model of the FlexSim software of the spherical bushel production workshop. According to Table  2 , manufactured accessories respectively Body A1, Body B1 and Cuff A2 are sent to the respective stocks A1, B1 and A2 (pre-assembly stocks). Upon arrival of the purchased accessories A3, A4, A5, A6, B2 and B3; all the accessories will be sent to the mixed assembly units according to the nomenclature mentioned (quantities); previously in Table  1. Finally, the two types of products will be checked by sampling before being sent to storage respectively PFA (storage for bushels type A) and PFB (storage for bushels type B). The simulation modeling attributes of the FlexSim software and the production parameters of the accessories and the assembly of the spherical bushels are de ned as follows: 1) The physical parameters of the source (raw material) During the modeling of our workshop of production; that we want to transform radically so that it can take the digital road, we proposed the MRP method with an aim of controlling the production and having the good management there thanks to such a master program of production.
Indeed, the management of production will be automatic and controllable due to the program that we are going to integrate it as a code in our simulation model under FlexSim. Algorithm 1 details how to do requirements planning for the A1, B1, and A2 accessories. Therefore, we introduced it in the source simulation platform. In order to nd our components requirements, we introduce the Gross Need (BB) and the Expected Reception (RP) (lines 2-3). We know that the processing station (TRF1, TRF3) has a real capacity of 4. 8 days per week and the unit manufacturing times (Mt) of Body A1 and Cuff A2 are respectively calculate by referring to Table  5  as below: (i) = SP(i-1) + RP(i) -BB(i) 4. if SP(i) < BB(i+1) BN(i+1) = BB(i+1) -SP(i) -RP(i) if BN(i+1) In order to obtain the loads on the various periods, it is enough to multiply the unit manufacturing time (Mt) by the production order (orders beginning) for each period; recently calculated by the master production program; and to make then the sum for total loads.
The increasing capacity to perform large-scale single-cell genomic experiments continues to outpace the computational requirements to efficiently handle growing datasets. Herein we present Scarf, a modularly designed Python package that seamlessly interoperates with other single-cell toolkits and allows for memory-efficient single-cell analysis of millions of cells on a laptop or low-cost devices like single board computers. We demonstrate Scarf's memory and compute-time efficiency by applying it to the largest existing single-cell RNA-Seq and ATAC-Seq datasets. Scarf wraps memory-efficient implementations of a graph-based t-stochastic neighbour embedding and hierarchical clustering algorithm. Moreover, Scarf performs accurate reference-anchored mapping of datasets while maintaining memory efficiency.
INTRODUCTION The rapid evolution, integration, and diversification of high-throughput single-cell genomic technology continue to have a critical impact on our conceptual understanding regarding tissue heterogeneity, cell type specification, and differentiation  [1] [2] [3]. Accumulating technological advances reach beyond gene expression quantification to the measurement of higher-Importantly, benchmarking performed utilizing the largest publicly available scRNA-Seq and scATAC-Seq datasets show that Scarf can handle up to four millions of cells and up to a million of features on a regular laptop in a time-efficient manner while producing results that are consistent with the widely used existing, memory-exhausting tools. CC-BY-NC 4. 0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity.
RESULTS Scarf enables analysis of even the largest scRNA-Seq and scATAC-Seq datasets on laptop computers Single-cell genomic datasets undergo two stages of processing. In the first stage, sequencing reads are used to generate a count matrix which serves as the foundation for all the downstream analysis. The two axes of the count matrix usually consist of cell barcodes and features. For example, in single-cell RNA-Seq data, features normally represent genes/transcripts and for single-cell ATAC-Seq data features are the peak coordinates. Scarf achieves memory efficiency by dividing a dataset in small chunks and then compressing these chunks individually and storing them onto the disk (figure  1A ). Chunks with a larger number of zero values automatically achieve a larger degree of compression.
In contrast to other singlecell libraries like Loompy and Scanpy  16  , Scarf uses the Zarr file format  17  to store chunked datasets and not HDF5  18. Zarr improves support and performance for parallel operations as well as interactions with datasets that are stored remotely (see Methods). Learning algorithms like PCA (principal component analysis) and KNN (k-nearest neighbours) usually require the whole dataset as input. Scarf uses out-of-core (a. k. a. incremental) implementations of these algorithms that allow iterative input of data in small chunks. These incremental learning algorithms lead to the creation of the cell-cell neighbourhood graph structure of the data (see Methods for details) which can subsequently be used for downstream steps like generating UMAP/t-SNE visualizations, pseudotime ordering, etc.
CC-BY-NC 4. 0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 3, 2021. ; https://doi. org/10. 1101/2021. 05. 02. 441899 doi: bioRxiv preprint 7 One of the most common objectives of a single-cell analysis pipeline is to generate a low dimensional embedding of cells (e. g. , UMAP and t-SNE) including partitioning of cells into distinct clusters. Along with UMAP/t-SNE embedding and clustering, current protocols involve common processes like data normalization, feature selection, dimension reduction, and cell neighbourhood graph generation, forming a basic workflow of single-cell data  19. We benchmarked the time and memory consumption of such a basic workflow using Scarf and another widely used scRNA-Seq analysis toolkit in Python, Scanpy  16.
Using six scRNA-Seq datasets  [20] [21] [22]  with increasing cell numbers, we found that under the same analysis parameters (see Methods), Scarf had substantially lower memory consumption than Scanpy (figure  1B ). Importantly, using less than 16GB of memory (RAM), which is commonly available in modern laptops, even the largest set of four million cells  22  were efficiently processed by Scarf. In contrast, Scanpy was not able to process the two and four million cell datasets due to high memory consumption, despite 200GB of RAM being available during the benchmarking experiments. For the largest set successfully analysed by Scanpy (one million brain cell dataset generated by 10x genomics), approximately 40 times more computational memory was used compared to Scarf, under the same parameters and equivalent steps.
Moreover, the lower memory consumption by Scarf did not come at a cost of the runtime of the workflow, which was similar to Scanpy (figure  1C ). Of note, Scarf was able the process all analysis steps using the four million cell dataset within 10 hours without exceeding 16GB of memory usage. The four datasets that could be processed by Scanpy, were visualized by the UMAP embeddings generated by either Scarf or Scanpy (figure  1D ). To aid the visual inspection, cells were coloured based on their cluster identity obtained using Scarf. The generated UMAPs indicate that very similar embeddings of cells were achieved. To quantify any potential differences, we calculated the average centroid distance (ACD), i. e. , the average Euclidean distance of cells from their cluster centroids in the UMAP space, and cross-evaluation was performed using UMAP from one and clustering information from the other pipeline.
We investigated the runtime of each major stage of the pipeline and found that the proportion of time consumed by each stage was similar across the benchmarked datasets (figure  1F ). With the chosen parameters, UMAP was the longest running step for both Scanpy and Scarf, occupying more than 50% of the runtime. For Scanpy, the runtime for Leiden clustering was augmented when dataset size was increased, while consistently low in Scarf. Scarf can easily be applied to other single-cell genomics methods, including large-scale scATAC-Seq. To demonstrate this scalability, we used a dataset generated from human foetal samples representing 15 organs, 720 613 cells in total and a feature set comprising 1. 05 million peak regions  23. Scarf was able to process this data, generating clusters and UMAP embeddings, in approximately 5.
5 hours using less than 2. 5GB of RAM. As done previously for the scRNA-Seq datasets, we benchmarked the runtime and memory consumption across three critical parameters: number of peaks, latent semantic indexing (LSI) components used, and number of neighbours identified for neighbourhood graph creation (figure  1G ). In contrast to RNA-Seq, we found that when the number of peaks and/or LSI components was increased, memory usage was increased. However, the memory consumption stayed under 10GB even when approx. 25% of peaks were included in the analysis. UMAP embeddings labelled with author-determined cell types (figure  1H ) revealed that the UMAP embedding generated by Scarf accurately captured the heterogeneity of the cell types and categorized cells based on tissue of origin. Furthermore, the UMAP embedding, and the clustering of cells were not affected by batches of data generation (figure  1I ).
Topology assisted cell downsampling using Scarf The increasing generation of high-throughput single-cell genomic data has prompted the use of downsampling (sub-selection of representative cells) to allow for advanced downstream analysis. Algorithms that have a polynomial space complexity (aka memory complexity) greater than ܱሺ݊ ଶ ሻ are generally not scalable to atlas scale datasets. Downsampling is used to obtain biologically informative results from high space complexity algorithm to either reduce the runtime or memory consumption  24. Random sampling is often used as a downsampling solution however it provides no guarantees of preserving archetypes or differentiation trajectories in the downsampled versions of the data. Recently, GeoSketch  24  has been proposed to solve this challenge, however, GeoSketch is not memory efficient as it has been designed to be used with large-scale computational resources.
Here, a novel downsampling algorithm called TopACeDo (Topology Assisted Cell Downsampling) is embedded into Scarf. TopACeDo leverages the neighbourhood graph structure of the cells to perform downsampling that aims to conserve rare cell types, reduce the proportion of highly represented cell types, and preserve the underlying manifold of the transcriptional space. Briefly, TopACeDo identifies landmark points in the graph, seed cells, and then tries to find paths to connect those seed cells using prize-collecting Steiner tree algorithm (PCST) (figure  2A ). An implementation of PCST with near-linear time complexity  25  is used to achieve fast and scalable downsampling on millions of cells (see Methods for details). Importantly, we found that Scarf with embedded TopACeDo was able to perform downsampling on datasets with up to 4 million cells using less than 16GB of RAM (figure  2B ).
In addition, downsampling took less than 3 minutes on the 1 million cell dataset and less than 15 minutes in the case of the 4 million cell dataset (figure  2C ). UMAP visualization of four atlas scale datasets indicates that even with downsampling to ~1% of cells, cells belonging to all clusters across the UMAP space were sampled (figure  2D ). Furthermore, for quantitative analysis of downsampling, we analysed the degree of connections subsampled cells make with other subsampled cells in the original neighbourhood graph. A high frequency of zero-degree values indicates that many cells are disconnected from other subsampled cells and is a marker of poor subsampling, indicating that intermediary cell states are missing in the subsampled set. When comparing the number of disconnected cells between Scarf with randomly subsampled cells from four atlas-scale datasets, 100% of Scarfsubsampled cells displayed non-zero degree values across all datasets, while random sampling resulted in non-zero degree values in 19.
6% to 27. 4% of cells. (figure  2E ). The primary objective of downsampling is to decrease redundancy in the dataset while preserving the rare cell types/states. These two objectives can be accessed by calculating the change in the proportion of cells from each cluster after downsampling. We show that across the four atlas scale datasets, Scarf was able to reduce the proportion of cells from larger clusters while simultaneously increasing the proportion of cells from smaller clusters (figure  2F ). The proportion of cells from the smallest cluster in each of the datasets increased between 5. 55 and 40. 48 folds while the proportion of cells from the largest cluster decreased between 2. 45 and 5. 12 folds. In comparison, random clustering did not show any increase in the proportion of smaller clusters or decrease in the proportion of larger clusters.
As a result, random clustering has a low probability to sample rare clusters. For example, the smallest cluster in the atlas-scale datasets had none of the cells sampled in 60% (1M cells dataset), 60% (2M cells dataset), and 40% (4M cells dataset) (n=10) of random samplings. In contrast, all clusters were sampled using Scarf, regardless of the original cluster size. In order to compare the results of downsampling between Scarf and GeoSketch, we used two contrasting small scale datasets consisting of either 10K PBMC cells of distinct cell types (provided by 10X Genomics) or 3. 5K pancreatic cells  26  within a continuum of differentiation. Visualization of progressively increasing level of downsampling on each of these datasets, showed that Scarf was able to capture the cells throughout the UMAP landscape   S2 ).
Running 100 iterations of downsampling with either Scarf, GeoSketch or random sampling, 100% of downsampled cells selected by Scarf had a non-zero degree on both the datasets, while the same measurement for GeoSketch was 63. 13% and 77. 79%, and for random sampling 48. 77% and 71. 23% in the PBMC and pancreatic cell datasets, respectively (figure  2G  and 2I ). Compared to random sampling, both Scarf and GeoSketch sampled an increased proportion of cells from smaller clusters and a reduction in the proportion of cells from larger clusters (figure  2H  and 2J ). Sampling enrichment obtained using Scarf were strongly correlated with decreasing cluster size in case both, pancreatic cells (Pearson's r=0. 98, p-value=1. 66e-0. 8) and PBMC dataset (Pearson's r=0. 93, p-value=7. 04e-0. 6), while in the case of GeoSketch, there was either no correlation (pancreatic cell dataset: Pearson's r=0.
Memory efficient projection of cells for compositional analysis and coembedding of cells The continuous growth of publicly available single-cell genomic datasets prompts a need for reliable and appropriate data integration. In Scarf, integration takes a reference-based data alignment approach  [27] [28] [29]  wherein the transcriptional states of query/target cells are interpreted considering the heterogeneity of the reference cells. To achieve reference-based mapping, Scarf implements a highly memory efficient KNN mapping approach (see Methods). Scarf does not attempt to perform batch correction like other data integration methods  [30] [31] [32]  but rather brings the target cells into the estimated manifold of the reference cells. Demonstrating the efficiency and accuracy of Scarf's data integration approach, we performed mapping of published single-cell RNA-Seq dataset of interferon beta (IFN-β) treated peripheral blood mononuclear cells (n=10,111) to their culture-matched control cells (n=8,487)  33.
Prior to mapping, the datasets were independently analysed to generate UMAP embeddings of both treatment arms (figure  3B-C ) and cluster annotation was performed using known marker genes of cell types previously reported for this dataset  31. The annotation was additionally confirmed by performing a marker gene search (supplementary figure  S3A-B ). Next, the IFN-β cells were mapped onto the control cells by including the CORAL  34  correction step (see Methods) and the reference cell-cell neighbourhood graph, now spiked with target cells, was subjected to the UMAP algorithm to obtain a low-dimensional co-embedding including both data sets (see Methods). The 'unified' UMAP of the control and IFN-β treated PBMCs (figure  3D ) shows that the cells from the two datasets are well integrated. We noted that the reference cells in the unified UMAP (figure  3E ) had a very similar layout as compared to the UMAP resulting from the reference cells alone.
This indicates that the inclusion of the IFN-β treated cells did not disrupt the manifold of the control cells. Visualization of the cell type identity of the mapped IFN-β cells on the unified UMAP clearly showed that Scarf was able to co-embed cell types from the two datasets accurately (figure  3F ). Scarf uses the KNN mapping to transfer labels from reference to target cells (see Methods). The original UMAP of IFN-β cells (figure  3G ) annotated with predicted cell types clearly shows that   ST1 ). Of note, Scarf predicted cell type with high accuracy even on low-abundant cell populations within the dataset. For example, 93. 2% and 97. 6% of the predicted cell-type labels for pre-dendritic cells and erythrocytic IFN-β treated cells respectively, were true. Reference based data integration using Scarf is not limited to two samples.
Multiple samples can be co-embedded into the reference manifold simultaneously, here demonstrated using four datasets of pancreatic cells  [35] [36] [37] [38]. These data are from four different labs, and derived using four different single-cell RNA sequencing platforms viz. , InDrop  35  (n=7715), CEL-Seq2 36 (n=1946), SMART-Seq2 37 (n=1809) and C1-IFC SMARTer 38 (n=1446). Each dataset was processed individually, and the heterogeneity was explored by generating individual UMAP embeddings. (supplementary figure SC-F). Subsequently, we used author-provided cell type labels to annotate the cells. Choosing the InDrop dataset as reference, we mapped the other datasets using CORAL corrected values and generated a unified UMAP, as done above for the PBMCs. Again, the UMAP embedding of the reference cells remained largely unaltered when coembedded with the other datasets (figure  3H ) Moreover, the co-embedding showed mixing of the datasets into each of the reference clusters (figure  3I ) and visualization of the cell type identity of the mapped cells on the unified UMAP revealed that co-embedding was highly cell type specific (figure  3J ).
As previously described for PBMCs, the mapped cells were accurately classified into reference cell type labels (figure  3K , supplementary table ST2). For example, a rare population of endothelial cells from CEL-Seq2 (n=19) and SMART-Seq2 (n=15) datasets was labelled to 100% accuracy by the classifier while alpha cells, the most abundant cell type, were identified with approx. 99% accuracy in each of the three mapped datasets. Having assessed the accuracy of the data integration, we aimed to assess the scalability of Scarf to larger datasets. Here, we chose a modestly large dataset with 146,093 cells from the mouse nervous system  39. The dataset was processed to generate a UMAP and annotated with user provided cell type specification (figure  3L ). Next, 43,954 oligodendrocytes and 21,885 astrocytes from another brain cell atlas  40  were mapped to this reference dataset.
By utilizing the nearest neighbour index that was already generated for the reference dataset, the mapping, for both the datasets took approx. 40 seconds and was done under 500MB of memory consumption. Convincingly, the unified UMAP showed that the mapped cell types colocalize with the equivalent clusters in the reference dataset (figure  3M ). KNN classification was able to accurately predict the correct cell type for 97. 6% of astrocytes and 99. 5% of oligodendrocytes. Generating co-embedding of large datasets can be time consuming when multiple mappings on multiple large datasets are performed. To this end, Scarf provides an additional alternative in the form of mapping scores  41  (see Methods). Here, we demonstrate individually generated mappings for astrocytes and oligodendrocytes, visualized by increasing cell size in proportion to their mapping score (figure  3N-O ).