A Fully Automated Robot for the Preparation of Fungal Samples for FTIR Spectroscopy Using Deep Learning

Manual preparation of fungal samples for Fourier Transform Infrared (FTIR) spectroscopy involves sample washing, homogenization, concentration and spotting, which requires time-consuming and repetitive operations, making it unsuitable for screening studies. This paper presents the design and development of a fully automated robot for the preparation of fungal samples for FTIR spectroscopy. The whole system was constructed based on a previously-developed ultrasonication robot module, by adding a newly-designed centrifuge module and a newly-developed liquid handling module. The liquid handling module consists of a high accuracy electric pipette for spotting and a low accuracy syringe pump for sample washing and concentration. A dual robotic arm system with a gripper connects all of the hardware components. Furthermore, a camera on the liquid handling module uses deep learning to identify the labware settings, which includes the number and positions of well plates and pipette tips. Machine vision on the ultrasonication robot module can detect the sample wells and return the locations to the liquid handling module, which makes the system hand-free for users. Tight integration of all the modules enables the robot to process up to two 96-well microtiter (MTP) plates of samples simultaneously. Performance evaluation shows the deep learning based approach can detect four classes of labware with high average precision, from 0.93 to 1.0. In addition, tests of all procedures show that the robot is able to provide homogeneous sample spots for FTIR spectroscopy with high positional accuracy and spot coverage rate.


