Supplementary Material Development of an automated biomaterial platform to study mosquito feeding behavior

3.4 kDa poly(ethylene glycol) diacrylate (PEGDA) was prepared according to an established protocol (Miller et al., 2010). Poly(ethylene glycol) was added to triethylamine and acryloyl chloride in anhydrous dichloromethane, and was allowed to react overnight. For batch sizes up to 350 g, yields generally ranged between 80-90% and percent acrylation was verified as 99% by H NMR for the characteristic methylene protons adjacent to the acrylate group.


1
Supplementary Methods

Polymer and photoinitiator synthesis
3.4 kDa poly(ethylene glycol) diacrylate (PEGDA) was prepared according to an established protocol (Miller et al., 2010). Poly(ethylene glycol) was added to triethylamine and acryloyl chloride in anhydrous dichloromethane, and was allowed to react overnight. For batch sizes up to 350 g, yields generally ranged between 80-90% and percent acrylation was verified as 99% by 1 H NMR for the characteristic methylene protons adjacent to the acrylate group.
Lithium phenyl-2,4,6-trimethylbenzoylphosphinate (LAP) was prepared according to an established protocol (Fairbanks et al., 2009). Dimethyl phenylphosphinite was reacted with 2,3,6trimethylbenzoyl chloride overnight at room temperature under argon. This reaction was followed by the addition of 4 molar excess lithium bromide in 2-butanone, where the mixture was then heated to 50°C to allow the formation of a solid precipitate. The mixture was then cooled to room temperature over 4 hours and filtered using excess 2-butanone and diethyl ether. For batches up to 30 g, yields of up to 90% were achieved.
Gelatin methacrylate (GelMA) was synthesized according to an established protocol (Grigoryan et al., 2019). Gelatin was dissolved in a carbonate-bicarbonate buffer, and methacrylic anhydride was added dropwise for 3 hours. Temperature was maintained at 50°C. The solution was precipitated in ethanol for ~3 hours. The precipitate was dried, dissolved in PBS, frozen at -80°C, and lyophilized. GelMA solution was stored at -20°C until use.

Preliminary experiments and camera optimization
Preliminary video data was captured on a Sony Alpha a7rIV digital camera outfitted with a 90mm f/2.8 macro lens (B&H Photo Video, New York, NY). Aperture and shutter speed were adjusted to acquire the best data, but videos were consistently gathered at 30fps at 4K resolution. Hydrogels used for early experiments contained a vascular pattern, but the density of this pattern was increased in later iterations.
Preliminary videos acquired from this digital camera were reduced from 3840x2160 (4K) resolution to 1920x1080 (1080p) resolution for further analysis to reduce computation time. The videos gathered this way were very high quality, but this method is likely not scalable because of the high cost of the camera as well as the low number of mosquitoes that could be recorded at one time. Subsequent efforts were focused on minimizing the cost of recording equipment while preserving video data quality.
To reduce the cost of camera equipment, we assessed whether Raspberry Pi computers could be an acceptable substitute for costly professional cameras. These small, lightweight computers can be outfitted with small camera modules capable of recording at up to 1080p resolution at 30 frames per second (fps). Because 1080p resolution was sufficient for analysis in preliminary experiments, this resolution was deemed acceptable for future data collection. Additionally, some third-party manufacturers sell macro lenses compatible with Raspberry Pi camera modules. These lenses could serve as an adequate replacement for the costly macro lens used in preliminary experiments and would preserve the ability to gather high quality images of small objects like mosquitoes.
Replacing a professional camera with a Raspberry Pi computer not only reduced the cost of the recording equipment by two orders of magnitude, it also drastically reduced the required footprint of the camera. This reduction in occupied volume enabled multiplexing the Raspberry Pi camera setup because multiple Raspberry Pi computers and cameras still occupied less space than the original camera and tripod combination. By redesigning the perfusion chambers that hold the hydrogels in place during experiments, we successfully fit 6 hydrogels in the space previously occupied by one. Each of these hydrogels had a designated Raspberry Pi camera, enabling video capture with similar camera angle and quality as in preliminary experiments with a professional camera.

Egg count procedure
Following each feeding experiment, carbon dioxide was introduced to the glass cage until all mosquitoes were anesthetized. The mosquitoes were then gently aspirated and transferred to a cold plate or Flypad (Genesee Scientific, San Diego, CA, USA) for processing. Engorged females were placed in individual cages with a vial containing water and damp seed germination paper for egg deposition, as well as a source of 10% sucrose. Females were contained this way for 5-6 days in the insectary to allow egg deposition, after which the seed germination paper was collected and dried for 24 hours. Egg counts were tabulated by manual counting under a stereomicroscope and recorded. To evaluate whether feeding on blood flowed through hydrogels negatively impacted mosquitoes' ability to produce eggs, we compared egg counts of mosquitoes that fed on our hydrogels with a control group fed using standard laboratory practices (Supplementary Figure 3).

Training data augmentation
To increase model performance with a limited amount of data, the training dataset was supplemented with transformed images. A total of five augmentation transforms were used, and each augmented image contained all five applied transforms. Each image in the training dataset produced three augmented images during the first several model iterations. The transforms applied to each image are as follows: • Saturationcolor saturation was adjusted between -40% and +40% (uniformly distributed).
• Noiseup to 6% of pixels had their color altered.
• Cutoutsix black squares each occupying 6% of the total image size were artificially overlaid in random positions. This augmentation increases model performance in cases where objects may be obstructed. • Mosaicfour images were cropped to contain at least one label and these cropped images were stitched together to create a new image. This augmentation improves performance when detecting small objects. • Bounding box blurpixels within ground truth bounding boxes were slightly blurred.

