dataesr/scientific-paragraphs-categorization huggingface dataset:
Low dimension embedding Variable genes (n=4000) were identified with Seurat FindVariableFeatures (vst method), BCR coding genes were excluded from the lists of variable genes. After centering with Seurat ScaleData, principal component analysis was performed on variable genes with Seurat RunPCA, and embedded in two-dimensional UMAP plots with Seurat RunUMAP on 40 principal components. UMAP embeddings colored by sample metadata were generated by Seurat DimPlot, those colored by single gene expression or module scores were generated by Seurat FeaturePlot, those colored by BCR sequence metadata or ScoreGCtoMem and ScoreTFHactivated were generated with ggplot2 ggplot.
Computation of signature scores We first clustered normal B cells analyzed by FB5P-seq on the basis of gene expression, discriminating GC, Mem and PC cells expressing expected marker genes (Fig. S3A-C ). Clustering of the same cells on the basis of surface protein expression also segregated GC, Mem and PC cells (Fig. S3D ). We retained cells characterized by the same identity in gene-based and protein-based clustering (Fig. S3E ). To avoid overrepresentation of cell cycle-related genes in GC-specific signature, only non-cycling (G1 phase) GC B cells were used in those analyses (Fig. S3F ), after cell cycle phases were attributed with Seurat CellCycleScoring using S or G2/M phases specific gene lists as previously described  76. We used the FindMarkers function from Seurat package (test. use = "bimod", min.
Annotation of malignant B cells based on signature scores Malignant B cell subsets were defined independently for FB5P-seq, 10x 3', and 10x 5' datasets. For each technology, cells passing QC (excluding cells from FL636, where too few malignant B cells were detected) were grouped into a single Seurat object, and expression scores corresponding to lists of signature genes were computed for every cell in the object using the Seurat function AddModuleScore. PC-like FL B cells were manually gated from malignant B cells with a threshold defined based on the separation of normal PC cells from non-PC cells (Fig. 2A-B ). After exclusion of PC-like cells, GC-like, Mid and Mem-like FL B cells were manually gated from malignant B cells with thresholds based on the separation of normal GC B cells from normal Mem B cells (Fig.
3A-B ). For samples FL2 (FB5P-seq and 10x 3' datasets) and FL539 (10x 5' dataset), marker genes of PC-like or non-PC-like were computed with the Seurat FindMarkers (only. pos = TRUE, test. use = "bimod") function on sample-specific malignant B cells. The resulting gene lists filtered by adjusted p-value < 0. 05 are reported in Supplementary Data Table  2. For all samples, marker genes of GC-like or Mem-like were computed with the Seurat FindAllMarkers (only. pos = TRUE, test. use = "bimod", min. pct = 0. 25, thresh. use = 0. 25) function on sample-specific malignant non-PC-like B cells, and only marker genes with p < 0. 05 were retained. Recurrent markers in the 21 samples analyzed by either FB5P-seq, 10x 3' or 10x 5' are reported in Supplementary Data Table  3. ScoreGCtoMem was computed independently for FB5P-seq, 10x 3', and 10x 5' datasets.
For each dataset, a polynomial of degree 2 regression was fitted on the distribution of malignant B cells in the scatter plot of Mem (x-axis) and GC (y-axis) signature scores (Fig. 3B ), and the projection of data points on the regression curve was used to order cells from the most GC-like (ScoreGCtoMem = 0) to the most Mem-like (ScoreGCtoMem = 1) states. Heatmaps were generated with custom scripts using the pheatmap function. Genes for PC-like heatmaps (Fig. 2D ) were selected on the basis of known expression in normal human PC. Genes for GC-like to Memlike heatmaps (Fig. 3D ) were selected among top differentially expressed genes between GC-like and Memlike FL B cells and on the basis of known expression in normal GC and Mem cells.
Unsupervised analysis of intra-sample heterogeneity of malignant B cells For each sample from the 10x 3' and 10x 5' datasets, we created a new Seurat object from malignant non-PC-like B cells only. After normalization and centering, we selected the top 4000 variable genes with FindVariableFeatures (vst method) and computed principal component analysis with RunPCA, followed by UMAP embedding with RunUMAP on 40 principal components. UMAP embeddings colored by ScoreGCtoMem values are shown in Fig. 4A. Single-cell pseudo-time trajectories were computed with the DDRTree algorithm from the Monocle2 package in R  77. Expression profiles were reduced to three dimensions using the reduceDimension function in the DDRTree package in R  78. Analysis was performed as previously described  36. For each sample, we computed Pearson's correlation coefficient between the cell loadings on the first principal component PC1 and ScoreGCtoMem values (Fig.
TME analysis For all samples in the 10x 3' and 10x 5' datasets, excluding FL636 (where too few malignant B cells were detected), we selected non-B TME cells passing quality controls, and constructed Seurat objects. Each Seurat object was log-normalized with NormalizeData, variable genes (n=4000) were identified with Seurat FindVariableFeatures (vst method), and BCR coding genes were excluded from the lists of variable genes. We integrated the sample-specific objects using the Seurat v3 method as described  73  , with FindIntegrationAnchors (anchor. features = 2000, dims = 1:40, k. filter = 92) and IntegrateData (dims = 1:40). The resulting integrated object was centered, reduced with RunPCA and embedded in two dimensions with RunUMAP on 40 principal components. The quality of the integration was assessed visually by DimPlot colored by sample origin, where cells from distinct samples were grouped in cell type-specific clusters.
After identifying cells in G1, S or G2/M phase of the cell cycle with CellCycleScoring, non-supervised graphbased clustering with FindNeighbors (k. param = 30) and FindClusters (resolution = 1) detected 15 clusters of TME cells (Fig. 6A ). We discarded clusters corresponding to doublets with B cells, unknown T cells, and S/G2/M cell cycle cells for further analyses. According to marker gene expression, we annotated 11 distinct TME cell subpopulations: We then compared, for any given patient's sample, the proportions obtained for each cell subset from FACS and scRNA-seq datasets. To achieve this, the 11 subpopulations identified by scRNA-seq were grouped in 6 subsets as follows: (1) Naïve T cells and Central Memory T helper cells were defined as CD4+ TN/TCM cells, (2) TREG and TFR cells were defined as TREG/TFR cells, (3) TFH cells type 1, type 2, and Central TFH cells were defined as TFH cells, (4) Central Memory CTL were defined as CD8+ TN/TCM cells, (5) CTL effector and T follicular CTL cells were defined as CD8+ CTL act.
In vitro culture analysis The demultiplexed 10x5' dataset corresponding to the 4 samples cultured in 9 different conditions was loaded as a Seurat object. We identified non-B TFH cells and malignant B cells as described above using marker genes signatures, light chain isotype restriction, and validation by BCR-seq information when available (FL338). Focusing only on malignant B cells, we annotated PC-like (n= 11 cells out of 4,315 total malignant B cells) and non-PC-like cells, and computed the ScoreGCtoMem on non-PC-like cells as described above. We compared ScoreGCtoMem values of cells initially sorted as different states (GC-like, Mid, Mem-like) and cultured in different conditions (FL B cells only, + auto-TFH, + aCD40 + IL4 + IL21), either for all samples pooled (Fig. 6E ) or for each sample individually (Fig.
S8A ), using Kruskal-Wallis test followed by pairwise Wilcoxon rank sum test with Benjamini-Hochberg p-value adjustment. To identify genes that were robustly induced in malignant B cells by co-culture with auto-TFH, we computed for each sample (FL338 diag. , FL338 rel. , FL068 diag. , FL068 rel. ) and each initially sorted state (GC-like, Mid, Mem-like) the genes upregulated in the "+ auto-TFH" condition compared to the "FL B cells only" condition, using Seurat FindMarkers (only. pos = true, min. pct = 0. 1, test. use = "bimod"), retaining only non-BCR coding genes with p-value < 0. 01. For each initially sorted state, marker genes were ranked by recurrence in the 4 samples, and we retained genes with recurrence >1 as robust TFH-activated genes. The resulting 25-gene list (PFN1, GRHPR, ISCU, PRDX2, UFC1, TXN, NFKBIA, CD40, CACYBP, GRN, CD83, PEA15, TESC, DHX9, TRAF4, PLIN3, APOBEC3G, NFKB2, CFLAR, ICAM1, CCDC28B, EBI3, MARCKS, CCL17, RGS1) was used to compute the ScoreTFH-activated with the Seurat function AddModuleScore.
Metaclustering For each sample from the 10x 3' and 10x 5' datasets, we used the Seurat object of malignant non-PC-like B cells analyzed in the "unsupervised analysis of intra-sample heterogeneity of malignant B cells" as described above. Each sample was clustered with Seurat FindNeighbors (reduction = "pca", dims = 1:40) and FindClusters (resolution = 0. 8), and cluster-specific markers were identified with FindAllMarkers (test. use = "wilcox", only. pos = true, min. pct = 0. 1, logfc. threshold = 0. 25) and filtered for p_val_adj < 0. 05. Those analyses on 15 distinct datasets yielded 74 sample-specific graph-based malignant B cell clusters with 74 associated lists of marker genes. We then computed the similarity matrix of those 74 clusters by pairwise comparisons of lists of marker genes using the Jaccard similarity measure, computed as Jaccard(list1, list2) = length(intersect(list1, list2)) / length(union(list1, list2)).
For deconvolution of cell type composition, we used the Python package cell2location  49. We first constructed a reference scRNA-seq dataset by integrating all 10x 3' and 10x 5' datasets produced in the study (all cells passing quality controls, n = 15 samples) with the Seurat v3 method  73  with FindIntegrationAnchors (default settings) and IntegrateData (default settings). The resulting integrated object was centered, reduced with RunPCA and embedded in two dimensions with RunUMAP on 30 principal components. We then used graphbased clustering with FindNeighbors (default settings) and FindClusters (resolution = 1. 4), together with cell type or cell state annotations from our focused TME and metaclustering analyses, to annotate the integrated scRNA-seq reference with cell types as described in Fig.
7C. Based on that annotation, lists of cell typespecific genes were computed with FindAllMarkers (test. use = "wilcox", only. pos = TRUE, min. pct = 0. 1, logfc. threshold = 0. 25) and filtered for adjusted p-value < 0. 01. We used those lists for computing signature scores in the scRNA-seq and spatial transcriptomics datasets using AddModuleScore as shown in Fig. S9B  as an independent assessment of the cell2location output. For cell2location we reutilized the Jupyter notebooks provided by the authors for human lymph node analysis. That analysis outputs, for each spatial transcriptomics spot, a series of q05_spot_factors for every cell type annotated in the reference scRNA-seq dataset, corresponding to the probabilistic inference of the absolute number of cells of that cell type in that spot.
ACKNOWLEDGEMENTS We are grateful to all past and present members of the  Milpied and Nadel/Roulland laboratories at Centre d'Immunologie de Marseille-Luminy  for useful discussions. We thank the  Bioinformatics Core Facility of Centre d'Immunologie de Marseille-Luminy  for helpful discussions and comments. We thank the  Flow Cytometry Core Facility of Centre d'Immunologie de Marseille-Luminy. We are grateful to patients who consented their samples to the CeVi biobank, to pathologists from  Institut Carnot CALYM CeVi  centers, and to  E. Mollaret  from  Institut Carnot CALYM  for organizing samples transfer from the  CeVi biobank. We acknowledge HalioDX  and the  UCA Genomix platform for sequencing. We acknowledge Centre de Calcul Intensif d'Aix-Marseille  for granting access to its high performance computing resources.
This work was supported by grants from  Fondation ARC ,  Cancéropôle Provence-Alpes-Côte d'Azur, ANR  ( ANR-17-CE15-0009-01 JCJC MoDEx-GC ),  Institut Carnot CALYM  and  Institut Roche  to P. M. This work was supported by institutional grants from  INSERM ,  CNRS  and  Aix-Marseille University  to the CIML. was supported by a fellowship from the  French Ministry of Research and Higher Education.
When no coating was incorporated, an increasing electrochemical noise was measured, which did not allow the determination of plant pH. In contrast, the final device incorporating the cellulose-based coating could monitor the pH in the sap continuously for at least 5 h, with a low noise in the range of 0. 07 pH/min. Initially, a stable pH of 4. 17 ± 0. 03 was measured. Upon watering the plant using DI water, a sudden increase in this value followed by a stabilisation around 4. 37 ± 0. 07 was measured. This slight increase in sap pH due to the transpiration mechanisms of plants was consistent with the previously reported work in the field. The low-cost measurement system also incorporated a bme680 sensor that allowed the measurement of environmental parameters such as temperature, humidity and VOC concentrations and could send the obtained data wirelessly via an online server.
In this paper, we propose to model the behaviors of Moroccan consumers in terms of energy consumption in different Moroccan buildings using the open MORED (A Moroccan Building Electricity Dataset) dataset as a data warehouse. The techniques used are Machine Learning Algorithms and Data Mining Techniques. The results obtained in this paper allow us to understand the behavior of a Moroccan consumer in terms of energy consumption and the use of appliances in the home. Inter-Appliance Association and Peak Hours detected in this study will be used later to develop an Energy Management System specifically for a Moroccan building. This can lay the foundation for efficient Energy Demand Management while improving end-user participation.
Previous works The futures building was equipped with smart meters, sensors and photovoltaic production, and many other appliances to facilitating the controls in the grid. The goal of sensors is collecting the data relative to the building such as the inside temperature, the outside temperature, the tank temperature heat pump, and the thermal storage system. The values of this variables could be collected from other sensors that are not installed in the building but in other local in the grid. The weather file related to the study zone could be collected also from the satellite. This dataset uses by researchers to develop a stochastic models  [2][3]. In  [4]  the authors use genetic algorithms to evaluate a set of data relating to each type of building. He develops software created in java to collect the necessary information from a SqlLite database.
At each stage, the software collect data and creating an initial population and IDF file for each individual in the population. The evaluation of each individual is done using Energy Plus (EP) simulation software (fitness function). The results obtained are then used to select the best individuals and regenerate a new population. The previous steps are repeated until an approximate convergence is obtained in the algorithm. Work in  [5] , have developed an EMS (Energy Management System) to predict and optimize the energy consumption in the building. The building is in Ukraine. The research uses a framework to collect and store all building information and EP was using to simulate the building energy's consumption. The house is equipped with a talk thermal pomp and other smart meters to calculate other variables measure.
The principal objective is the minimize the energy consumption in the building according to the user's comfort. In  [6] , the authors develop a DDC (Direct Costing Control) using machine learning algorithms. Firstly the data was collected from sensors that are installed in each building. The sensors detect the movement in the building and calculating the occupancy. The data is daily collected and stored in the local database. The data was divided in the tow dataset: the local dataset and the global dataset. The K-means neighbor clustering algorithm is used to clustering the data set to different occupancy patterns. The model developed was to predict occupancy for each room based on the historical dataset. The prediction allows the control of cooling in the room and takes into account the occupancy prediction.
In  [2]  the authors propose stochastic processes for modeling occupancy by using Markov chains to calculate transition probabilities(between absent and present) and to represent the occupancy probability density at that day and time. The dataset was obtained by the use of motion sensors. In  [9]  A genetic programming algorithm was implemented to learn the behavior of an occupant in a single-person office based on motion sensor data. The learned rules predict the presence and absence of the occupant with 80%-83% accuracy on testing data from 5 different offices. understanding the relationship between occupant behavior patterns and energy consumption  [10][11]. In  [3]  a Hidden Markov Model-based algorithm for Activity Daily Living (ADL) detection from data acquired employing a combination of motion, temperature, and analog sensors for water and cooking hobs usage monitoring was implemented.
Proposed Methodology This paper aims to model the behaviors of Moroccan consumers in terms of energy consumption. The community Moroccan is divided into different states socio-economic. Each neighborhood has its characteristics. For example, in affluent neighborhoods, the energy consumption is relatively higher if we compare it with the energy in disadvantaged neighborhoods. This section presents the proposed approaches to extract the frequent patterns in the MORED dataset based on the information recorded in the "event" file associated with each premise. The data extraction is done in 4 phases: data preparation, exploitation, generation of frequent itemset and association rules, and visualizations. The analysis and discussions in this paper focuses on two types of building for 11 buildings in total.
Data description Many works in the literature  [7] ,  [8] ,  [2]  use wireless ambient sensors to get information from his surrounding simply and efficiently with no intrusive issues. Different sensors can be installed to capture various indoor parameters such as motion or inside temperature  [10]. All this information is organized and stored in datasets. Some of these datasets are free and open to allows researchers to study and develop here owner works. In our work, we use the datasets described in  [15].
Data Pre-processing One of the major tasks is data preparation. MORED data set contains three important data set: Wall premises electricity consumption(WP), Individual Load energy consumption(ILs), and Events Datasets. For our study, we use Event Datasets to capturing the different frequents itemsets and Inter-appliances Association. For our study, we chose the important appliance in each building as presented in Table  1. The time resolution data is extracted a 1/5[S/s].
Frequent Itemsets and Association Rules Frequent pattern sets are patterns that occur frequently together in a Transaction Database DB. They are an important form of regularity. Let I = {I 1 , I 2 ,. , I m } be a set of items (appliances). An itemset X is subset of I : X ⊆ I. An itemset X of size k (|X| = k), is called a k-itemset. A transaction on I is a pair T formed by a transaction identifier T id , and an itemset X ⊆ I: T = (T id , X). TDB, is a set of transactions on I : D = {T 1 , T 2 ,. , T n }. A transac- tion T = (T id , X) supports an itemset A ⊆ I, if it contains all items of A. The support of an itemset X ⊆ I, denoted support(X), is the fraction of all transactions T in D that support X : support(X) = |{T ∈ D : T supports X}/|D|. The support measures the frequency of a pattern (itemset): the higher it is, the more frequent the pattern is frequent.
Discovering Frequent patterns and Inter-Appliance Associations To extract all association rules between the devices, an algorithm must be implemented. The input of the algorithm is the database with all transactions as well as S min and C min. The output of the algorithm will then be all the association rules of support S ≥ S min and confidence C ≥ C min. To optimize the algorithm it is common practice to compose the problem into two sub-problems : First sub-problem: • Find all frequent itemsets. Let F be their set. Second sub-problem: • Determine, from F, all the association rules of associations of sufficient confidence.
7: end if 8: end for The previous algorithm is inefficient in practice because of its high complexity which is O(2 |I| ). To resolve this problem, Agrawal and his co-authors in 1994  [17]  propose Apriori algorithm for finding all frequent itemset in the database. It is a basic algorithm that allows extracting all frequent itemsets in a large TDB (having several thousands transaction for searching frequent patterns of attributes and several million records). It uses an intelligent enumeration of itemsets based on the decay of the support function. The algorithm pseudo-code is presented in Algorithm 2.
7: i ← i + 1. 8: end while 9: Return the union of sets F i. Apriori algorithm  [17]  with candidate generation can suffer from the following problems: • Breadth-first approach; i. e. , level-wise search. • Generate a large number of candidate sets. • Repeatedly search through the entire database to find support for an itemset. To solve this problem, the work in  [18]  proposes a pattern growth or FP-growth approach. The FP growth algorithm finds frequent patterns without candidates generation. The main advantages of FP Growth Algorithm are the following: • This algorithm needs to scan the database only twice when compared to Apriori which scans the transactions for each iteration. • The pairing of items is not done in this algorithm and this makes it faster. • The database is stored in a compact version in memory.
finding frequent patterns via incremental extraction The Algorithms 3 and 4 require a huge memory space to store the frequent patterns in the database. To overcome this problem, the authors in  [19]  propose an incremental procedure to determine the frequent patterns in a bottom-up way. The main idea is to divide the complete database into 24-sub-database of size 24 itemSet (here the time granulation is one hour). After this step, the FP-grouth algorithm will be applied to the first 24 sub-databases to determine the frequent items. This procedure will be incremented for the next 24-sub database. The construction of FP-Tree is done in two steps: The first step is to scan all transactions in the 24-sub-database and determine the support of each item. Then, the procedure will sort all items and transactions based on their support value in ascending order.
The item with the highest support value will then be placed at the beginning and so on for the others. The second step is to go through all the transactions in each 24-sub-database and determine for each transaction if all the items are accessible via the roots of the current tree. If so, the support of each item visited is incremented by 1. In the opposite case (i. e. an item inaccessible via the current tree) we build a new root. The second step will be repeated for all the transactions of the 24-sub-database.