I. INTRODUCTION
Characterization, identification and classification of microorganisms (bacteria, yeast, filamentous fungi and algae) has a high importance in the field of environmental, industrial, medical and agriculture microbiology, and microbial ecology [1].There are two principle ways to characterize, identify and classify microorganisms -by using Genotyping and/or Phenotyping technologies.Genotyping technologies are based on PCR/sequence typing and genome typing approaches, have gone through tremendous developments in the last decade.This has resulted in Next Generation Sequencing (NGS) and CRISPR/Cas9 technologies allowing highly precise and robust analysis of DNA and its The associate editor coordinating the review of this manuscript and approving it for publication was Omid Kavehei.
products [2].As the application of genotyping technologies reached into new levels of development, academic, biotechnological and clinical diagnostics laboratories had to address the logistics of consistently running the high-throughput operations -DNA extraction, shearing, cleanup, amplification, and sequencing.Considerable progress has been made on automating these individual elements.Automated, high-throughput DNA extraction and sequencing was implemented in multiple core sequencing laboratories soon after NGS was established [3].As an example, bacterial genotyping was automated in some laboratories soon thereafter [4]- [6].
While genotyping technologies have been advancing rapidly and through the integration of robotics, phenotyping technologies have been for a long time represented by the conventional microbiological techniques providing morphological, physiological and cultural characteristics.Commonly employed phenotypic methods are protein-based methods including biotyping, serotyping, bacteriocin typing, phage typing, antimicrobial susceptibility patterns etc.These phenotypic methods are associated with several problems related to reproducibility, discriminatory power, high variability etc.Such shortcomings of phenotypically based methods have therefore led to the development of novel so called Next Generation Phenotyping (NGP) technologies, represented by two biophysical non-invasive techniques -Fourier Transform Infrared (FTIR) spectroscopy [7] and Matrix-Assisted Laser Desorption/Ionization Time-off-Flight (MALDI-TOF) spectrometry (MS) [8].Both techniques provide, with a high level of precision, a cellular biochemical phenotype of microbial cells -MALDI-TOF MS provides protein profile while FTIR provides total biochemical profile (proteins, lipids, polysaccharides).In addition, it has to be noted that FTIR provides not only cellular phenotype in the form of intracellular metabolites, but also extracellular phenotype in the form of extracellular metabolites.Both techniques are based on the high-throughput platform with the potential for analyzing up to 159 -384 samples in a single analytical run.
Manual preparation of multi-well fungal samples for FTIR involves sample washing to remove culture medium, homogenization by ultrasound, up concentration for FTIR and spotting on the multi-well infrared (IR) plates.In case of high-throughput set-up fungi are cultivated in 96-well MTP plates and the whole process for manual preparation of a 96 microbial samples may take more than 10 hours depending on the type of fungi and technician experiences.The whole process also requires highly skilled technicians to oversee the process [9], especially for sample homogenization and spotting.In addition, manual operation may introduce variation to the samples due to the subjective nature of visual inspection [10].In order to explore the high-throughput potential of the FTIR techniques, there is a strong need for the implementation of liquid-handling robotics for the sample preparation procedures.
In the laboratory automation field, a number of platforms have been developed to automate the sample preparation procedures.Meier et al. [11] presented an automatic sampling spotting method using a commercially available synthetic robot to prepare samples for MALDI-TOF MS.Nejatimoharrami et al. [12] developed a liquid-handling robot based on a 3D printer for placing droplets (spotting).The system used a camera to monitor the droplet size and position.Kwee et al. [10] described a robotic platform that used a vision system to identify cells and control a robotic arm to pick and place the selected cells for cell-based assays.Cherezov et al. [13] showed a dual-arm system that used one arm for pick-up and placement of precipitant solutions and the other arm equipped with a microsyringe for sample dispensing.
Our previous work [14] attempted to build a robotic platform for all the procedures of sample preparation for FTIR spectroscopy.The system simply used a robotic arm consisting of two linear motion units for manipulation of sampling washing, homogenization and spotting without closed-loop control strategies for monitoring or automated control.The open-loop feature, however, resulted in insufficient or excessive ultrasonication and, more important, might not always provide well-homogenized samples [9].Also, due to the low accuracy of the dispensing unit, the spotting process did not provide reliable sample spots.Moreover, the washing and spotting used the sample dispensing unit that may introduce contamination.As a result of these limitations, we developed a closed-loop control system based on a lowcost 3D printer for sample homogenization using ultrasonication [9].The robot used machine vision to distinguish between sample wells and blank wells and measure the homogeneity level of cell suspension.The control system enabled the robot to provide the desired homogeneity level of cell suspension efficiently.In this paper, we present the design, development and integration of a complete system to prepare fungal samples for FTIR spectroscopy.The whole system is an extension to the ultrasonication robot [9], by adding a newly-designed centrifuge module and a newly-developed liquid handling module.
While deep learning as an emerging technology has been widely used for many applications ranging from vehicle classification [15] to fruit detection [16] or drug design [17], few studies have reported the applications in laboratory automation, especially for the labware identification.In this paper, we show the method and results of using deep learning based vision system to identify the labware settings, including the number and location of MTP plates, IR plates and pipette tips.This technique has been successfully integrated into the robotic system forming a fully automated robot.
The proposed system was validated by the preparation of filamentous fungi but might also be applicable to other types of microorganisms, such as yeasts, bacteria, and algae.Also, the developed system was used for the preparation of samples for FTIR spectroscopy, but might also be useful for MALDI-TOF spectrometry with a different working sequence.

II. SYSTEM DEVELOPMENT A. SYSTEM OVERVIEW
To enable the robot to perform different tasks independently, such as sample homogenization, sample spotting, washing and concentration, we used the concept of modular design for the system development.As shown in Fig. 1, the developed platform is an integration of three modules, namely ultrasonication robot module, centrifuge module and liquid handling module.Each module is able to be operated independently and they can also form a complete system for the full process preparation of fungal samples for FTIR spectroscopy.The machine vision system enables the full automation of the robot without any manually pre-input information.Specifically, the camera on the liquid handling module uses deep learning to identify the labware information, for example detecting the number and positions of well plates and pipette tips.The machine vision system on the ultrasonication robot module can distinguish between the sample wells and black wells and also monitor the homogenization process of each well, thus ensuring that the robot can provide the desired homogeneous samples [9].The left arm (Arm 1) of the Cartesian-type dual robotic arm system (Cavro Omni Robot; TECAN, Switzerland) connects all of the hardware modules.The gripper attached to the Arm 1 picks and places the 96-well MTP plates (CR1496; EnzyScreen, Netherlands) between the three modules.

