dataesr/scientific-paragraphs-categorization huggingface dataset:
Briefly, a k-nearest neighbor graph was generated from the joint embedding of the HLCA core and the new, mapped dataset, setting the number of neighbors to k=50. Based on the abundance in a cell's neighborhood of reference cells of different types, the most likely cell type label for that cell was selected, and a matching uncertainty score was calculated. For label transfer to lung cancer and healthy, spatially annotated projected data (fig. 5b, e ), cells with an uncertainty score above 0. 3 were set to "Unknown". For the extended atlas, we calibrated the uncertainty score cutoff by determining which uncertainty levels indicate possible failure of label transfer. To determine the uncertainty score at which technical variability from residual batch effects impairs correct label transfer, we evaluated how label transfer performed at the level of datasets, as these predominantly differ in experimental design.
To determine an uncertainty threshold indicative of possible failure of label transfer, we harmonized original labels for 7 projected datasets  17, 21, 53, 57, 62, 64  (one unpublished: "Duong_lungMAP_unpubl") and assessed the correspondence between original labels with the transferred annotations. To assess the optimal uncertainty cutoff for labeling a new cell as "unknown", we used these results to generate an ROC curve. We chose a cutoff around the elbow point, keeping the false positive rate below 0. 5 (uncertainty cutoff 0. 2, true positive rate 0. 88, false positive rate 0. 49) to best distinguish correct from incorrect label transfers (Extended Data Fig. 17 ). False positives are either due to incorrect label transfer, or due to incorrect annotations in the original datasets. Cells with an uncertainty higher than 0.
SUPPLEMENTARY FIGURES Extended Data Figure  1. Results of dataset integration benchmarking. Rows represent methods tested, using a particular preprocessing. Preprocessing is summarized by "Features" (either HVG or FULL, corresponding to a gene selection of the 2000 or 6000 most highly variable genes, respectively) and "Scaling" (specifying whether or not gene values were scaled to mean 0 and standard deviation 1 across cells). Methods are sorted by overall score. Overall score is a weighted mean of the batch correction score and an th bio conservation score, which in turn are a mean of the individual metrics within the category. Metrics have been previously described  16. The output column specifies whether a method has corrected gene counts, an integrated embedding, or an integrated graph as output.
Scanorama and fastMNN were benchmarked twice, once with a corrected gene matrix as output, and once with a corrected embedding as output. scANVI and scGen were given coarse cell type labels as input, as indicated by the asterisk. fastMNN required too much memory on the full feature (6000 gene) data, therefore only the hvg results are included in the figure. Extended Data Figure  2. Subject diversity per HLCA core cluster. Subject diversity is calculated for every cluster as entropy of subject proportions in the cluster, with high entropy indicating the cluster contains cells from many different subjects. Matching cell type annotations are shown in fig. 3d. Extended Data Figure  3. Marker expression among cells from a high-label-entropy cluster. DC2, monocyte and macrophage marker expression is shown for cells from the immune cluster with highest label entropy, as depicted in fig.
3c. Cells are labeled by their final annotation, as well as their original label. Log-normalized counts are scaled such that for each gene the 99th expression percentile, as calculated among all cells included in the heatmap, is set to 1. 5. Where more than 750 cells of the cell type were present in the HLCA, expression is only shown for 750 randomly sampled cells from that cell type. Counts were normalized such that a gene's 99th expression percentile across all cells for the heatmaps was set to 1. DC: dendritic cell. AT1, 2: alveolar type 1, 2 cells. EC: endothelial cells. FB: fibroblasts. Mφ: macrophages. MT: metallothionein. NK cells: natural killer cells. SM: smooth muscle. SMG: submucosal gland. Extended Data Figure  6. Rare cell identification and recovery for three different integration methods.
Results are shown for the bestperforming preprocessing for each method, and based on the benchmarking data (12 datasets from the HLCA core). Recall (i. e. the percentage of cells with a specific label that are present in the cluster under consideration) and precision (i. e. the percentage of cells from a cluster labeled as the cell type under consideration) are shown for the three level 3 clusters with the highest recall of ionocytes, tuft, and NE cells respectively. NE: neuroendocrine. c, Expression of migratory DC marker CCR7 among migratory DCs versus other DCs, split by study. Number of migratory DCs per study is specified in the x-axis labels. DC: dendritic cell. Extended Data Figure  7. Correlation of technical and biological covariates with number of samples, and with each other. a, Relation between the number of samples in which a cell type was observed, and the mean inter-sample variance explained by the technical and biological covariates.
d, Variance explained by sampling method depends only partly on diversity in sampling methods as quantified by the sampling method entropy (Pearson r=0. 75, p=0. 0001). Some cell types, such as T cells, are less sensitive to sampling than others, despite higher sampling method entropy. AT1 Extended Data Figure  14. Expression of CCR7 among cells annotated as migratory DCs by label transfer. Expression of CCR7 is shown for all cells that were annotated as migratory DCs with low uncertainty (<0. 2) (top) and all other cells annotated as DC (bottom) by label transfer from the HLCA core to the extended HLCA. Cells are grouped based on study of origin (some studies contain multiple datasets). X-tick labels show study, number of cells annotated as migratory DCs, and number of total cells (in thousands) per study.
CCR7 counts shown are counts that were normalized based on the total count among 2000 genes used for mapping to the HLCA core, and then log-transformed. DCs: dendritic cells. Extended Data Figure  15. Label transfer uncertainty per cell type across different experimental features. Label transfer uncertainty of cell types is shown for categories of three experimental features, as compared to uncertainty in healthy cells. For every category and for each cell type, the mean uncertainty across datasets from that category was calculated, using per-dataset means and splitting up datasets with samples from more than one category. The difference between cell type uncertainty from each category and those of healthy datasets is shown. Where mean uncertainty was higher than 0. 25 even in healthy, coarser parent labels were included (e.
Uncertainty is shown for cells from healthy samples (blue) and from IPF samples (orange) from the same dataset. Cell types are sorted by difference in uncertainty between healthy and IPF cells. d, Uncertainty-based disease signature scores among alveolar fibroblasts (left) and alveolar macrophages (right), as annotated through label transfer. Cells are split into cells from healthy samples (blue), low-uncertainty cells from IPF samples (light orange), and highuncertainty cells from IPF samples (bright orange). For both b and d, boxes show median and interquartile range, data points outside more than 1. 5 times the interquartile range outside the low and high quartile are considered outliers and not shown. Whiskers extend to the furthest non-outlier point. AT1, 2: alveolar type 1, 2 cells. DC: dendritic cells.
Whiskers extend to the furthest non-outlier point. e, Sankey plot of original labels of cells from the mapped dataset versus predicted annotations based on label transfer. Cells with uncertainty >0. 3 are labeled "unknown". AT1, 2: alveolar type 1, 2 cells. DC: dendritic cells. DC1, 2: DC type 1, 2. EC: endothelial cells. ILCs: innate lymphoid cells. MT: metallothionein. Mφ: macrophages. NK cells: natural killer cells. NKT cells: natural killer T cells. SM: smooth muscle. SMG: submucosal gland. Extended Data Figure 10. Mapping of unseen lung cancer data to the HLCA. a, A UMAP of the jointly embedded HLCA and lung cancer data. Cells from the lung cancer dataset are shown in gray, cells from the HLCA core are shown in blue and plotted on top. b, Same as a, but now plotting cells from the HLCA core in gray.
Whiskers extend to the furthest non-outlier point. f, Sankey plot of original labels of the mapped data versus predicted annotations based on label transfer. Cells with uncertainty >0. 3 are labeled "unknown". g, Percentage of cells from newly mapped healthy lung dataset that are either annotated correctly or incorrectly by label transfer annotation, or annotated as unknown, subdivided by original cell type label. The number of cells in the mapped dataset labeled with each label are shown between brackets after cell type names. Cell type labels not present in the HLCA are boxed. AT1, 2: alveolar type 1, 2 cells. DC: dendritic cells. DC1, 2: DC type 1, 2. EC: endothelial cells. MT: metallothionein. Mφ: macrophages. NK cells: natural killer cells. NKT cells: natural killer T cells. SM: smooth muscle.
SMG: submucosal gland. Extended Data Figure 11. Endothelial cell clustering and marker expression in the joint embedding of unseen lung cancer data and the HLCA core. a, Cell type composition of EC clusters from the joint embedding of the HLCA core and the mapped lung cancer data. Final HLCA core annotations are shown, with cells from the cancer data as well as HLCA core annotations with fewer than 50 cells set to "Other/NA". Clusters are named by their dominant cell type. b, Tissue source composition of EC clusters. Tissue source is either tumor, normal (but from cancer patients), or healthy (from subjects without lung cancer). Normal is split by dataset, including the Krasnow dataset from the HLCA core (with non-tumorous tissue from lung cancer patients) for comparison. c, ACKR1 expression in EC clusters, split by tissue source.
Transferred labels and matching uncertainty for a mapped IPF dataset. a, UMAPs of cells originally labeled as stroma, from a mapped IPF dataset 62 including both healthy and IPF samples. Cells are labeled by annotation transferred from the HLCA core (left), by disease status (middle), and by label transfer uncertainty (right). Cells with labels transferred to fewer than 10 cells were excluded. b, same as a, but showing cells originally labeled as macrophages. c, As b, but now colored by expression of SPP1 and FABP4. Extended Data Figure 17. Calibration of label transfer uncertainty cutoff. ROC curve of label transfer accuracy across 7 datasets. The true and false positive rate of the chosen cutoff point (0. 2), below which transferred labels will be considered low uncertainty, are shown as a red point on the ROC curve.
Funding This work was supported by: The  National Institute of Health   R01HL145372 (JAK/NEB ). The  Fondation pour la Recherche Médicale  ( DEQ20180339158 ), the  Conseil Départemental des Alpes Maritimes  ( 2016-294DGADSH-CV ), the  Inserm   Cross-cutting Scientific Program HuDeCA 2018 ,  ANR SAHARRA  ( ANR-19-CE14-0027 ),  ANR-19-P3IA-0002-3IA , the  National Infrastructure France Génomique  ( ANR-10-INBS-09-03 ),  H2020-SC1-BHC-2018-2020  Discovair (grant agreement  874656 ) and the  Chan Zuckerberg Initiative, LLC Seed Network  grant ( CZF2019-002438 ) "Lung Cell Atlas 1. 0". NIH   1U54HL145608-01. Wellcome  ( WT211276/Z/18/Z  and Sanger core grant  WT206194 );  ESPOD fellowship of EMBL-EBI and Sanger Institute. R01 HL153312 ;  U19 AI135964 ;  P01.
Code availability The HLCA pipeline for processing of sequencing data to count matrices, used for a subset of HLCA datasets (Methods): https://github. com/LungCellAtlas/scRNAseq_pipelines. Code used for HLCA project: https://github. com/LungCellAtlas/HLCA_reproducibility Code for users to map new data to the HLCA core (for automated mapping, see HLCA platforms below): https://github. com/LungCellAtlas/mapping_data_to_the_HLCA HLCA data portals and mapping to the HLCA: Automated mapping to the HLCA and label transfer can be done with scArches  42  at FASTGenomics (https://beta. fastgenomics. org/p/hlca) Automated mapping to the HLCA, and label transfer with Azimuth  14, 42  (not shown in manuscript) can be done at: azimuth. hubmapconsortium. org. Label transfer with CellTypist 72 (not shown in manuscript): https://www.
Data availability The HLCA (raw and normalized counts, integrated embedding, cell type annotations and clinical and technical metadata) is publicly available and can be downloaded via FASTGenomics: https://beta. fastgenomics. org/p/hlca or via cellxgene https://cellxgene. cziscience. com/collections/6f6d381a-7701-4781-935c-db10d30de293 The HLCA core reference model and embedding for local mapping to the HLCA can moreover be found on Zenodo: https://zenodo. org/record/6337966#. Yid5Vi9Q28U. The original, published datasets that were included in the HLCA can be accessed under GEO accession numbers GSE135893, GSE143868, GSE128033, GSE121611, GSE134174, GSE150674, GSE151928, GSE136831, GSE128169, GSE171668, GSE132771, GSE126030, GSE161382, GSE155249, GSE135851, GSE145926, EGA study IDs EGAS00001004082, EGAS00001004344, EGAD00001005064, EGAD00001005065, and under urls https://www.
synapse. org/#!Synapse:syn21041850, https://data. humancellatlas. org/explore/projects/c4077b3c-5c98-4d26-a614-246d12c2e5d7, https://www. ncbi. nlm. nih. gov/projects/gap/cgi-bin/study. cgi?study_id=phs001750. v1. p1, https://www. nupulmonary. org/covid-19-ms2/?ds=full&meta=SampleName, https://figshare. com/articles/dataset/Single-cell_RNA-Seq_of_human_primary_lung_and_bronchial_epithelium_cells/11981034/1, https://covid19. lambrechtslab. org/downloads/Allcells. counts. rds, https://s3. amazonaws. com/dp-lab-datapublic/lung-development-cancer-progression/PATIENT_LUNG_ADENOCARCINOMA_ANNOTATED. h5, https://github. com/theislab/2020_Mayr, https://static-content. springer. com/esm/art%3A10. 1038%2Fs41586-018-0449-8/MediaObjects/41586_2018_449_MOESM4_ESM. zip, http://blueprint. lambrechtslab. org/#/099de49a-cd68-4db1-82c1-cc7acd3c6d14/*/welcome (see also Supplementary Data Table 1).
16. 16 Transferred labels and matching uncertainty for a mapped IPF dataset. a, UMAPs of cells originally labeled as stroma, from a mapped IPF dataset 62 including both healthy and IPF samples. Cells are labeled by annotation transferred from the HLCA core (left), by disease status (middle), and by label transfer uncertainty (right). Cells with labels transferred to fewer than 10 cells were excluded. b, same as a, but showing cells originally labeled as macrophages. c, As b, but now colored by expression of SPP1 and FABP4. Extended Data Figure 17. Calibration of label transfer uncertainty cutoff. ROC curve of label transfer accuracy across 7 datasets. The true and false positive rate of the chosen cutoff point (0. 2), below which transferred labels will be considered low uncertainty, are shown as a red point on the ROC curve.
Hybrid teaching (face-to-face and distance learning) enables students to better prepare and complete their courses. In science, technology, engineering and mathematics, it is important that practical training be an integral part of the curriculum. Laborem project developed at the technological university institute in Bayonne, France, enables undergraduate students to carry out part of their lab experiments in electronics remotely. Started in 2011, Laborem platform was based on proprietary solutions. Since 2017, the platform has migrated to open source software (PyScada) and open source interface box (Laborem Box), which was developed in order to enable the connection of several circuit boards to be studied. These boards, called plugs, are easily interchangeable and enable teachers to quickly adapt the proposed circuits to their course.
The software also provides a simple front panel to adapt the human machine interface that is available for students. Laborem Box consists of a 3D printable box, a power supply board, a set of plugs, and a motherboard that enables students to study the selected plug. In addition, a single board computer is embedded and a hard disk can be used if necessary. This paper is intended to describe the hardware and software design of Laborem platform, and to serve as a guide to explain how to duplicate and deploy this system, primarily dedicated to undergraduate students for learning basic electronics.
Among all remote laboratories and remote experiments listed in  [3] , only a small number use open source software (see table  1 ). However it has been observed that there is a tendency to use low-cost existing material or even open source software to improve standardization and simplicity of use. Many remote education labs use single board computers (SBC), such as the Raspberry Pi, to control their equipment  [8, 9, 10]. This enables for the design of low-cost platforms compared to a workstation or server  [11]. In order to make electrical circuits and to connect several instruments, some still use breadboards  [10]  as we did before 2017, others design their own printed circuit boards (PCB)  [11, 12]. Other laboratories use microcontrollers like Arduino, which can be programmed to acquire and generate electrical signals in order to perform a wide variety of tasks such as lighting, heating, robot control, embedded computing, etc  [10, 11, 12, 13, 14, 15].
The Laborem project developed at the technological university institute (IUT) in Bayonne, France, aims to offer remote electronics practical work via a software and hardware platform that is inexpensive, simple to deploy, open source, and scalable. The first version of Laborem was based on proprietary hardware and software, using National Instruments (NI) solutions including LabVIEW software  [16]  and Elvis Protoboard  [17]. This solution was costly and complex to reproduce. However, it was efficient to test the proof of concept of a remote lab in our classes  [2, 18]. The VISIR project is probably the most famous one enabling to follow distance learning courses in electronics. It is accessible through LabsLand 1  or other platforms (see VISIR SIG 2  for more information). Laborem does not enable the student to build his circuit from scratch like VISIR, but it does enable a teacher to easily propose new circuits.
Overview Since we decided to switch to open source software and, as much as possible, to utilize open source hardware, the Laborem's architecture is centered on the Laborem Box (figure  3 ). The Laborem Box is based on a server, which is here a Raspberry Pi, that hosts the human-machine interface (HMI) accessible through a web page by students and teachers. The HMI is reachable from any device (computer, tablet or smartphone) and any operating system using a modern web browser. The power supply card is designed to provide all the voltage references mainly required for integrated circuits of the platform (switches, multiplexer, operational amplifiers). The motherboard selects the appropriate device under test (DUT) by connecting all the I/O to the plug slot (see section 2. 3). All voltages are always connected to all plug slots.
• Connect specific instruments using BNC and Banana connectors. • Create plugs necessary to study a set of electrical circuit. • Change quickly the plugs to switch easily to other practical works. The instruments currently connected to the Laborem Box use the Standard Commands for Programmable Instrumentation (SCPI) and the Virtual Instrument Software Architecture (VISA) (now managed by the IVI foundation  4  ). Instruments are connected to the Raspberry Pi via GPIB or USB. Any instrument using a protocol managed by PyScada can be used (for example: VISA, Modbus, I2C, OneWire, BACnet, OPC-UA, WebService, Serial). This list is updated over time.
Design files summary Table  2  shows all the files available in our Zenodo repository 5  necessary to build the PCB and the 3D box. • PowerSupplyCard. zip: It contains Kicad source files which enables card modifications as well as Gerber files which enables the manufacturing of the card. • 3DBox. zip: It contains Solidworks files which enables the modification of the box as well as STL files which enables the manufacturing of the box. • Motherboard. zip: It contains Kicad source files to modify the board and Gerber files to build the board. • Plugs. zip: It contains Kicad source files to modify the board and Gerber files to build the board.
Deploying A SBC such as a Raspberry Pi or any computer with a GPIO additional card can be used. A software named PyScada, for Python and SCADA (Supervisory Control And Data Acquisition) is currently used. The purpose of this software is to receive data from different sensors or instruments and control them via a simple web page. PyScada does not require any plugin to be accessible from a modern browser. Alerts and scripts make the system interactive and smart. An administration panel enables the system to be configured in order to build the user panel for students by inserting text, values, buttons, forms, graphics, images, and live videos. The software runs under Linux distribution Debian and its derivatives (to install Raspi OS on a Raspberry Pi see  [22] ). Currently, PyScada has not been tested on Mac OS nor Windows.
However, as it is written in Python, HTML, Javascript and CSS, it is easily portable to other operating systems. To install PyScada and Laborem, one can use an automatic installation script. To do this, the protocol given below has to be followed: • Connect to the Raspberry Pi with ssh 7. • Download the installation script: wget h t t p s : / / raw. g i t h u b u s e r c o n t e n t. com/ c l a v a y /PyScada-Laborem/ master / e x t r a s / i n s t a l l. sh -O i n s t a l l. sh sudo chmod a+x i n s t a l l. sh sudo. / i n s t a l l. sh.
• During the installation script: -Specify whether the Raspberry Pi uses a proxy to access the Internet. -Choose to install PyScada from the clavay fork -Choose to install PyScada-Laborem, PyScada-GPIO, and PyScada-Scripting -You will need to enter the root password of the Raspberry Pi ('raspberry' by default) -You will create the first PyScada user ('pyscada' by default) • Install the database: -Download laboremDB. json from Zenodo repository  8. -sudo -u pyscada python3 /var/www/pyscada/PyScadaServer/manage. py loaddata laboremDB. json.
Connect to the interface To use the hardware, the easiest solution is to use the software we developed. You need a web access to the Raspberry Pi (through an ethernet or wifi network, for example see  [23] ). • Connect to http://raspberryPi IP address/ • Use the credentials you enter during the installation of PyScada. • Add your user in the teacher group: -click on your username (see figure  15 ) -click on "Admin" -click on "User" and find your username -in the group list add "teacher" -save changes.
Administration interface The administration interface is accessible to users defined as "staff". By default, the user "pyscada" is staff and can add other members. The user password of this user is defined during the installation (see section 5. 5). The administrator interface enables access to the whole configuration of PyScada: • edit student and teacher HMI (PyScada HMI section) • edit scripts handling the experiments (PyScada Scripting section) • modify instruments connected to the motherboard (PyScada Core section) • modify the courses studied and the subsequent list of plugs that appears on the student interface (PyScada Laborem section) • edit set of questions asked and the student's answers (PyScada Laborem section). To connect to the administration interface with an account that has access rights, click on your username at the top right of the navigation bar (figure  15 ) and then on "Admin".