dataesr/scientific-paragraphs-categorization huggingface dataset:
Detailed description of these two approaches and instructions on how perform them can be found in an accompanying protocol  [15]  BACMMAN was designed to also work on datasets other than MV and µMA. In order to facilitate the adaptation of BACMMAN algorithms to data from other labs, we developed specific test procedures allowing easy parameter optimization for all the different steps of preprocessing, segmentation and tracking. We also created a detailed documentation for the different algorithms and functions of BACMMAN that is displayed as pop-ups and in a specific help panel on the graphical interface. In addition, the highly modular structure of BACMMAN makes it very versatile, as new modules can be developed and easily plugged-in. It is a Javabased software compatible with Linux, Windows and Mac OS and very easily installed through Fiji  [16].
Overview of the protocol Here we present the software and give a precise protocol to install and run it. In order to help the user discover the software and all its functionalities we have made available two small datasets of typical MV and µMA data  [13]. The users can first install and run BACMMAN on these examples (steps 1A and 1B) before using their own data. During image analysis with BACMMAN, numerous transformations are applied to the input images. All these transformations can be set and configured in BACMMAN, which generates a specific configuration file. In steps 1A or 1B, the configuration file is provided with the images and can be used without modifications. In contrast, when using their own data users may have to optimize the configuration, as illustrated in step 1C. In a more advanced procedure, the user can also completely configure the image analysis de novo, as illustrated in step 1D.
Nevertheless simple configuration changes such as described in step 1C should most of the time be sufficient to analyze experiments similar to those presented in Robert el al. [12]. For all the procedures, approximate timing is indicated, corresponding to the time it takes for an experienced user. More time may be required when using BACMMAN for the first time. In particular, learning how to adapt the configuration to a new dataset can take several hours to several days, depending on the dataset and on the user's image analysis skills.
Analysis pipeline For BACMMAN, input data is required that consists of a time-series of multichannel 2D or 3D (z-stack) images of several microscopy view-fields or "positions" (a glossary of the specific terms used in BACMMAN is provided in supplementary table  S2 ). From the images, BACMMAN allows detection of several classes of objects, such as the microchannels in which the cells grow, the bacteria or the fluorescently-labeled DNA replication errors. The user defines the channels in which the objects have to be detected, namely bright-field or fluorescence channels, and the specific processing pipeline that should be applied to each object class. For an example of this consider dataset 1 provided here (see EQUIPMENT). This dataset consists of time-series of phase-contrast images. It requires the definition of two object classes, microchannels and bacteria, which are detected in the same channel (bright-field) and processed through different pipelines.
The first step of the analysis pipeline, namely the pre-processing, includes a procedure to remove banding noise from the fluorescence images and a rotation which can eventually be combined with a flipping transformation to align the microchannels along the y-axis with their closed-end at the top. Images are cropped to avoid storing useless data. The next analysis step, i. e. processing, consists of pre-filtering, segmentation and tracking, and post-filtering. Details of the algorithms used for the example datasets are provided in Supplementary Notes (section Image Analysis) and Supplementary Figures  1 2 3. The result of the processing step consists of segmented objects connected through their lineage information. Following image processing, measurements are computed and extracted as tabular data, in a format that is classically used in statistical analysis software such as pandas (Python) or R.
For result visualization and editing, BACMMAN generates kymographs where images from successive frames are displayed next to one another, as shown in Figure  2. Kymographs are navigable using shortcuts (see step 2A), and they are interactive, i. e. displayed segmented objects can be selected and the relevant information is then displayed next to the object. Kymographs allow easy manual editing of segmentation and tracking (See step 2C), thanks to a number of implemented functions that can delete, split or merge existing objects, create new objects and create or delete tracking links between objects. When the quality of the images is good enough our processing algorithms produce few segmentation and tracking errors (see "Performance and comparison with other methods" for statistics). Visualizing the whole dataset to correct such rare segmentation or tracking errors can be very inefficient and time-consuming for high-throughput experiments.
We therefore implemented the possibility to detect subset of objects with specific characteristics, i. e. "selections", through the analysis of measurements using software such as R or pandas. These selections are then simply imported in BACMMAN and displayed on kymographs for visualization and editing. Examples of scripts to create selections are provided with our software (See EQUIPMENT). In order to illustrate the benefit of using selections, consider our work in Robert et al. 2018  [12] , where rare slowly growing cells strongly affect the results. Using R, we created a selection corresponding to slowly growing cells, displayed this selection on kymographs in BACMMAN for visual inspection, and corrected any segmentation or tracking error. Selections can thus be used to ensure error-free processing for a particularly interesting subset of the data.
They can also be used to detect cells with abnormal characteristics that are likely to correspond to segmentation or tracking errors. They can therefore reduce by several orders of magnitude the time required for manual editing. More generally, selections are a useful tool to facilitate the understanding of specific behaviour observed in rare cells, which can be selected and visualized easily. Applications of the software BACMMAN was initially developed to process data from µMA and MV experiments, as described in Robert et al. 2018  [12]. More specifically, it was designed to allow segmentation and tracking of E. coli cells growing inside the microchannels of the mother machine, imaged either in phase-contrast or in fluorescence, as well as segmentation and tracking of intracellular fluorescent spots corresponding to non-repaired DNA replication errors, i.
The requirements for input images are detailed in the EQUIPMENT part of the Materials section. BACMMAN has a modular design. Importantly, this modularity makes it very versatile and allows the easy development of new processing pipelines for other related applications, through the creation and insertion of new modules. The modules of the present BACMMAN version are optimized for µMA and MV experiments, such as provided in the datasets 1 and 2  [13] , but can be combined and configured to adapt the processing to other types of experiments, as illustrated in steps 1C and 1D. In order to test the applicability of BACMMAN to other datasets, we collected datasets from six other labs (including the publicly available datasets provided with MoMA and Molyso software). We were able to analyze these datasets by only changing a few parameters in the configurations provided with our datasets 1 and 2  [13].
Most of the modifications corresponded to the input image format, the size of the microchannels, and for fluorescent bacteria, the dynamic range of the signal (the corresponding modification is described in step 1C). In the case of the Molyso dataset, modifications were made at the cropping step of the pre-processing in order to remove a signal located at the closed-end of microchannels that was perturbing microchannel detection. Notably, the processing pipeline for segmentation and tracking of bacteria used in dataset 1  [13]  could be used on this dataset without any modification. In the case of the MoMA dataset, the aspect of the bacteria differs significantly from our images, which we used to develop the segmentation algorithm Consequently we had to make more changes in the configuration to analyze the MoMA dataset, but we could still obtain satisfying results (no errors made on the whole dataset) without developing any new modules.
A tutorial describing how to adapt the configuration to those two datasets can be found on BACMMAN's wiki (github. com/jeanollion/bacmman/wiki). Importantly, we implemented specific test procedures in BACMMAN to facilitate the configuration, which are explained in step 1D. More specifically, all pre-processing and processing modules can be tested independently on a chosen subset of the data. The results of relevant intermediate steps are displayed to help tuning the parameters. Moreover, new modules can be developed and easily plugged-in in order to extend the range of applications, for instance to analyze experiments with other cell types and/or other microfluidic chips with different microchannel geometry. For instance, a modification of the mother machine where the microchannels have two open ends  [18]  would only require a new tracking algorithm, all other modules can be used, including the segmentation module.
Performance and Comparison with other software Many software have been developed to analyze the 2D growth of cells, such as the growth of bacterial microcolonies on agarose pads  [19] -  [21]. However, it is hard to adapt them to obtain a fast and efficient analysis of cells growing in the mother machine. Only two software are specifically dedicated to mother machine data analysis, named MoMA and molyso  [11] ,  [22]. MoMA and molyso perform 1D-segmentation of bacteria along the microchannel axis. However, when the width of the bacterial cells is smaller than the width of the microchannels, the cells can be inclined and two poles of adjacent bacteria can overlap along the microchannel axis, as illustrated in Figure  4a  (black arrow). In this case, the 1D-segmentation strategy can lead to many segmentation errors and bias the cell size measurements.
MoMA, but not molyso, allows manual editing of segmentation and lineages, but it does not include the possibility of selecting a subset of data to be edited or visualized based on object measurements. Our software is the only one to offer such a coupling between statistical analysis of the data and image visualization and processing editing. Moreover, correcting errors in BACMMAN is very fast as it is done directly on interactive kymographs using shortcuts (for dataset 1  [13] , correction of the 30 errors takes approximately 2 min). MoMA and molyso have limited extensibility and only perform segmentation and tracking of bacteria in phase-contrast images, whereas BACMMAN also performs segmentation and tracking of fluorescent spots within bacteria. BACMMAN can also perform segmentation and tracking of bacteria in fluorescent images, using an algorithm that is very robust to cell-to-cell variability in fluorescence level as exemplified in dataset 3  [13]  In order to assess the performance of our cell segmentation algorithms, we first followed an approach similar to the one used by Kaiser et al.
[11]. More specifically, we estimated the precision of our cell size measurement by analyzing the growth of single cells. Cell growth is exponential and measurement errors can therefore be estimated from the residual errors in the regression of the log-size versus time (see Supplementary Notes, section Precision of cell size measurement). As shown in figure  4b , the relative error in cell length is independent of cell length and is around 1-2% for both phase-contrast and fluorescence images. This analysis allows comparison of BACMMAN with the recently developed software MoMA, for which 2-3% relative error was estimated using this method. Although this analysis should reveal the segmentation errors that are made independently at different frames, it may not reveal a systematic bias. Therefore, we performed another analysis, comparing the results of segmentation performed either on phase contrast or on fluorescence images.
Our tracking algorithm is able to correct some segmentation errors and thus the overall procedure generates very few errors when the quality of images is good enough. For dataset 1  [13] , no errors are made in more than 99. 8% of the 10418 generations, with most errors clustered when cells exhibit transient morphological abnormalities. It took 11 minutes to an experienced user to visualize and correct the whole dataset. In dataset 2  [13] , no errors were made in more than 99. 9% of the 931 generations and visualization and editing took about 3 minutes.
Data files: The format of input images should be supported by BioFormats (openmicroscopy. org/bio-formats/) (such as. nd2,. tiff,. dv etc. ). BACMMAN can use either a single file containing all the images, or multiple files, with each file containing either the information for one channel and one position, or the information for one channel, one position and one frame. For a demonstration of BACMMAN's different procedures, three different datasets, associated configuration files and analysis scripts are available at: github. com/jeanollion/bacmman/wiki/Example-Datasets [13]. All files should be unzipped. • Dataset 1 can be used to test step 1A. It consists of a time-series of 985 images corresponding to one position (field of view) imaged through one channel (bright-field). • Dataset 2 can be used to test steps 1B and 2C.
It consists of a time series of 500 images, corresponding to one position and 2 fluorescence channels. • Dataset 3 can be used to test step 1C. It consists of a time-series of 556 images, corresponding to one position and one fluorescence channel. Computer equipment: Any Mac, Linux or Windows computer with a 64-bit version of the operating system should be able to run our software. The amount of random access memory (RAM) allocated to Fiji/Java has to be large enough to load the images corresponding to a whole position converted in 32-bit float. For the dataset 1, one position corresponds to 2. 2 Gb in 16-bit thus the RAM should be at least 4. 4Gb. Run in headless mode: TIMING 2-15 min 1. Generate tasks from the Home tab of the GUI by opening a dataset, selecting positions, object classes and tasks to run and right-clicking in the Tasks to execute panel and choosing Add current task to task list.
Repeat step 1 with other tasks if necessary 3. Save the tasks list to a file by right-clicking in the Tasks to execute panel and choosing Save to file to save all tasks in a single file in order to run them successively. Alternatively, you can choose Split and Save to files in order to generate several files, each one containing all the tasks of a given position. This allows to run them in parallel because they are independent. 4. Run the tasks in headless mode: after installing as a stand-alone application (see above), run the following command from bacmman-headless/target directory: (replace <VERSION> by the actual version and <taskfile. json> by the path to a. json task file generated in 3): java -cp dependency/*:bacmman-headless-<VERSION>. jar bacmman. ui. ProcessTasks <taskfile. json> Procedures 1) Follow option 1A to analyse a phase contrast mother-machine time-lapse experiment; follow option 1B to analyse a mother-machine time-lapse experiment with fluorescent cells and intracellular spots; follow option 1C to modify an existing configuration in order to analyse a dataset similar to datasets 1 or 2; follow option 1D to create a configuration de novo in order to analyse a dataset that differs substantially from the provided example datasets.
1A. Analysis of a phase contrast mother-machine time-lapse experiment TIMING 2-5 min for i-iii ; 15-20 min for iv-viii ; 10-15 min for ix-xvi. (i) Create a dataset and import images. Start BACMMAN (see EQUIPMENT SETUP). First create an empty folder. To define this folder as working directory for BACMMAN, click on the Home tab, then right-click on the working directory field and choose the empty folder or enter its path manually. CRITICAL STEP The working directory is the folder that will contain subfolders corresponding to the different datasets to be analyzed. All these subfolders will be listed in the Datasets list. (ii) From the Dataset menu choose New dataset from template, select the configuration file ending with "_dataset1. json" (see EQUIPMENT) that corresponds to dataset 1 and enter "dataset1" as name of the dataset.
The name of the dataset appears in the list. CRITICAL STEP Creating a new dataset results in the creation of a folder with the same name located in the path defined in 1A(i). In this folder all data related to this new dataset will be stored (the configuration file, pre-processed images, segmentation and lineage results, and measurements). If you quit BACMMAN, at next BACMMAN startup, this dataset will not be opened automatically again. To access the dataset at next startup, select this dataset it the Datasets list and choose Open Dataset from the Dataset menu. (iii) From the Run menu choose Import/re-link Images and select the input folder (here the folder containing the images of dataset 1). A new position will appear in the Positions list. TROUBLESHOOTING CRITICAL STEP When images are imported, their path is automatically saved in the.
(iv) Run image processing steps. (iv) Run image processing steps. Follow steps 1A(iv)-(vi). Some segmentation and tracking errors can be seen in particular in the microchannels #3 track. (v) Edit configuration. In the dataset 3, the fluorescence exhibits a much higher average level and a much higher cell-to-cell variability compared to the dataset 2. In consequence, image processing has to be adapted to improve segmentation of bacteria. In the To add or remove objects from this selection, select them on a kymograph, right-click on the selection and choose add or remove objects. The number of objects in the selection and the index of their object class is indicated next to the selection name. CRITICAL STEP: Addition or removal of elements are accessible through shortcuts and will be performed only on selections set as active.
Create Track Creates new track(s) starting from selected object(s) CRITICAL STEP: When running the split or segment algorithms, a delay of a few seconds may occur for some processing pipelines. CRITICAL STEP: All modifications are automatically stored in the database, and are displayed on the image as additional arrows on links or pointing modified objects. CRITICAL STEP: Editing segmentation usually breaks the lineage. So after editing segmentation, also edit the lineage of the modified objects. Additionally, when editing segmentation of microchannels, processing of bacteria and spots should be re-run. Likewise, when editing segmentation of bacteria, processing of spots should be re-run. CRITICAL STEP: When an object "A" is linked to two objects "B" and "C" in a following frame, if the link between A and B is removed, the tracks of A and C are merged.
Anticipated Results BACMMAN offers a solution for fast and reliable analysis of high-throughput data from videomicroscopy experiments where bacteria grow in the mother machine microfluidic chip. It can be used to follow cells in phase contrast or in fluorescence, to quantify single cell fluorescence as well as to detect and follow intracellular fluorescent spots. Therefore it should be useful to study many biological processes. After analysis with BACMMAN, pre-processed images are saved and can be stored in place of the raw images for a gain of space. BACMMAN can perform several user-defined measurements related to cell morphology, growth or fluorescence intensity and to intracellular fluorescent spot characteristics. The principal measurements are listed in Supplementary table  S1. BACMMAN allows an easy interplay between data analysis with R or Python and image analysis, facilitating the study of cell subpopulations.
A cell or a spot can therefore be easily followed through time, with all its measurements, such as size, or fluorescence intensity. The tables contain also a code indicating the position of the cells in the lineage. Therefore cell measurements can be followed along a specific cell lineage, such as the "old pole" lineage where always the mother cell, abutting the channel's dead end, is followed at division. The different measurements can also be studied separately for each microchannel. Therefore the results obtained with BACMMAN allows all kind of analyses, with several measurements that can be followed on different subsets of objects. Some examples of analysis and a description of the different variables in the tables can be found in the R script provided with dataset1.
Interfaces are sorted according to SC value and merged successively if the value is under a predefined threshold, called Split threshold. Importantly this threshold should be calibrated for each new experimental setup. iii) Procedure i) does not allow a good detection of cell contours near the boundary between two cells. To do so, a threshold Tcontour is computed for each cell based on the pixel intensity distribution within the cell. Tcontour is defined as Tcontour = mθ * IQ , where m is the median of the distribution, IQ is its interquartile and θ is a threshold we set to 1. 25 for our example datasets. Each pixel of the cell contour is eliminated if its intensity is smaller than Tcontour. In this case, the same procedure is applied to the neighboring pixels, until all pixels in the contour have an intensity higher than Tcontour (figure  S1H ).
Select one position in the Position list. From the Tasks list select Pre-Processing and from the Run menu choose Run Selected Tasks. TROUBLESHOOTING CRITICAL STEP In this step and (v)-(viii) we detail the different processing steps one by one. All these steps can be run at once by selecting Preprocessing, Segment and Track, Measurements, Extract Measurements in the Tasks list, all the objects in the Objects list and all the positions in the Positions list. See Batch processing box for processing in command line mode. CRITICAL STEP Pre-processed images are stored in the Output folder of the dataset folder, they can be visualized by right-clicking on the position in thePositions list and by choosing Open PreProcessed Images. CRITICAL STEP Before performing pre-processing, you can test it by running it on a smaller subset of data.
For this see step 1D(xiii). (v) Select in the Objects list the Microchannels object class and in the Tasks list Segment and Track. From the Run menu choose Run Selected Tasks. When processing several object classes separately, such as proposed in steps (v) and (vi), one should always respect their order as given in the Objects list, because the processing for one object class can depend on the previous ones (e. g always process "Microchannels" before "Bacteria"). CRITICAL STEP: Processing can also be run for bacteria in a single microchannel by selecting and right-clicking on the microchannel in the Segmentation & Tracking Results panel of the Data Browsing tab and choosing Run segmentation and tracking>Bacteria. : a tutorial describing how to adapt an existing configuration to datasets from other labs is available on BACMMAN's wiki (Run menu choose Import/re-link Images and select the folder containing images of dataset 3.