B. ULTRASONICATION ROBOT MODULE
Ultrasonication robot module is used to homogenize filamentous fungal mycelia to get homogeneous cell suspension for sample spotting on 384-well IR plates (Bruker Optik GmbH, Germany).In the previous work, we introduced an ultrasonication robot that can provide desired homogeneity of filamentous fungal cell suspension [9].The robot uses machine vision to screen sample wells and measure the level of fungi homogeneity.In this work, as shown in Fig. 1 and Fig. 7, the ultrasonication robot module was integrated into the sample preparation system for FTIR spectroscopy without hardware modifications.In order to integrate with the other modules, the controller of the ultrasonication robot module (Raspberry Pi 3) was installed with an open-source system Ubuntu MATE to run the software under the Robot Operating System (ROS) architecture.A new ROS node in the Pi controller communicates with the main controller via Ethernet network to call the previously developed functions.In the meanwhile, this node also listens to the buttons on the user interface of the ultrasonication robot so that the robot module can still work independently.The ultrasonication robot module is able to detect the sample well locations [9], so after each homogenization, the robot sends the sample well locations to the main controller for sample spotting.

C. CENTRIFUGE MODULE
Fig. 2 shows the design of the centrifuge module.The module is 400 mm long, 400 mm wide and 390 mm high.The centrifuge was constructed from 6 aluminum panels to which other components were mounted.The centrifuge mainly consists of 6 panels, a servo motor to drive a rotor that was mounted with 2 MTP plate holders and a sliding door mechanism.The centrifuge rotor is driven by an 800 W servo motor (PR-802.8;Servotronix, Israel) with a maximum speed of 5000 rpm.The servo motor is controlled by a servo drive (CDHD; Servotronix, Israel), which communicates to the main controller based on CANopen motion control protocol via a CANbus to USB converter (PCAN-USB; Peak-system, Germany).The sliding door mechanism comprises a sliding door that was attached to a linear motion rail and driven by a DC motor, a sliding door locker and 2 limit switches.The sliding door was designed to open or close when the robot manipulator picks and places the MTP plates.The sliding door stops at fixed positions in ''open'' or ''closed'' configurations using the two limit switches.For safety and health reasons, the sliding locker will automatically lock the sliding door in the closed configuration when centrifugation is in operation.The DC motor is controlled by an additional microcontroller, which will be described in Section III.The designed centrifuge module has a capacity for centrifugation for two MTP plates.It is specifically designed to be integrated into the robotic platform and uses a CANbus communication interface to allow the robot control the rotor.

D. LIQUID HANDLING MODULE
As shown in Fig. 1, the liquid handling module comprises the right arm (Arm 2) of the dual-arm system, an 8-channel syringe pump (Cavro XMP 6000; TECAN, Switzerland), an electronic pipette (P50; Opentrons, USA), an RGB camera (See3CAM_CU135; e-co systems, USA), a custom-made wash station and a well plate shaker (MicroPlate Genie; Scientific Industries, USA).The main function of the liquid handling module is to provide sample washing, concentration and spotting, in which the sample washing and concentration procedures involve centrifuge module.
Sample washing and concentration require aspiration and dispensing of high volume liquid (we use 800 µL) with relative low accuracy, whereas sample spotting on IR plates needs to take a small volume (10 µL) on each spot with high accuracy.Based on our test, the syringe pump did not meet the requirements of sample spotting in terms of accuracy.Therefore, we used the syringe pump (maximum volume 800 µL for each channel) for sample washing and concentration, and the electronic pipette (maximum volume 50 µL) for sample spotting.Both the syringe tips and the pipette were mounted on Arm 2. To enable them to work without collisions, a servo (HS-5645MG; Hitec, South Korea) was used to rotate the syringe tips to either vertical or horizontal to the ground.When used for sample washing and concentration, the syringe tips are vertical to the ground, while for spotting, the syringe tips move to the horizontal position to give the space for the pipette.