Machine learning model architecture
Models were trained on the Roboflow Train and Deploy platform (available at https://roboflow.com/). The backend infrastructure has many proprietary technologies and its exact specifications cannot be revealed, but training results could be recreated with a similar YOLO backbone architecture such as YOLOv5-S if custom training was required.
YOLOv5-S (Jocher et al., 2020): Unlike the official release of YOLOv4, YOLOv5 currently exists in active development. Therefore, all YOLOv5 related code, and models may be subject to modification or deletion without notice. YOLOv5-S has 7.5 million parameters, 140 layers, and operates at a lightweight 7MB (14MB for weights pre-trained on COCO). This architecture uses the Cross Stage Partial Network (CSP) (Wang et al., 2019) as the processing backbone and was trained on MSCOCO to extract rich/informative features from an input image. YOLOv5 also uses a PANet (Liu et al., 2018) for the model-neck to generate feature pyramids and the computational friendly LeakyReLU and Sigmoid activation function. The model uses SGD as a default learning rate, but these tests were performed with the ADAM adaptive learning rate enabled (Kingma & Ba, 2014).

Computer vision training and quantification
To quantify the effectiveness of machine learning models, every image used during training was manually labeled with ground-truth labels. These ground-truth labels were used to benchmark model performance. Labels were applied for three object types: mosquitoes, abdomens of feeding/fed mosquitoes, and abdomens of non-feeding mosquitoes. All labels were drawn as bounding boxes of minimal size that still encompassed the object of interest. For mosquito labels, a box was drawn that included mosquitoes' eyes, thorax, and abdomen. Extremities such as legs, wings, antennae, and proboscises were only included if they happened to be within the bounding box that encompassed the other essential mosquito parts. Labels for abdomens of both feeding/fed and non-feeding were drawn to encompass the full visible abdomen. If mosquitoes were fully or partially obscured, labels were extended over the obstructing object as a good faith estimate of where the object would be. Partially obscured abdomens were labeled, but fully obscured abdomens were not.
Object detection machine learning models were evaluated based on precision (also known as positive predictive value), mean average precision (mAP), and recall (also known as sensitivity) Safari et al., 2015). The formulas for each metric are as follows: Where TP = true positives, FP = false positives, FN = false negatives, and AP = average precision. Average precision is calculated for each class according to the following equation: Where p(x) is the precision-recall curve. True positives, false positives, and false negatives were counted according to an intersection-over-union (IoU) threshold of 0.5.

Heating experiments
Heating experiments were performed by offering An. quadrimaculatus mosquitoes three hydrogels heated to 34°C and three hydrogels at room temperature within a single cage. Hydrogel positions receiving heat were changed for each replicate according to a random number generator. Experiments were performed in triplicate. Blood was heated to 37°C before entering the cage. Mosquito preference between heated and unheated hydrogels was analyzed using a two-tailed unpaired t-test (p<0.05).

Mechanical testing of hydrogels
Mechanical testing of hydrogels was performed with a TA.XT Express texture analyzer (Stable Microsystems, Godalming, UK). Hydrogel disks with a diameter of 3 mm were fabricated and subjected to compression. Compression tests were performed with a 5 mm cylindrical steel probe tip to collect stress vs. compression distance. Disc heights were individually measured with a caliper to convert the compression distance data to strain. Young's modulus was then calculated by measuring the slope of the stress-strain curve within the elastic region. It was found that compliant regions did not significantly affect the Young's modulus of bulk hydrogels, so we report a single Young's modulus of 57.9 ± 2.4 kPa for hydrogels with identical material composition.

Surface characterization of hydrogels
The surface roughness of hydrogels was nondestructively assessed using optical profilometry. Hydrogels were fabricated as described previously. To improve visual contrast, hydrogels were stained before imaging using Amido Black 10B (aka Napthol Blue Black) in 1X PBS for 5 minutes prior to imaging. Hydrogels were then briefly rinsed in 1X PBS to remove excess dye. Profilometry measurements were acquired using a Zegage optical profilometer (Zygo Corp., Middlefield, CT, USA) and a computer equipped with ZeMaps v1.14.38 software. All measurements were taken using a 10x objective. Profilometry was performed at the Micro/Nano Fabrication Facility in the School of Science and Engineering at Tulane University, a class 1000 clean room space. Surface roughness (Ra) was measured in both compliant regions and adjacent unmodified hydrogel regions (Ra for compliant regions = 13.292 μm, Ra for non-compliant regions = 0.0267 μm).

Supplementary Figures
Supplementary Figure 1. Effects of PCB heating on An. quadrimaculatus mosquitoes. An. quadrimaculatus mosquitoes were offered six blood-perfused hydrogels, three of which were heated using our PCB. Mosquitoes exclusively fed on heated hydrogels, demonstrating that heat noticeably affects attraction for this species (p<0.05).

Supplementary Figure 2.
Model predictions of mosquito presence and feeding activity in repellent screening experiments. The six plots in each section represent the six Raspberry Pi cameras used in each experiment. The videos used to generate these plots were restricted to a region of interest encompassing hydrogels and their immediate surroundings. The entire plot displays model predictions for the first replicate for this type of experiment. Both mosquito presence and feeding activity are noticeably higher in the control group than in either repellent group. This trend was consistently observed across all replicates in this study. Figure 3. Hydrogels do not substantially impact mosquitoes' ability to produce viable eggs. Violin plots compare egg counts of mosquitoes that fed on blood in a standard bell feeder (control, N=45) and those that fed on blood perfused through hydrogels (N=85) (p>0.05).