1) SAMPLE WASHING AND CONCENTRATION
Sample washing includes centrifugation, liquid aspiration and dispensing.After centrifugation, the fungal mycelia formed one or more pellets at the bottom of the wells of the MTP plate, and the syringe tips aspirated the supernatant above the mycelia (800 µL).Thereafter, the wells were filled with the same amount of deionized water as the aspirated supernatant.The wash station consists of two sinks, one for wastewater and the other one for fresh water, connecting to a peristaltic pump (WPL 810; Williamson, UK) and a wastewater container, respectively.Sample concentration was performed after ultrasonication to increase the concentration of homogenized samples for spotting, which contains centrifugation and liquid aspiration.In our case, ultrasonication requires at least 800 µL of liquid for the selected well plate, whereas the FTIR spectroscopy needs enough density of samples for measurement.Therefore, we used the centrifuge to separate fungal mycelia (pellets) and supernatant at first and then removed some above supernatant (600 µL) to increase the sample concentration.
During the aspiration in the sample washing stage, the syringe tips were easily blocked by the fungal mycelia in the previous system [14].To solve this problem, we designed a filter attached to the end of the syringe tip, which can prevent the fungal mycelia from entering the syringe tips.As shown in Fig. 3, the filter has a 90-degree surface that can be inserted into the square well.The smooth, spherical outer surface pushes the fungal mycelia to the outer space.During aspiration, the sample liquid passes through the grooves on the edge of the filter to the sonicator probe.To avoid blockage on the filter, the filtering grooves were placed on the edge instead of having holes inside of the filter.The filter was 3D printed using polylactic acid (PLA) filaments (MP05780; MakerBot, USA) and glued to the sonicator probe.

2) SAMPLE SPOTTING
Sample spotting was conducted after the sample concentration, which is the final step for FTIR sample preparation.As shown in Fig. 5e,f, we define the droplet on the IR plate as spot.The main task of spotting is to dispense homogenized cell suspension on the black wells of IR plates, in which the system should guarantee that the sizes and locations of the dispensed spots are close to the well limit circle on the IR plates.Fig. 5a shows the labware and the liquid handling module.As shown in Fig. 4, after concentration, the robot fist picks up the MTP plate to the shaker to decrease sediments (Fig. 5b).Thereafter, the system received the tip locations and sample well locations from the vision system droplet and the ultrasonication robot module, respectively.This procedure is an integration of the vision system, ultrasonication robot module and the liquid handling module, which can ensure that the system only picks up or processes the locations with tips or wells with samples and skips blank tip location or wells.After that, Arm 2 changed to spotting mode, which means the servo rotated the syringe tips to horizontal place and gave the space for pipette to pick up the tips (Fig. 5c).
Before spotting on the IR plate, the system first aspirated 10 µL sample liquid at the bottom of the well and dispensed it to the wastewater sink of the wash station (Fig. 5d).This is because that the bottom of the well may contain some undisrupted pieces of fungal mycelia that may result in blockage and failure spotting.Next, the pipette aspirated 30 µL cell suspension and dispensed 10 µL on each IR plate well in the form of three spots -three technical replicates (Fig. 5e).To avoid the droplets mixing together, the robot skipped a well between every two droplets.To protect the IR plate, non-contact dispensing method was utilized, so the pipette dispensed liquid with a short distance above the IR plate.Once the size of the droplet was big enough, the droplet dropped on the IR plate.During spotting, the pipette had a circular motion inside of the well limit circle (Fig. 5f).The circular motion can provide homogeneous distribution of the sample on the spot of the IR plate.In addition, the circular motion increases the spot coverage rate on the target well.Due to the positional error, the pipette tip is unable to position at the center of the target well every time.There may be some blank regions between the initial spot and the well limit circle.While the well limit circle can prevent the droplet from spreading outside of the well area to some extent, the circular motion of the tip can increase the coverage area of the droplet on the blank regions obtaining the final spot.For spotting of every 10 wells, the robot picks up the MTP plate to the shaker to decrease the sediments.

E. VISION SYSTEM -AUTOMATIC DETECTION OF LABWARE USING DEEP LEARNING
Traditional laboratory robots highly rely on manual input for labware information, for example, inputting the well plate number and locations, tip number and locations.This limits the full automation of laboratory robots.The main challenge is that when using traditional image processing techniques, it is hard to segment and identify the labware, especially for the transparent and small objects, such as the pipette tips.We introduce to use a convolutional neural network (CNN) model namely YOLOv3 [18] for the identification of labware based on the online images captured by the camera on Arm 2. The labware in the robot system includes the 96-well MTP plates, 384-well IR plates and pipette tips.Therefore, the first training attempt was to use these labware as three object classes.We collected a 261 image dataset using the camera on the robot with different angles of views.The dataset contains 287 MTP plates, 255 IR plates and 672 tips.The images were annotated using Lableme software [19].The training took 43 hours using GTX 1070 GPU and i7-8750 CPU.
The first model showed good performance on the detection of MTP plates and IR plates.However, as shown in Fig. 6a, many blank tip positions were recognized as tips.One possible reason is that the blanks have white circles under the light that looks similar to the tips.Therefore, we trained a second model that included the blank as the fourth class.The new training dataset contains 177 blanks and 783 tips whereas the dataset of MTP plates and IR plates remains the same.
Fig. 6b,c and d show the detection results of the final model.It can be seen that the blanks were successfully classified.The other three classes have very high confidence rate, over 90% for most of the cases.
To apply the deep learning technique into the robotic system, we used the Darknet ROS package [20] to run the model in real time using the camera on the liquid handling module.In the network, the confidence threshold was set to 0.5 and the resolution of network's input image was 416 times 416.The output of the package is the detected object bounding boxes with class IDs whose confidences exceed the threshold.During the identification procedure, the Arm 2 moved the camera to four different positions that cover IR plates, tip plates and MTP plates, respectively, as the views are shown in Fig. 6.The object positions in the camera view were fixed each time.To detect whether the object is existing or not, we used Intersection over Union (IoU) to compare the detected bounding boxes (B de ) to the ground truth bounding boxes (B gt ) under the condition that the class ID is the same.The ground truth bounding boxes were labelled manually.Only the object with an IoU higher than 0.5 was considered to be existing.In summary, three criteria to determine an object existing can be expressed as follow: where, ID de represents the detected class ID of the object whereas ID gt means the ground truth class ID.

III. SYSTEM INTEGRATION AND CONTROL A. HARDWARE AND SOFTWARE INTEGRATION
Fig. 7 shows the hardware and software architecture of the whole system, in which the outside hexagons represent the hardware components while the inside rectangles are the software functions.All of the hardware modules and components are connected via ROS.The master node is used to coordinate and control all the other sub-functions with a correct sequence.Except for the communication node of the ultrasonication robot module, all other hardware control or servo nodes run in the main controller (blue dashed box).The communication node of the ultrasonication robot receives commands from the master node to start ultrasonication and returns the sample well locations once the homogenization is finished.
The labware identification node listens to the master node to capture images when Arm 2 arrives at the target position and outputs the bounding boxes together with class IDs of the detected objects.The master node determines the existing labware using IoU calculation.The dual-arm system has a controller to control the arm motion and gripper status, which can be accessed via TCP/IP based on its built-in protocol.
We developed a dual-arm server node running in the main controller that is able to decode and encode the position, speed and gripper operation commands and communicate to the dual-arm system.Furthermore, the server node also can output the arm and gripper status as ROS topics in 30 Hz.This includes the arm speed, position, gripper status and the completion of commands.Once a failure happens, for example, an object dropping from the gripper, the master node stops any further operations immediately.Similar to the dualarm system, a syringe server node was developed to decode and encode the commands of syringe zeroing, aspiration and dispensing.The syringe pump controller communicates to the main controller via RS-232 serial bus.
Most of the actuators in the liquid handling module are controlled by an Arduino microcontroller (Mega 2560; Arduino.cc,Italy) running with ROS.The Arduino uses the serial bus to connect to a rosserial node for communication with other ROS nodes.A motor shield (v2.3;Adafruit, USA), mounted to the Aruidno, is used to control the stepper motor of the pipette and also the servo motor.Also, a 4-way relay module (SainSmart, USA) connects to the Aruidno controller to control the on/off or open/close operations of the shaker, pump and centrifuge sliding door, respectively.The servo motor drive of the centrifuge rotor controls the motor and communicates to the main controller according to the CANopen protocol.To control it in the high level, we developed a centrifuge rotor server node to encode and decode the commands and motor status, which is similar to dual-arm system.The input commands to the server node are the target position, speed, stop/run, block/unblock and zeroing whereas the output feedback includes the motor position, speed and completion of commands.

B. WORKING SEQUENCE
The working sequence was planned according to the manual operation protocol of preparing fungal samples for FTIR spectroscopy [7].As the system has a modular design, users can choose to run either the specific functions or the whole process.As shown in Fig. 8, the whole process 4 implements all the procedures starting from system initialization and calibration.The labware identification loads labware settings and determines to use one-MTP mode or two-MTP mode.Two-MTP mode means the system processes two MTP plates of samples simultaneously, which can reduce the operation time.If no pipette tips or MTP plates or IR plates are detected, the system would not run any further procedures and display a warning.Once the labware is sufficient for experiments, the system washes the samples three times using the centrifuge and the syringe pump.After washing, the MTP plate is moved to the ultrasonication robot module for sample homogenization.In this stage, if two-MTP mode is selected, the system would use the liquid handling module to wash one MTP plate of samples and the ultrasonication robot module to homogenize the samples in the other MTP plate simultaneously.The ultrasonication takes more time compared to other stages.Thereafter, we used a concentration step to increase the density of the homogenized cell suspension for the better quality of FTIR spectra.The concentration stage includes centrifugation, aspiration of upper supernatant, re-ultrasonication and shaking to reduce sediments appearance.The whole process is ended with sample spotting, where the system would implement spotting for one MTP plate and ultrasonication for the other MTP plate if it is in a two-MTP mode.
When running specific functions, the system selects to implement some procedures accordingly.For instance, when spotting 2 is commanded, the system would skip MTP mode selection, sample washing, ultrasonication and concentration.While for sample washing and ultrasonication function 3 , the system executes all the procedures excluding concentration and spotting.

C. A FEW PUSHING ACTIONS
In the development of the system, we used a few pushing actions to make the system more robust.For example, in Fig. 5b, the gripper is taking a MTP plate to the plate holder of the shaker.The plate might not fit to the plate due to the positional error of the arm.This may result in a serious failure especially for spotting where a fixed position of well is used for aspiration.To solve this, we used the gripper inner fingers to push the MTP plate from side to side during placing.Based on our observations, this small technique can significantly improve the placing performance.We also used the gripper to push the MTP plate to the plate holder of the ultrasonication robot module to make it fit well (Fig. 9a).In this case, the gripper fingers are in closed status and push the MTP plate down to the plate holder using the finger tips.In addition, the pipette uses pushing actions to pick up a tip  (Fig. 5c) and the syringe tips push to the wall of the wash station to remove droplets when moving up (Fig. 9b).

IV. EXPERIMENTAL RESULTS AND DISCUSSIONS A. PERFORMANCE OF LABWARE IDENTIFICATION
We used a test image dataset that contains 70 MTP plates, 60 IR plates, 270 tips and 82 blanks to evaluate the performance of the labware identification method.The objects  in the images were manually labelled with bounding boxes and class IDs.Similar to Xiong et al. [21], the correct and incorrect detection were defined as True Positive (TP) and False Positive (FP), respectively.Undetected objects were marked as False Negative (FN).Then, precision is defined as TP over the sum of TP and FP, while recall is TP over the sum of TP and FN.
By varying confidence threshold, the precision-recall curves of the four classes are obtained and shown in Fig. 10.The IoU threshold for the evaluation is the same to the real application (Eq. 1, 0.5).All the four classes show both high precision and recall.High precision and recall represent that most of the objects have been detected and most of the detection results are correct.Further, the average precision of the detection is shown in Table 1, where the average precision is the area under the precision-recall curve.The detection of MTP plates, IR plates and tips show close-toperfect results, while the average precision of blank is slightly lower, which may be relevant to the relative smaller training dataset.Overall, the labware identification system using deep learning shows significant high performance and has been successfully integrated into the robotic system.The reason of the high performance might be due to the fact that the identification environment is relatively simple and unchanged.

B. SAMPLE SPOTTING ACCURACY
To evaluate the performance of the whole system, we conducted a test of the entire process for both one MTP plate and two MTP plates of fungal samples.The fungal samples are filamentous fungi -namely, Mucor circinelloides VI 04473 (Norwegian School of Veterinary Science, Norway) using the same cultivation method as it was described in the   previous work [9].There were 24 wells of samples for each MTP plate, so it created 72 spots on the IR plates.After spotting, the IR plates were dried and scanned to measure the spotting accuracy.Fig. 12 shows the scanned picture of the IR plates and the accuracy measurement method.Generally, the dried samples of fungi on the spots are homogeneous and the spots are located in the center of the well limit circles on the IR plates.As it can be seen in the right enlarged picture, we manually labelled the inner circle of the well limits as red circles (ground truth) and the actual spot boundaries as blue circles.The distance between the centroid of the blue circle and the centroid of the nearest red circle relates to the positional error of the pipette tip.To find the nearest red circle, each blue circle was compared to all the red circles and the minimum distance value returns the nearest circle.The measurement results of two IR plates are shown in Fig. 11a.It can be seen that the positional error test revealed a near normal distribution, indicating that the results seem reliable.Most of the positional errors are located between 0.3 to 0.5 mm, with a mean of 0.36 mm and a 0.15 mm standard deviation.The positional error is mainly caused by the picking up of the pipette tips, because the orientation of the tips remains uncertainty when pushed into the pipette.Another important factor is the coverage rate of the spot.The FTIR analysis requires that the sample spot covers the well limit circle as much as possible.As mentioned above, to avoid spots mixing together, the size of the droplets should not be too large.The coverage rate can be defined as: where, the equation means that the coverage is the overlap area between the blue circle (S blue ) the nearest red circle (S red ) over the red circle (S red ).The coverage rates of two IR plates are shown in Fig. 11b, which indicates that most of the coverage rates are around (mean with minimum value at 0.81.Our practical experience on the coverage rate suggests a minimum value of 0.8, which means that the system can provide desired samples spots for FTIR analysis.

C. SYSTEM OPERATION TIME
We also recorded the execution time of each procedure for the two tests (one MTP plate and two MTP plates).The working sequence together with the processing time is displayed in Fig. 13.For two MTP plates (blue blocks), the whole FIGURE 14. Amide I (using wavenumber of 1650 cm −1 ) absorbance in FTIR spectra with comparison of spot coverage rate.
processing time was 942 minutes, during which ultrasonication (c and f) took up most of the time (78.6%)followed by washing of the two MTP plates (12%).In two-MTP mode, the final stage of sample washing (b) and ultrasonication of MTP plate 1 (c) have been processed simultaneously.The overlap happened at aspiration and dispensing of MTP plate 2 of the sample washing.Due to the vibration of the centrifuge module, the robot cannot perform other operations during centrifugation in the washing procedure.The other overlap is spotting of MTP plate 1 (e) and ultrasonication of MTP plate 2 (f), wherein the entire process of e can be operated simultaneously with f.The robot saved a total of 32.5 minutes in two-MTP mode.For one-MTP mode (green blocks), all the five procedures were processed one after another without overlapping.It must be mentioned that the ultrasocanition time for each MTP plate is different.This is due to the variation of fungal biomass in each well that results in the difference of homogenization time.The ultrasonication robot homogenizes the entire MTP plate of samples until the desired homogeneity of samples are obtained [9].

D. ANALYSIS OF FTIR
We finally performed a FTIR measurement on one of the IR plates of samples using a high-throughput screening spectrometer (HTS-XT; Bruker Optik GmbH, Germany).We extracted the Amide I (using wavenumber of 1650 cm −1 ) absorbance data from the spectra.According to the OPUS Quality Test (OPUS QT) -a standard quality test for FTIR spectra, the absorbance at Amide I band should be in a range 0.3 -1.2.As shown in Fig. 14, 46% of the absorbance in the raw spectra (blue line) is below 0.3.By using the Extended Multiplicative Signal Correction (EMSC) method [22], we can correct the differences in absorbance and obtained the red line.With comparison to the spot coverage rate (green line), we did not find the spot coverage rate has significant influence on the absorbance.The main reason for the differences is that the absorbance at Amide I is highly related to the concentration of the sample spotted on the IR plate.
The results indicate that all the obtained spots on the IR plate could be used for FTIR analysis, but for the future work the droplet concentration should be controlled more precisely to provide higher quality of spectra.

V. CONCLUSION
In this paper, we show the design and development of a laboratory robot that fully automates the preparation of fungal samples for FTIR spectroscopy.We extended the previouslydeveloped ultrasonication robot module to the new system by adding a newly-designed centrifuge module, a newlydeveloped liquid handling module and additional electronics.The liquid handling module uses a high accuracy electric pipette for spotting and a low accuracy syringe pump for sample washing and concentration.A camera on the liquid handling module uses deep learning to identify the labware settings, which includes the number and positions of the well plates and pipette tips.We also present the development of the software under ROS architecture in low level for controlling each components and in high level for integration of all modules.The software was modular designed, so the robot is capable of performing each procedure of the operation independently, such as sample washing and spotting.The robot is able to process up to two 96-well MTP plates of samples simultaneously.Vision system evaluation indicates that labware identification using deep learning can achieve high average precision due to the simple environment.Tests of all procedures show that the obtained sample spots have high positional accuracy (mean 0.36 mm) and can cover most of the desired region (mean 97%).In addition, the FTIR measurement indicates all the obtained spots of one IR plate could be used for FTIR analysis, but future work is required to control the concentration of the droplets to provide higher quality of spectra.

FIGURE 1 .
FIGURE 1. Hardware assembly of the FTIR sample preparation robot.

FIGURE 2 .
FIGURE 2. The 3D model of the centrifuge module (a) and its exploded view which shows the internal components and structure (b).

FIGURE 3 .
FIGURE 3. Schematic of the new-designed filter.

FIGURE 5 .
FIGURE 5.The process of sample spotting on IR plates: (a) labware and the liquid handling module; (b) the gripper is picking up a MTP plate to the shaker; (c) the pipette is picking up a new tip from the tip plate; (d) the pipette is removing the possible fungal mycelium chunk from the sample well to the wash station; (e) the spotting action; (f) schematic of the spotting motion.

FIGURE 6 .
FIGURE 6.Detection results of labware using YOLOv3 CNN model: (a) tip detection results using the first model; (b) tip detection results using the final model, in which the blank position is included as a class; (c) detection results of MTP plates; (d) detection results of IR plates.

FIGURE 7 .
FIGURE 7. Hardware and software architecture of the FTIR sample preparation robot: The hexagons represent the hardware components, while the rectangles are the software functions.

FIGURE 8 .
FIGURE 8. Whole system working sequence: The function is implemented according to the input command.

FIGURE 9 .
FIGURE 9.A few pushing actions to make the system robust.

FIGURE 10 .
FIGURE 10.Precision-recall curves for the performance evaluation of the labware identification.

FIGURE 12 .
FIGURE 12. Final IR plates with sample spots and spotting accuracy measurement method.

FIGURE 13 .
FIGURE 13.Processing time for both one-MTP and two-MTP modes (unit: minute): The first letter in the blocks represents procedures: a -labware identification, b -sample washing of two MTP plates for two MTP mode, one MTP plate for one-MTP mode, c -ultrasonication of MTP 1, d -concentration of MTP 1, e -spotting of MTP 1, f -ultrasonication of MTP 2, g -concentration of MTP 2, h -spotting of MTP 2; the number is the processing time.

TABLE 1 .
Average precision of the labware identification method.