# Combining flow virometry with tree-based machine learning models for rapid virus particle estimation in different wastewater matrices

Yevhen Myshkevych, Ibrahima N'doye, Julie Sanchez Medina, Fahad Aljehani, Yanghui Xiong, Taous-Meriem Laleg-Kirati, Pei-Ying Hong

► To cite this version:

Yevhen Myshkevych, Ibrahima N'doye, Julie Sanchez Medina, Fahad Aljehani, Yanghui Xiong, et al. Combining flow virometry with tree-based machine learning models for rapid virus particle estimation in different wastewater matrices. Water Research, 2025, 284, pp.123905. 10.1016/j.watres.2025.123905. hal-05131610

HAL Id: hal-05131610

https://inria.hal.science/hal-05131610v1

Submitted on 2 Sep 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Combining flow virometry with tree-based machine learning models for rapid virus particle estimation in different wastewater matrices

<figure><img src="image_2.png" /></figure>

Yevhen Myshkevych<sup>a,b</sup>, Ibrahima N'Doye<sup>c,a</sup>, Julie Sanchez Medina<sup>a</sup>, Fahad K. Aljehani<sup>c,b</sup>, Yanghui Xiong<sup>a</sup>, Taous-Meriem Laleg-Kirati<sup>d</sup>, Pei-Ying Hong<sup>a,b,*</sup>

## ARTICLE INFO

### Keywords:

- Flow virometry

- Virus enumeration

- Water reuse

- Machine learning

## ABSTRACT

Enumerating virus particles (VPs) at different stages of the wastewater treatment process or along the distribution network is essential for ensuring high performance and reducing public health risks. Herein, we aimed to (i) optimize the flow virometry (FVM) protocol for use in wastewater matrices, (ii) correlate FVM data with specific virus genera of interest, and (iii) develop machine learning (ML) models for determining total VP concentration. We identified and tested a comprehensive set of parameters to determine the optimal conditions for wastewater FVM. Specifically, we tested various sample preprocessing steps to enhance FVM detection sensitivity, including the use of different nucleic acid staining dyes, surfactant addition and concentration optimization, glutaraldehyde fixation, and the effect of sample freezing before FVM analysis. Spearman's rank correlation of FVM data with virus genera concentration using a conventional qPCR-based method in 206 samples showed a positive correlation for all five virus genera, ranging from 0.21 to 0.44 (p < 0.01). The extreme gradient-boosting (XGB) model using easily accessible physiochemical water parameters (such as turbidity, electroconductivity, total dissolved solids, total suspended solids, pH, chemical oxygen demand, and concentrations of nitrate nitrogen, nitrite nitrogen, and ammonium nitrogen) as input data outperformed the random forest (RF) model and can be used to estimate total virus count across all types of wastewater matrices as output data. Furthermore, XGB achieved a better root mean square error in the four treatment processes (influent, aerobic, sand, and MBR) by a mean of 23 % than RF in model development. This study demonstrates that FVM, combined with ML, can significantly enhance monitoring capabilities by accurately estimating VP concentrations across diverse wastewater matrices.

## 1. Introduction

More than half of the global population currently inhabits areas facing water scarcity, and the situation is projected to deteriorate further owing to climate change and population growth (United Nations Educational, 2018). To improve water security, alternative water sources such as seawater, brackish water, and treated wastewater (WW) are considered for potable and nonpotable use (Kummu et al., 2016). Specifically, reclaimed WW is a climate-resilient water source available even to landlocked countries. To ensure safety when reusing treated

water, however, strict water quality monitoring is necessary. In particular, virus particle (VP) monitoring in reclaimed water should be emphasized as viruses are smaller in size than other biological contaminants and are harder to remove via existing WW treatment processes.

State-of-the-art approaches, including plaque assay and polymerase chain reaction (PCR)-based methods, that are currently used for VP identification and quantification (Baer and Kehn-Hall, 2014; Hansen et al., 2019; Watzinger et al., 2004) are time-consuming and laborious owing to the need for cultivation and sample processing steps (e.g., VP

<footnote><sup>a</sup> Environmental Science and Engineering Program, Division of Biological and Environmental Science and Engineering, King Abdullah University of Science and Technology, Thuwal 23955, Saudi Arabia</footnote>

<footnote><sup>b</sup> KAUST Center of Excellence on Smart Health, King Abdullah University of Science and Technology, Thuwal 23955, Saudi Arabia</footnote>

<footnote><sup>c</sup> Electrical and Computer Engineering Program, Division of Computer, Electrical and Mathematical Science and Engineering, King Abdullah University of Science and Technology, Thuwal, 23955, Saudi Arabia</footnote>

<footnote><sup>d</sup> National Institute for Research in Digital Science and Technology (INRIA), Paris-Saclay, France</footnote>

<footnote>* Corresponding author at: Environmental Science and Engineering Program, Division of Biological and Environmental Science and Engineering, King Abdullah University of Science and Technology, Thuwal 23955, Saudi Arabia.</footnote>

<footnote>E-mail address: peiying.hong@kaust.edu.sa (P.-Y. Hong).</footnote>
concentration, nucleic acid extraction, and reverse transcription PCR [RT-PCR] before PCR quantification). By contrast, flow cytometry (FCM) requires minimal sample processing and only takes ~10 min to enumerate the total particle numbers per sample. FCM is widely used to characterize and quantify particles in micron and submicron scales, including bacteria and fungi (Bleichrodt and Read, 2019; Brown et al., 2019; Rubio et al., 2019; Steiger, 2021). With the advancement in nucleic acid stain development (e.g., SYBR Green and SYBR Gold) and flow cytometer's detection sensitivity, Marie et al. first showed the possibility of detecting and quantifying VPs in the size range of 130–160 nm via FCM in pure cultures (Marie et al., 1999). In a subsequent work, Brussaard and coworkers optimized virus staining protocols and characterized marine virome patterns in environmental samples. The wide diversity of different VPs, ranging from 20 to 500 nm in size (Brussaard et al., 2000), created uncertainty in enumerating viruses within a specific gated region on FCM. In addition, difficulties in distinguishing VPs from background noise hinder the ability of FCM to accurately quantify the absolute abundance of VPs (Ma et al., 2013). Hence, although FCM shows potential for submicron-scale particle quantification, quantifying VPs in complex matrices such as WW (Rockey et al., 2019) remains challenging. Further optimization of processing steps before FCM is necessary to enhance detection sensitivity and advance flow virometry (FVM). Furthermore, the correlation between FVM-derived VP numbers and certain virus genera, indicative of enteric ailments or fecal contamination, needs to be determined. A good correlation between FVM-derived VP numbers and specific virus genera would enhance the relevance of the FVM approach in assessing potential public health threats.

Although FVM demonstrates the potential to serve as a faster alternative to existing virus monitoring methods, the FCM equipment is costly and requires a rather substantial capital expenditure (CAPEX), especially if multiple units of the FCM are to be installed at different stages of the WW treatment process to assess log removal values (LRVs). Likewise, multiple FCM units may be required to monitor aberration in VP numbers along a long-distance reclaimed water distribution pipeline. The high CAPEX limits one's ability to rely on FVM to provide continuous monitoring of the water quality. Therefore, a soft sensing approach based on a neural network was previously demonstrated to estimate bacterial cell numbers in WW matrices (Alharbi et al., 2022). This approach was initially trained in the lab by correlating water quality parameters (e.g., electroconductivity [EC], total dissolved solids [TDSs], total suspended solids [TSSs], and chemical oxygen demand [COD]) with FCM-derived measurements of bacterial cell numbers. Once the soft sensing approach was trained, it used easily obtainable physical and chemical water quality parameters from commercial sensors as input data, while the output data comprise bacterial cell counts in WW matrices provided by the soft sensing method (Alharbi et al., 2022). Given this proof of concept, the soft sensing approach can be further expanded to estimate VPs based on water quality and FCM-derived data.

This study aimed to optimize the FCM protocol for enumerating VPs in different WW matrices. The protocol by Brussaard et al. (2000) served as a basis for further parameter optimization to be utilized on various WW matrices. Specifically, the objective of this study was to optimize the FCM protocol to maximize virus-like particle (VLP) count in WW while minimizing background noise (i.e., developing an optimized FVM approach suitable for use in WW matrices). Subsequently, we aimed to establish correlations between FVM-derived total VP numbers and concentrations of five selected virus genera enumerated via quantitative PCR (qPCR). The rationale is to determine whether FVM-derived data correlate with viruses linked to enteric diseases and fecal contamination. Lastly, this study aimed to develop a soft sensing machine learning (ML) approach for predicting total VPs. The soft sensing approach was trained using FVM-derived data and WW physicochemical parameters obtained from 206 WW samples and validated with 89 additional WW samples. Collectively, this study demonstrates a rapid approach that utilizes both FVM and tree-based ML models for monitoring VLPs in WW matrices.

## 2. Materials and methods

### 2.1. Flow cytometric VP quantification protocol optimization procedures

The previously established protocols to detect VPs in seawater and sludge were used as a basis for further parameter optimization for flow virometry in WW matrices (Brown et al., 2019; Brussaard et al., 2000; Lippé, 2018; Marie et al., 1999). Specifically, we evaluated the need for (i) preprocessing steps (e.g., filtration through syringe filters with pore sizes of 5, 0.45, 0.2, and 0.02 µm), (ii) use of Triton X-100 surfactant, (iii) use of glutaraldehyde fixative, and (iv) sample freezing to capture highest VLP counts in WW while ensuring the lowest background noise. A BD Fortessa flow cytometer (BD Bioscience) with fluorescein isothiocyanate fluorochrome and a 488-nm excitation laser was used for FVM analysis at a flow rate of 0.5 µL/s with low fluidics speed settings.

#### 2.1.1. Preprocessing steps

Physical size exclusion by means of sterile syringe filters (Merck Millipore, MA, US) with respective pore sizes of 5, 0.45, 0.2, and 0.02 µm was evaluated for its ability to remove bacteria without prematurely removing VLPs. Heterotrophic plate counting (HPC) on nutrient-rich Luria-Bertani (LB) agar media (SI Appendix, HPC media preparation) was used to assess the extent of bacterial removal. Briefly, 100 µL of filtrate was spread on the prepared-in-advance LB agar plates (U.S. EPA method 9215C) and left at 37 °C for 24 h. Later, the number of colonies was recorded (Table 1). All samples were tested in biological triplicates. Highly turbid influent samples were centrifuged at 8000 g for 10 min before filtration to reduce the number of required syringe filters. By contrast, other samples were not centrifuged, as this process can reduce the number of VPs in the sample.

#### 2.1.2. Triton X-100

Triton X-100 (Merck Millipore, MA, US) was added before nucleic acid staining or filtration preprocessing to assess its effect on virus fluorescence staining in WW matrices and to identify the main working mechanism by comparing VLP numbers to that of the control. All samples were tested in biological triplicates. In addition, the optimal surfactant concentration was identified. Thus, three groups, namely control (0 % Triton per volume of sample) and those with 0.1 % v/v and 1 % v/v concentrations, were tested and compared.

#### 2.1.3. Glutaraldehyde and sample freezing application

In a previous study by Marie et al. (1999), glutaraldehyde fixation and sample freezing were reported to enhance VLP staining in pure cultures but not in complex matrices or environmental samples. To determine if glutaraldehyde fixation and freezing aid in staining of VLPs in WW samples, we tested five samples in triplicates that were divided into five groups, namely (i) a control group, which was not subjected to glutaraldehyde addition and freezing; (ii) a glutaraldehyde (GA) group,

<table><caption>**Table 1**

Heterotrophic plate counts showing bacterial growth after different stages of physical size exclusion. All samples were cultivated in three replicates. ND denotes not detected.</caption><thead><tr><th></th><th>5 µm (CFU/100 µL)</th><th>0.45 µm</th><th>0.2 µm</th><th>0.2 × 2 µm</th></tr></thead><tbody><tr><td>Influent</td><td>Too many</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>Sand</td><td>256 ± 6</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>MBR</td><td>49 ± 3</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>RO</td><td>ND</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>KAUST Influent</td><td>Too many</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>KAUST Effluent</td><td>43 ± 3</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>KAUST Chlorinated effluent</td><td>ND</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>KAUST AnMBR influent</td><td>Too many</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>KAUST AnMBR effluent</td><td>208 ± 8</td><td>ND</td><td>ND</td><td>ND</td></tr><tr><td>KAUST NBF column</td><td>Too many</td><td>ND</td><td>ND</td><td>ND</td></tr></tbody></table>
which was subjected to glutaraldehyde alone addition (final concen-
tration of 0.5 %); (iii) a group of frozen samples, in which all the samples
were frozen in -80 °C and left overnight; (iv) mixed treatment group
(GA + Frozen), which included samples that were first subjected to
glutaraldehyde addition with subsequent freezing, and (v) mixed
treatment group (Frozen + GA) that was first subjected to freezing and
after thawing, to glutaraldehyde addition. Glutaraldehyde concentra-
tion and freezing conditions were kept consistent throughout the
experiment.

2.1.4. SYBR Gold staining and sample preparation

SYBR Gold dye was added to the samples at a dilution of 5 × 10⁻⁵ from the stock concentration. The stained samples were then incubated at 80 °C for 10 min, followed by cooling at room temperature for 5 min before processing.

## 2.2. WW sample collection

Following FCM protocol optimization, a total of 206 samples origi-
nating from four different wastewater treatment plants (WWTPs) were
collected for FVM protocol testing, qPCR, water physicochemical
parameter measurements, and tree-based model training and validation.
More details on WWTP sampling points and operating parameters can be
found in the Supplementary Materials section (SI Text 1.1; Figure S1).

Sample collection for all four WWTPs started on August 3, 2022, and continued until January 19, 2023, and was done weekly except in December 2022 and early January 2023 due to heavy rains in the Makkah region. Subsequently, the samples were collected biweekly from February 1, 2023, until May 10, 2023. After collection, the samples were kept in coolers with ice packs precooled to -80 °C, delivered to the lab within 3 h from sampling time, and stored at 4 °C before FVM, qPCR, and water quality measurements.

Following the training and testing of tree-based models, an addi-
tional dataset from four WWTPs—P1, P2, P3, and P4—located in Mak-
kah and Madinah was utilized for further validation using previously
unseen data. Detailed descriptions of the operating parameters for those
WWTPs are provided in the Supplementary Materials section (SI Text
1.1). Samples were collected biweekly between July 1, 2020, and August
15, 2022. After collection, the samples were frozen at -20 °C and
transported to the laboratory in pre-chilled containers. Subsequent FVM
and water quality measurements were conducted promptly.

## 2.3. VP concentration, nucleic acid extraction, and virus genome quantification using RT-qPCR

qPCR was used to determine the absolute abundance of selected virus
genera and thereafter compared to FVM counts to determine the cor-
relation of FVM data with the presence of enteric viruses. All water
samples were concentrated using an electronegatively charged mem-
brane, as described before (Katayama et al., 2002) with slight modifi-
cations. Table S1 displays the volumes of the concentrated samples.
Nucleic acids of viruses were extracted from 700 µL of each sample
eluate using the QIAmp Viral RNA Mini Kit (Qiagen, Germany)
following the manufacturer's protocol. Nucleic acid was eluted in 80 µL
of nuclease-free water and used in RT based on the Superscript III
first-strand synthesis system (Thermo Fisher Scientific, Waltham, MA).
More information on virus concentrations and RT protocols can be found
in the Supplementary Materials section (SI Text 1.2).

TaqMan-based qPCR assays for viruses were performed on a
QuantStudio 3 real-time qPCR system (Thermo Fisher Scientific, Wal-
tham, MA). For enteric viruses, human adenovirus (AdV) and entero-
virus (EV) were chosen as respective targets. Pepper mild mottle virus
(PMMoV), MS2 coliphage (MS2), and CrAssphage were chosen as viral
indicators of fecal contamination. More information on reagent con-
centrations and temperature profiles can be found in the Supplementary
Materials section (SI Text 1.2, Table S2).

## 2.4. Analysis of physicochemical water quality

Physicochemical water quality parameters such as pH, TDSs, and EC were measured using a Hach Pocket Pro+ tester (Hach, Ames, IA). TSSs were measured according to the 2540B protocol of the standard method for examination of water and WW (Lipps et al., 2022). Ammonium nitrogen (NH₄-N), nitrate nitrogen (NO₃-N), nitrite nitrogen (NO₂-N), and COD concentrations were measured using HACH kits and a DR1900 portable spectrophotometer (Hach, Ames, IA). Turbidity was measured using a 2100Q portable turbidimeter (Hach, Ames, IA).

2.5. Development of tree-based ML models

Tree-based models, which include random forest (RF) and extreme
gradient boosting (XGB), are robust ML algorithms that utilize decision
trees as their core building blocks, which enables them to handle
nonlinearity and interaction effects for model interpretability when
combined with a feature attribution scheme (Chen et al., 2023). SI Text
S1.3 elaborates on the features and advantages of each of these
tree-based ML models. Water quality data, namely pH, EC, TDS, TSS,
COD, turbidity, NO₃-N, NH₄-N, and NO₂-N concentrations, and
FVM-derived readings from influent, aerobic treatment process effluent
(aerobic), sand filter effluent (sand), and ultrafiltration effluent (MBR)
were used to train and validate the models. Additional synthetic data
were obtained using the Wasserstein generative adversarial network
(WGAN) with TensorFlow tools from the available measurements of
water quality and FVM (9 variables and approximately 8–15 samples).
WGAN-generated water quality parameters and virus concentration data
for the MODON aerobic membrane bioreactor (AeMBR) treatment pro-
cesses ranged between 90 and 130 samples. This choice is motivated by
the need to ensure consistent trade-offs between real and generated
samples, thereby achieving a practical laboratory-in-the-loop design
while maintaining effective monitoring capability during the ML model
development stage and optimizing resources in the experimental
workload. More details on WGAN and running parameters used in this
study can be found in the Supplementary Materials (SI Text S3 and
Figures S2 and S3). Subsequently, a five-fold cross-validation method
was utilized to randomly split the datasets such that 80 % of the data was
considered for training the regression models and 20 % of the data was
used for testing the models. To determine the best water quality pa-
rameters and their combinations for each tree-based model for esti-
mating VP concentrations in each type of WW sample, Optuna and Keras
libraries were used to optimize the hyperparameters of each model by
minimizing the root mean square error (RMSE) through five-fold
cross-validation, namely five K-folds. Optuna is a hyperparameter
optimization method that efficiently explores the searching space of
large hyperparameters and operates automatically; however, it requires
a large number of trials to achieve faster convergence results. Therefore,
the training experiments for both RF and XGB models were conducted
with 1000 trials and were run in parallel using one cluster job array of
103 cluster jobs, each using 8 CPUs and 8 GB of RAM to sample the
hyperparameters and obtain the optimal ones iteratively. Herein, we
developed tree-based ML models using RF and XGB, which inherently
enable feature importance analysis. To assess the contribution of the
input variables, we evaluated feature combinations based on their per-
formance across a five-fold cross-validation setting using RMSE on un-
seen test data (i.e., unseen test data obtained from the same training
data). This approach enabled the identification of the most influential
features across different WW treatment stages, consistent with the re-
sults of previous studies (Alharbi et al., 2022; Aljehani et al., 2024). This
technique shares common interpretability features found in the litera-
ture, such as Shapley additive explanations. SHAP is a widely used
technique for interpreting ML models post-development. Our approach
differs from SHAP by incorporating a validation layer that evaluates
feature performance on unseen test datasets. This is crucial for assessing
the robustness and generalizability of feature importance after model
development, rather than relying solely on a single fitted model without a train-test evaluation split.

To evaluate the performance results during training and testing tree-based ML models, we used four quantitative error metrics, such as RMSE, mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE), as follows:

(a) RMSE is used to quantify the extent of dispersion of a statistical model's predicted values and the actual values and is computed as follows:

$$RMSE = \sqrt{\sum_{i=1}^{n} \frac{(y_i - \hat{y}_i)^2}{n}}$$

(b) MSE is used to measure the amount of error in statistical models assessing the average squared difference between the observed and predicted values and is enumerated as follows:

$$MSE = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2$$

(c) MAE represents the average of the absolute difference between the actual and predicted values in the dataset. It measures the average of the residuals in the dataset as follows:

$$MAE = \frac{1}{n} \sum_{i=1}^{n} |y_i - \hat{y}_i|$$

(d) MAPE determines how far off the estimations are on the average magnitude of error produced by a model (i.e., the percentage equivalent of MAE) and is defined as follows:

$$MAPE = \frac{1}{n} \sum_{i=1}^{n} \left| \frac{y_i - \hat{y}_i}{y_i} \right|$$

where $y_i$ refers to the real output at sample i, $\hat{y}_i$ denotes the predicted output at sample i, $\bar{y}$ is the mean value, and $n$ is the number of dataset samples.

## 2.6. Performance analysis of developed models on new unseen experimental datasets from four WW plants

Upon developing tree-based ML models in various WW matrices of the comprehensive full-scale WWTP in Jeddah, we assessed the model's performance accuracy for estimating virus concentrations on unseen test sets using the test dataset of four new WW plants (P1, P2, P3, and P4) located in Makkah and Madinah across the three developed models of WW (influent, aerobic, and sand) matrices. The testing process, which used unseen test sets, ultimately depended on the optimized tree-based ML algorithms and the best hyperparameters to enhance the performance capability of the developed models.

## 2.7. Statistical analyses

Statistical differences for the parameters at different conditions were evaluated through one-way analysis of variance with a significance level set at 95 % confidence level ($p < 0.05$) and Student's t-test ($p < 0.05$), depending on the set of data available in Origin Pro software. Additionally, to estimate correlation, Spearman's ranked correlation coefficient was calculated and compared.

# 3. Results

## 3.1. FCM protocol optimization to facilitate VLP enumeration

### 3.1.1. Preprocessing step: physical size exclusion

Physical size exclusion has shown its efficiency in removing bulky particles and cells when preparing samples for FVM analysis. A 5-µm pore size filter was used in removing large organic matter particles, alleviating the issue of rapid clogging for subsequently used filters with smaller pore sizes. FVM counts recorded after passing the samples through a 5-µm filter ranged from $3.52 \times 10^9$ to $5.67 \times 10^9$ fluorescent counts/L for different influent samples (Fig. 1A, 1D) and from $1.2 \times 10^8$ to $2.08 \times 10^8$ fluorescent counts/L for various final effluent samples (Fig. 1C, 1F). However, the colony count ranged from 43 CFU/100 µL to confluences that did not enable proper enumeration (Table 1). Thus, a single use of a 5-µm filter could not accurately determine FVM counts that represent only VPs.

Subsequent use of a 0.45-µm filter was sufficient to remove all culturable bacteria from all types of WW samples (Table 1). Similarly, the number of FVM counts resulted in ~1-log decrease compared with the counts determined after filtering through only a 5-µm filter. Furthermore, FVM counts were ~1.67 $\times 10^8$–2.08 $\times 10^8$ and 2.86 $\times 10^7$–6.58 $\times 10^7$ fluorescent counts/L for influent and effluent samples, respectively (Fig. 1A–F).

Despite the use of a 0.45-µm filter being sufficient to remove all culturable heterotrophic plate counts (Table 1), FVM counts showed a statistically significant decrease in all WW sample types excluding final effluent samples, where a 0.2-µm filter was used in the preprocessing step (Fig. 1A–F, $p < 0.05$). However, the additional use of a 0.2-µm filter did not further reduce fluorescent counts detected using FVM in any WW sample (Fig. 1A–F).

Therefore, sequential sample filtration using 5-, 0.45-, and 0.2-µm syringe filters was determined to be an optimal sample preparation technique to enumerate VPs.

### 3.1.2. Triton X-100 application

First, 0.1 % v/v Triton X-100, which was previously reported as the optimal concentration (Brussaard et al., 2000), was evaluated. When Triton X-100 was added before filtration, there was a significant increase in the virus-like FVM counts compared with the control ($p < 0.05$) for all evaluated samples (Figure S4A). When 0.1 % v/v Triton X-100 was added after filtration and before nucleic acid staining, there was no statistical difference for any WW samples compared with the control ($p = 0.58$, Figure S4B). However, the number of virus-like FCM counts significantly increased for Triton X-100-treated seawater samples compared with the control ($p < 0.05$, Figure S4B). Different concentrations of Triton X-100 added before filtration were further tested. Both 0.1 % and 1 % v/v concentrations of Triton X-100 increased FVM fluorescent counts (Figure S5) compared with the control. However, increasing the Triton concentration to 1 % v/v did not enhance the fluorescent particle count; instead, it decreased compared with the 0.1 % concentration ($p < 0.05$).

### 3.1.3. Glutaraldehyde and freezing

The effect of glutaraldehyde and freezing of samples was evaluated in five types of WW matrices sampled at different stages of WW treatment. With the exception of the effluent sampled after the activated sludge process, there was no significant change in FVM counts after glutaraldehyde addition or sample freezing ($p = 0.47$, Figure S6). Fresh samples collected after the activated sludge treatment process yielded the highest FCM count of VPs (Figure S6).

### 3.1.4. Optimized FVM protocol

After the abovementioned optimization steps, the following protocol was subsequently implemented for FVM: (i) fresh samples were collected and processed immediately. (ii) Nonionic surfactant Triton X-
<figure><img src="image_3.png" /><figcaption>**Fig. 1.** Comparison of virus-like particle counts in KAUST (A–C) and MODON (D–F) WWTP samples detected using FCM following different pore size filtration. All testing was conducted in three independent biological replicates and three technical replicates. Significant differences between different treated groups were analyzed using one-way analysis of variance, where *p* < 0.05, **p** < 0.01, and ***p** < 0.001.</figcaption></figure>

100 was added at 0.1 % v/v concentration to enhance the detachment process of VPs from organic matter or bacteria. (iii) High-turbidity WW samples were first subjected to centrifugation for 10 min at 8000 g to settle most of the bulky debris and microorganisms. (iv) Subsequently, for all WW samples, successive sample filtration through 5-, 0.45-, and 0.2-µm sterile filters was performed to ensure good removal of bacteria from VLPs in the filtrate. (v) The filtered samples were 10 × diluted with 1 × TE buffer so as not to exceed 1000 events/s during FVM analysis. (vi) SYBR Gold was used as a staining dye for VP detection during FVM in a 5 × 10⁻⁵ concentration of commercial stock. (vii) Stained samples were incubated for 10 min in a preheated 80 °C incubator and left to cool down at 21 °C for 5 min in a dark place before (viii) FVM analysis.

## 3.2. Comparison of optimized FCM protocol against previously published protocols

The optimized protocol was compared with two other protocols reported in earlier studies (Brussaard et al., 2000; Ma et al., 2013). Total fluorescent counts were significantly higher in the AeMBR influent and effluent samples obtained using the protocol optimized in this study than those obtained using the other two protocols (Fig. 2A, *p* < 0.05). However, there was no statistical difference in ultrafiltration effluents (Fig. 2A, *p* = 0.27) for all the three protocols. Concerning background noise, there was no statistical difference between the protocol offered in this study and the protocol offered by Ma et al. (2013) (Fig. 2B, *p* = 0.18). The background noise in influent and activated sludge effluent was lower than that in the protocol reported by Brussaard et al. (Brussaard et al., 2000) (Fig. 2B, *p* < 0.05).

<figure><img src="image_4.png" /><figcaption>**Fig. 2.** Optimized protocol comparison with previously established staining protocols by Ma et al., 2013 and Brussaard et al., 2000 in terms of (A) fluorescent counts and (B) background noise counts.</figcaption></figure>
### 3.3. Viral load enumeration by FVM and qPCR

VPs in 206 WW samples were further enumerated using the optimized FVM protocol. In the influent of the plant treating industrial water, the number of VLPs was on average $1.5 \times 10^9$ VPs/L. VP count in the effluent samples after activated sludge treatment and sand filter decreased to an average of $6.86 \times 10^8$ VPs/L. In WWTPs treating municipal WW, the number of VPs in the influent was slightly lower compared with that in the influent of WWTPs treating industrial WW and was on average approximately $8.14 \times 10^8$ VPs/L. The MBR treatment did not achieve a high LRV, as the average number of VPs decreased only to $7.37 \times 10^8$ VPs/L. An additional chlorination step for municipal WW did not significantly decrease total VPs, with an average of $7.11 \times 10^8$ VPs/L in the final chlorinated effluent. Hence, the determined LRVs achieved by the described treatment stages using FVM were 0.34 and 0.36 for WWTPs treating industrial (Fig. 3A) and municipal WW (Fig. 3B), respectively.

As FVM only enumerates VLPs with no denotation of the abundance of specific virus groups, five virus targets were further enumerated using qPCR (Table S3). Both types of raw WW samples detected all five virus genera. The average CrAssphage concentrations detected in influent samples were $1.67 \times 10^7$ and $5.01 \times 10^4$ gene copies/L in municipal and industrial influents, respectively. Other viral targets did not differ significantly between both types of influents, with a detected average of $1.94 \times 10^6$ and $8.54 \times 10^5$ gene copies/L for PMMoV, $6.8 \times 10^4$ and $5.51 \times 10^4$ gene copies/L for EV, $2.43 \times 10^5$ and $4.95 \times 10^5$ gene copies/L for AdV, and $4.12 \times 10^4$ and $8.79 \times 10^4$ gene copies/L for MS2 in municipal and industrial WW influents, respectively.

In contrast to the FVM data, activated sludge treatment and sand filtration of industrial WW significantly decreased all virus genera quantified using qPCR (Fig. 3A). The total LRV measured via qPCR was 1.8 for EV, 2.0 for MS2, 1.0 for PMMoV, 1.1 for AdV, and 3.0 for CrAssphage in industrial WW. Similarly, in WWTPs treating municipal WW, both MBR and final chlorination contributed an LRV of 4.0 for EV, 5.0 for MS2, 4.3 for PMMoV, 1.8 for AdV, and 5.4 for CrAssphage (Fig. 3B).

### 3.4. Evaluating virus FCM protocol through comparative analysis with qPCR-based methods

The analysis revealed a statistically significant positive correlation between the total VP count obtained via FVM and the absolute numbers of all selected virus genera, with correlation coefficients ranging from 0.21 to 0.45 ($p < 0.05$, Table 2). The analysis highlighted the strongest correlation between FVM data and AdV concentrations, marked by a Spearman's rank correlation coefficient of 0.45 (Table 2). A somewhat lower yet significant correlation was noted between PMMoV and FVM counts, with a coefficient of 0.34 (Table 2). Similarly, MS2, EV, and CrAssphage demonstrated positive correlations with FVM data, with

<caption>**Table 2**</caption>

Spearman's rank coefficient correlation matrix of total number of virus particles quantified using flow cytometry and targeted virus genera quantified using quantitative polymerase chain reaction.

<table><thead><tr><td></td><td>Virus particle concentration rank</td><td>p-value</td></tr></thead><tbody><tr><td>EV</td><td>0.24</td><td>p < 0.0005</td></tr><tr><td>MS2</td><td>0.27</td><td>p < 0.0005</td></tr><tr><td>PMMoV</td><td>0.34</td><td>p < 0.0001</td></tr><tr><td>AdV</td><td>0.45</td><td>p < 0.0001</td></tr><tr><td>CrAssphage</td><td>0.21</td><td>p < 0.01</td></tr></tbody></table>

coefficients of 0.27, 0.24, and 0.21, respectively (Table 2).

### 3.5. Training and testing tree-based ML models for total VP estimation

In the testing phase, the RMSE of the set was evaluated for both tree-based models, and the model with the smallest average RMSE was selected for the model evaluation. We pinpointed the key feature combinations related to water quality for the RF and XGB tree-based ML models in each type of WW sample along with the hyperparameters for each model (Table S4). Different types of WW samples required different input features; in the case of WW influent, both the RF and XGB models included six key features, namely COD, $NO_3-N$, $NO_2-N$, turbidity, pH, TSSs (Table S4). Moreover, two additional features ($NH_4-N$ and EC) in the XGB model resulted in better performance on the logarithmic scale in the testing sets (i.e., the smallest average RMSE value) compared with the RF model of the influent treatment process (Table 3). In contrast, EC and TSS were the two essential features of activated sludge aerobic effluent samples occurring in the RF and XGB models. Nonetheless, three additional features (TDSs, $NO_3-N$, and $NO_2-N$) in the XGB model resulted in better performance in the testing sets compared with that in the RF model (Table 3). Similarly, TDSs, turbidity, and $NH_4-N$ features appeared in the testing results for the sand filter effluent samples combined with features such as TSSs, COD, and $NO_2-N$ and $NO_3-N$ in the RF and XGB models, respectively, to provide better performance in terms of the smallest average error metrics (Table 3). Lastly, MBR effluent indicated a combination of features (COD, $NO_3-N$, and $NH_4-N$), resulting in good estimation accuracy for the RF model, while the XGB model required the addition of pH and conductivity parameters to achieve the smallest average error metrics (Table 3).

### 3.6. Performance results across four different experimental unseen WW test data

Upon determining the optimal parameters and the best combination of features, the developed XGB models were tested across four different WWTP (P1, P2, P3, and P4) datasets that were not previously encountered in the model's training and testing. The average RMSE difference

<figure><img src="image_5.png" /><figcaption>**Fig. 3.** Cumulative log removal values (LRV) for various targets, namely total virus-like particles as determined using flow cytometry, as well as enterovirus (EV), MS2 phage, Pepper mild mottle virus (PMMoV), adenovirus (AdV), and CrAssphage determined using RT-qPCR. LRV was achieved at different treatment stages in (A) MODON WWTP treating industrial WW by means of activated sludge process and sand filtration and (B) KAUST WWTP treating municipal WW by means of activated sludge process, ultrafiltration effluent, and chlorination.</figcaption></figure>

<figure><img src="image_6.png" /></figure>
<caption>**Table 3**</caption>

Smallest average RMSE value in testing results between predicted and actual virus particle (VP) concentrations for both tree-based ML models in various WW matrices in $log_{10}$ VP/L and VP/L. XGB and RF refer to extreme gradient-boosting and random forest models, respectively, for predicting VP concentration in various WW matrices. Specifically, influent represents raw WW, while aerobic, sand, and ultrafiltration effluent (MBR) correspond to effluent samples from different stages of WW treatment.

<table><thead><tr><th>Models</th><th>Features</th><th>Average RMSE difference in log<sub>10</sub> VP/L</th><th>Average RMSE difference in VP/L</th></tr></thead><tbody><tr><td>XGB Influent</td><td>COD, NH<sub>4</sub>-N, NO<sub>3</sub>-N, NO<sub>2</sub>-N, Turbidity, Conductivity, pH, TSSs</td><td>0.21</td><td>1.62</td></tr><tr><td>RF Influent</td><td>COD, NO<sub>3</sub>-N, NO<sub>2</sub>-N, Turbidity, pH, TSSs</td><td>0.28</td><td>1.90</td></tr><tr><td>XGB Aerobic</td><td>Conductivity, TDSs, TSSs, NO<sub>3</sub>-N, NO<sub>2</sub>-N</td><td>0.16</td><td>1.44</td></tr><tr><td>RF Aerobic</td><td>Conductivity, TSSs</td><td>0.19</td><td>1.55</td></tr><tr><td>XGB Sand</td><td>TDSs, Turbidity, NO<sub>3</sub>-N, NH<sub>4</sub>-N</td><td>0.08</td><td>1.20</td></tr><tr><td>RF Sand</td><td>TDSs, TSSs, COD, Turbidity, NH<sub>4</sub>-N, NO<sub>2</sub>-N</td><td>0.10</td><td>1.26</td></tr><tr><td>XGB MBR</td><td>pH, Conductivity, COD, NO<sub>3</sub>-N, NH<sub>4</sub>-N</td><td>0.05</td><td>1.12</td></tr><tr><td>RF MBR</td><td>COD, NO<sub>3</sub>-N, NH<sub>4</sub>-N</td><td>0.08</td><td>1.20</td></tr></tbody></table>

in VP/L of the unseen test results of the influent treatment process relatively increased from the testing performance results of the full-scale baseline WWTP in Jeddah by 31% from P1 and 15% from P3 in terms of average RMSE values, while this difference decreased by -12% from P2 and -2% from P4 (Table 4). Moreover, we attempted to determine if the model could be generalized for use in all four WWTPs and found that the average RMSE difference in VP/L of the unseen testing performance results of the aerobic and sand treatment processes for all four WW plants increased by 31% in terms of the average RMSE value of the baseline testing results.

## 4. Discussion

The growing issue of water scarcity across the globe has led to a heightened focus on the importance of treated WW reuse. However, past failures in WW treatment processes and distribution networks led to incidents of water contamination, some of which resulted in viral disease outbreaks (Cabral, 2010; Onyango et al., 2015). Untimely actions have led to acute gastrointestinal symptoms in several thousand people, underscoring the need for timely decision-making (Onyango et al., 2015). In response, this study introduces a swift and relatively precise method aimed at enhancing VP surveillance. Despite FVM's detection limitations, particularly its inability to accurately detect particles <80 nm and quantify VP abundance, the data showed a reasonable positive correlation with concentrations of specific virus genera. Therefore, FVM can still serve as a valuable tool for monitoring changes in total virus concentrations across various WW matrices (Table 2). This conclusion aligns with the findings of Huang et al. (2016), who reported similar

<caption>**Table 4**</caption>

Performance results between predicted and actual virus particle concentrations for developed XGB models of influent, aerobic, and sand matrices across four different experimental unseen WW test sets (P1, P2, P3, and P4; i.e., WW plant datasets not previously encountered in model's training and testing phases).

<table><thead><tr><th rowspan="2">Developed tree-based ML models</th><th rowspan="2">Best input features from developed XBG models</th><th colspan="3">Validation performance results</th></tr><tr><th>Unseen experimental WW datasets</th><th>Average RMSE difference in log<sub>10</sub> VP/L</th><th>Average RMSE difference in VP/L</th></tr></thead><tbody><tr><td rowspan="4">Influent</td><td rowspan="4">COD, NH<sub>4</sub>-N, NO<sub>3</sub>-N, NO<sub>2</sub>-N, Turbidity, Conductivity, pH, TSSs</td><td>P1</td><td>0.37</td><td>2.34</td></tr><tr><td>P2</td><td>0.16</td><td>1.44</td></tr><tr><td>P3</td><td>0.28</td><td>1.90</td></tr><tr><td>P4</td><td>0.20</td><td>1.58</td></tr><tr><td rowspan="4">Aerobic</td><td rowspan="4">Conductivity, TDSs, TSSs, NO<sub>3</sub>-N, NO<sub>2</sub>-N</td><td>P1</td><td>0.47</td><td>2.95</td></tr><tr><td>P2</td><td>0.65</td><td>4.47</td></tr><tr><td>P3</td><td>0.31</td><td>2.04</td></tr><tr><td>P4</td><td>0.37</td><td>2.34</td></tr><tr><td rowspan="4">Sand</td><td rowspan="4">TDSs, Turbidity, NO<sub>3</sub>-N, NH<sub>4</sub>-N</td><td>P1</td><td>0.31</td><td>2.04</td></tr><tr><td>P2</td><td>0.09</td><td>1.23</td></tr><tr><td>P3</td><td>0.35</td><td>2.24</td></tr><tr><td>P4</td><td>0.28</td><td>1.90</td></tr></tbody></table>

challenges in separating VPs from background noise. However, despite this limitation, they could effectively detect changes in total virus concentrations (Huang et al., 2016). Furthermore, to accommodate situations where FCM equipment is unavailable, we have developed an ML-based model capable of estimating total VP concentration based on principal physiochemical parameters in various WW matrices (Figures S7-S10).

We first established a unified protocol by integrating insights and methodologies from prior research on virus FCM protocols to achieve our proposed FVM approach. Consistent features across these studies were adopted as is, whereas elements that showed variation were identified and tested. Sample types in various studies ranged from relatively clear seawater samples (Brussaard et al., 2000; Marie et al., 1999) to WW samples (Huang et al., 2015) and significantly denser and more turbid sludge specimens (Ma et al., 2013), leading to variations in the necessary preprocessing steps. To mitigate interference from large bacterial cells and other bulky debris that could obscure the detection of smaller VPs, all WW samples underwent a preliminary filtration process. Consequently, filtration through 5- and 0.45-µm filters effectively removed all culturable bacteria from samples (Table 1). However, a 0.2-µm filter significantly reduced the count of fluorescent particles (Fig. 1A, 1B, 1D, and 1E). We hypothesized that this phenomenon could be attributed to the presence of viable but nonculturable bacteria or dwarf cells (Pinto et al., 2015). These organisms represent a comprehensive spectrum of microorganisms that cannot be cultured on nutrient-rich media yet remain detectable using FCM.

Despite Triton X-100 addition being shown to be unessential in previous studies (Brussaard et al., 2000; Huang et al., 2015), our results (Figures S4 and S5) are in agreement with those of several other studies (Ma et al., 2013; Marie et al., 1999) showing VP detection enhancement. This discrepancy could be due to a misunderstanding of the surfactant's primary working mechanism. We observed that incorporating Triton X-100 before the staining process was beneficial only for seawater samples (Figure S4). However, applying Triton before preprocessing steps significantly improved VP detection (Figure S4). Therefore, it is likely that Triton X-100 lowers surface tension, aiding in the breakup of larger aggregates, which is aligned with postulation made previously (Ma et al., 2013). Further testing at a higher 1% v/v concentration of Triton X-100 led to fewer fluorescent events but increased fluorescent intensity (Figure S5). Hence, our suggested protocol for staining VPs reflects the insights gained from this research.

While glutaraldehyde addition enhances VP staining (Brussaard et al., 2000; Tang et al., 2016), our findings indicate that its addition does not alter the number of fluorescence counts (Figure S6). Previous studies have used glutaraldehyde in the fixation of virus cultures to prevent the degradation of VPs during sample freezing. However, in the case of using fresh samples or after just one freeze-thaw cycle, the addition of glutaraldehyde does not have a significant effect on preserving VPs. Our findings also indicated that one-time freezing resulted in no impact on subsequent VP detection (Figure S6). Therefore, the use of glutaraldehyde may be particularly beneficial for preserving VPs during
multiple freeze-thaw cycles, as these cycles typically reduce virus quantities. In case of fresh sample availability, glutaraldehyde addition is considered redundant, and fresh samples are more preferred for FVM.

With the optimized protocol, FVM enumerated total VPs that exhibited a moderate positive correlation across selected viral qPCR targets, with AdV and PMMoV demonstrating higher correlations of 0.45 and 0.34, respectively (Table 2). This might be potentially due to their larger sizes of ~100 nm (Kennedy and Parks, 2009) and 300 nm (Kitajima et al., 2018), respectively, while MS2, EV, and CrAssphage sizes are 28 nm (Stephanopoulos and Francis, 2012), 30 nm (Magana-Arachchi and Wanigatunge, 2020), and 72 nm (Ramos-Barbero et al., 2023), respectively. Our findings indicate a detection limit ranging from 90 to 100 nm for the BD Fortessa flow cytometer (data not shown). This threshold likely contributes to the observed stronger correlations for larger VPs but not smaller ones.

The total VP count estimated using FVM revealed LRVs ranging from 0.14 to 0.49 across different WWTPs, while RT-qPCR sometimes revealed LRVs exceeding 5. Despite this significant disparity, the absolute reduction in particles detected using FVM was notably higher. Herein, the average total viral count detected in municipal WW was 1.04 × 10⁹ VP/L for influent and 6.35 × 10⁸ VP/L for effluent, resulting in an LRV of 0.21, equivalent to 3.85 × 10⁸ and 2.83 × 10⁸ VP removal, respectively. These values were substantially higher when compared with RT-qPCR-derived values, where specific virus genera reduction in GC absolute number varied from 6.05 × 10³ GC for MS2 to 1.67 × 10⁷ GC for CrAssphage. We hypothesized that this difference stems from the high specificity of PCR-based methods, which detect only particular viral targets and are not representative of the entire virome. By contrast, FVM is nonspecific and can detect any VLPs >80 nm in size and containing nucleic acid. As reported by previous studies (Chaudhry et al., 2015; Zhang et al., 2022), various virus genera respond differently to treatment; some are more susceptible, while others are more resilient, resulting in lower removal rates. Therefore, the reduction in VP count for the whole virome may be slightly lower than the LRVs of specific virus genera quantified in this study. Despite the limitations, FCM-derived virus enumeration may be useful for establishing a baseline, conducting routine water quality monitoring, enhancing WBE, and serving as a rapid early outbreak monitoring system.

Building upon the insights obtained through FVM, we next explored the use of ML approaches to enable scalable and indirect estimation of total VP concentrations. With this consideration in mind, the tree-based ML models were developed to provide total VP estimation (Figures S7–S10). Across all four sample types, XGB models demonstrated superior accuracy than RF models (Figures S7–S10), consistent with the result of previous studies (Sahin, 2020; Shamsudin et al., 2019; Zhang et al., 2021). The XGB model outperformed the RF model by minimizing errors and optimizing performance through gradient-boosting techniques. It uses advanced regularization (L1 and L2) to prevent overfitting, which is a common issue in RF models. XGB also handles missing data systematically and employs a more efficient tree-pruning strategy, leading to faster learning and more accurate predictions, especially in complex datasets with nonlinear and intricate relationships between variables (Aljehani et al., 2024). The next step focused on model validation across four different experimental unseen WW plants (P1, P2, P3, and P4; i.e., WW plant datasets not previously encountered in the model’s training and testing phases) to enhance the efficiency of estimating VPs. The models for estimating VP concentrations across the three developed WW (influent, aerobic, and sand) matrices showed relatively good validation performance results for different experimental unseen WW plants (see more details in Table S5). Notably, the sand effluent model achieved the highest accuracy, suggesting that a combination of the input features (Total dissolved solids (TDS), turbidity, NO₃-N, and NH₄-N concentrations) and (electro-conductivity (EC), Total suspended solids (TSS), and NO₂-N concentrations) might be essential components for a model generalization aspect, streamlining the online process by obviating the need for

additional physiochemical water parameters. However, we found slight differences when comparing these parameters to the ones used for bacterial cell number estimation in previous studies (Alharbi et al., 2022; Aljehani et al., 2024). Unlike bacterial cells, the concentration of COD was not critical for estimating VP numbers in effluent samples. This is likely because VPs are inactive outside host cells, whereas bacterial cells can survive and regrow when adequate nutrients are available. Therefore, VPs are not reliant on COD concentration. Similarly, TDS concentration in influent samples was not crucial for VP estimation. We hypothesized that bacterial cells may be more susceptible to concentrations of dissolved organic and inorganic substances, while viruses, protected by capsids and sometimes envelopes, and lacking biological activity outside hosts, are less affected. Despite these features, other parameters such as turbidity and TDS for effluent samples, as well as EC, TSS, and COD for influent samples, remained consistent for estimating both bacterial cell and VP concentrations.

The tree-based ML models demonstrated remarkable performance in predicting VP concentrations on limited data with numerous trials for faster convergence results of the Optuna optimization algorithm. These models are solely based on water physicochemical variables and are interpretable to an extent, particularly through the feature importance analysis conducted using XGB and RF. By ranking features based on their impact on RMSE in a cross-validation setting (see Tables 3, 4, and S4), we could infer which input variables most strongly influence VP prediction. By expanding the training dataset and including other types of input variables that are not necessarily water physicochemical parameters, the prediction performances of these models can be enhanced. Thus, the interpretability of the tree-based ML models is worth investigating and will remain relevant as the set of input variables increases and does not necessarily share a common feature.

Although all WW share a similar core technology, namely AeMBR, the main challenge lies in constructing an optimal model from the primary MODON AeMBR baseline that can infer satisfactory model performance enhancement across different WW treatment processes. The model performance enhancement results on unseen test datasets from different WWTPs do not systematically confer a generalizability or universality capability of the baseline model. In other words, the optimal baseline model alone without an adaptation mechanism might fail to address abrupt treatment process drifts induced by the shifts in data from diverse WWTPs. For instance, abrupt effluent changes might often occur in different types of WW plants or technologies, including the anaerobic membrane bioreactor technology. Therefore, an adaptation mechanism not covered in this work is often necessary to address generalizability, ensuring the performance of the developed isolated ML models across different WW plants with varying core technologies. Most adaptation mechanisms that leverage generalizability capabilities and achieve satisfactory performance on unseen test datasets work with neural network algorithms owing to their inherent properties. To the best of our knowledge, inferring adaptation mechanisms on tree-based ML models remains an open challenge. Our recent work (Chen et al., 2025), based on lifelong learning and knowledge-based adaptation, is the first to use streaming learning through knowledge transfer for new unseen WWTP data to ensure model generalization performances across different WW matrices and plants. However, the generalization ability of the tree-based ML models (XGB and RF) was limited in the adaptation performance phase, as mentioned in (Chen et al., 2025). In summary, tree-based ML models are effective for development with limited data and can reveal insights into potential hybrid models that merge mechanistic and data-driven approaches by emphasizing key features.

Acknowledging the potential and limitations of the described methods, we envision their future in water quality monitoring and WWTP performance assessment. To demonstrate the complementary nature of our approach, both FVM and XGB modeling can be integrated for VP quantification and prediction across different WW matrices. FVM can be employed as a direct quantification method, offering high-resolution data on VP concentrations. Specifically, this approach may
be well-suited to detect changes in total virus concentrations, indicating WWTP malfunctions or inefficiencies. Unlike more labor-intensive and time-consuming traditional techniques, our method provides a rapid monitoring tool capable of identifying significant virus concentration shifts, enabling timely intervention and more targeted follow-up analyses. However, to deploy this technology effectively, each WWTP must first conduct tests to establish baseline viral load values. These baselines will serve as reference points, with any deviations signaling changes in virus concentrations and potentially triggering early warnings of upcoming outbreaks. However, owing to the high cost and limited availability of equipment required for FVM, its continuous application in routine monitoring may not be feasible for all WWTPs. For those cases, the XGB model provides a cost-effective alternative that utilizes standard physicochemical parameters to estimate viral counts. Furthermore, while the model itself can serve as a stand-alone prediction tool, its performance strongly depends on initial calibration and validation using FVM-generated data. Without proper tuning using such data, the predictive accuracy of the XGB model may be significantly reduced, limiting its reliability across diverse WWTPs. Therefore, the combination of proposed methods allows the development of site-specific, robust predictive models, where FVM serves as an initial foundational tool for model training and optimization, and XGB enables scalable and cost-effective routine monitoring. Furthermore, our ML-based models may serve as early outbreak warning systems using only water physicochemical parameters, even without FCM equipment. This rapid monitoring approach demonstrated in this study can facilitate water quality assessment and decision-making, leading to improved community health protection.

## 5. Conclusions

This study optimized the FVM for different WW matrices by resolving parameter inconsistencies reported in earlier studies, which often resulted in varied outcomes. Sequential filtration using syringe filters with pore sizes of 5-, 0.45-, and 0.2-µm was found to remove bulky debris effectively, isolating VLPs. Additionally, the use of 0.1 % Triton X-100 and SYBR Gold stain at a $5 \times 10^{-5}$ concentration, without the addition of glutaraldehyde, resulted in the highest detection of VPs. The one-time freeze-thawing protocol did not affect FVM-derived viral counts. Additionally, FCM counts exhibited a weak-to-moderate positive correlation with all virus genera representing various virus groups, indicating its usefulness for detecting fluctuations in VP concentrations but not for providing an accurate representation of absolute VP abundance. Therefore, FVM can be considered a tool for routine monitoring in WWTPs, providing early warnings of potential issues or malfunctions within the system. Furthermore, graph neural networks combined with ML-based models can estimate total VP counts and specific virus genera concentrations using commonly accessible water parameters, offering an alternative approach for predicting VP concentrations when FVM is unavailable.

## Supporting information

Additional supplementary tables denote the type and volume of samples concentrated (Table S1), the list of primers and probes along with qPCR parameters and temperature profiles (Table S2), various virus genera concentrations in different WW samples (Table S3), feature combinations and optimal hyperparameters for tree-based ML algorithms (Table S4), and performance results between the predicted and the actual virus particle concentrations (Table S5). Additional supplementary figures denote schematical representation of WWTPs (Figure S1), quantitative performance of the WGAN in generating high values (Figure S2), PCA and t-SNE visualizations in two-dimensional space (Figure S3), influence of Triton X-100 application (Figure S4), influence of different concentrations of Triton X-100 on total virus count (Figure S5), impact of glutaraldehyde and freezing on FVM counts

(Figure S6), and training and testing results for RF and XGB models (Figures S7-S10).

## CRediT authorship contribution statement

**Yevhen Myshkevych:** Writing – review & editing, Writing – original draft, Visualization, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. **Ibrahima N'Doye:** Software, Methodology, Formal analysis, Data curation. **Julie Sanchez Medina:** Methodology, Data curation. **Fahad K. Aljehani:** Methodology, Data curation. **Yanghui Xiong:** Data curation. **Taous-Meriem Laleg-Kirati:** Supervision, Resources, Project administration. **Pei-Ying Hong:** Writing – review & editing, Writing – original draft, Supervision, Resources, Project administration, Funding acquisition, Conceptualization.

## Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

## Acknowledgements

This study is supported by Near-term Grand Challenge (AI) REI/1/5233-01-01 and KAUST-MEWA SPA REP/1/6112-01-01 awarded to P.-Y. Hong. We thank the KAUST FM Utilities team and the MODON WWTP operation team for granting access to various WW samples. We also thank Vicky Huang, a visiting student in Prof. Hong's group, for her help in processing the samples and Allan Kamau, a database administrator at KAUST, for his guidance and introduction to the Ibex supercomputing software and job scheduling.

## Supplementary materials

Supplementary material associated with this article can be found, in the online version, at doi:10.1016/j.watres.2025.123905.

## Data availability

Data will be made available on request.

## References

Alharbi, M., Hong, P.-Y., Laleg-Kirati, T.-M., 2022. Sliding window neural network based sensing of bacteria in wastewater treatment plants. J. Process Control 110, 35-44.

Aljehani, F., N'Doye, I., Hong, P., Monjed, M., Laleg-Kirati, T.-M., 2024. Bacteria cells estimation in wastewater treatment plants using data-driven models. IFAC-Pap. 58, 718-723.

Baer, A., Kehn-Hall, K., 2014. Viral concentration determination through plaque assays: using traditional and novel overlay systems. J. Vis. Exp (93), e52065.

Bleichrodt, R.-J., Read, N.D., 2019. Flow cytometry and FACS applied to filamentous fungi. Fungal Biol. Rev. 33 (1), 1-15.

Brown, M., Hands, C., Coello-Garcia, T., Sani, B., Ott, A., Smith, S., Davenport, R., 2019. A flow cytometry method for bacterial quantification and biomass estimates in activated sludge. J. Microbiol. Methods 160, 73-83.

Brussaard, C.P.D., Marie, D., Bratbak, G., 2000. Flow cytometric detection of viruses. J. Virol. Methods 85 (1), 175-182.

Cabral, J.P., 2010. Water microbiology. Bacterial pathogens and water. Int. J. Env. Res. Public Health 7 (10), 3657-3703.

Chaudhry, R.M., Nelson, K.L., Drewes, J.E., 2015. Mechanisms of pathogenic virus removal in a full-scale membrane bioreactor. Env. Sci. Technol. 49 (5), 2815-2822.

Chen, H., Covert, I.C., Lundberg, S.M., Lee, S.-I., 2023. Algorithms to estimate Shapley value feature attributions. Nat. Mach. Intell. 5 (6), 590-601.

Chen, J., N'Doye, I., Myshkevych, Y., Aljehani, F., Monjed, M.K., Laleg-Kirati, T.-M., Hong, P.-Y., 2025. Viral particle prediction in wastewater treatment plants using nonlinear lifelong learning models. NPJ. Clean. Water 8 (1), 28.

Hansen, S.J.Z., Tang, P., Kiefer, A., Galles, K., Wong, C., Morovic, W., 2019. Droplet digital PCR is an improved alternative method for high-quality enumeration of viable probiotic strains. Front. Microbiol. 10, 3025.

Huang, X., Min, J.H., Lu, W., Jaktar, K., Yu, C., Jiang, S.C., 2015. Evaluation of methods for reverse osmosis membrane integrity monitoring for wastewater reuse. J. Water Process Eng. 7, 161-168.
Huang, X., Zhao, Z., Hernandez, D., Jiang, S.C., 2016. Near real-time flow cytometry monitoring of bacterial and viral removal efficiencies during water reclamation processes. Water (Basel) 8 (10), 464.

Katayama, H., Shimasaki, A., Ohgaki, S., 2002. Development of a virus concentration method and its application to detection of enterovirus and Norwalk virus from coastal seawater. Appl. Env. Microbiol. 68 (3), 1033–1039.

Kennedy, M.A., Parks, R.J., 2009. Adenovirus virion stability and the viral genome: size matters. Mol. Ther. 17 (10), 1664–1666.

Kitajima, M., Sassi, H.P., Torrey, J.R., 2018. Pepper mild mottle virus as a water quality indicator. NPJ. Clean. Water 1 (1), 19.

Kummu, M., Guillaume, J.H., de Moel, H., Eisner, S., Flörke, M., Porkka, M., Siebert, S., Veldkamp, T.I., Ward, P.J., 2016. The world's road to water scarcity: shortage and stress in the 20th century and pathways towards sustainability. Sci. Rep. 6 (1), 1–16.

Lippé, R., 2018. Flow virometry: a powerful tool to functionally characterize viruses. J. Virol. 92 (3). https://doi.org/10.1128/jvi.01765-01717.

Lipps, W., Baxter, T., Braun-Howland, E., 2022. APHA Standard Methods For the Examination of Water and Wastewater. APHA Press, Washington, DC, USA.

Ma, L., Mao, G., Liu, J., Yu, H., Gao, G., Wang, Y., 2013. Rapid quantification of bacteria and viruses in influent, settled water, activated sludge and effluent from a wastewater treatment plant using flow cytometry. Water Sci. Technol. 68 (8), 1763–1769.

Magana-Arachchi, D., Wanigatunge, R., 2020. Waterborne Pathogens. Elsevier, pp. 15–42.

Marie, D., Brussaard, C.P., Thyrhaug, R., Bratbak, G., Vaulot, D., 1999. Enumeration of marine viruses in culture and natural samples by flow cytometry. Appl. Env. Microbiol. 65 (1), 45–52.

Onyango, L.A., Quinn, C., Tng, K.H., Wood, J.G., Leslie, G., 2015. A study of failure events in drinking water systems as a basis for comparison and evaluation of the efficacy of potable reuse schemes. Env. Health Insights 9 (Suppl 3), 11–18.

Pinto, D., Santos, M.A., Chambel, L., 2015. Thirty years of viable but nonculturable state research: unsolved molecular mechanisms. Crit. Rev. Microbiol. 41 (1), 61–76.

Ramos-Barbero, M.D., Gómez-Gómez, C., Sala-Comorera, L., Rodríguez-Rubio, L., Morales-Cortes, S., Mendoza-Barberá, E., Vique, G., Toribio-Avedillo, D., Blanch, A.

R., Ballesté, E., 2023. Characterization of crAss-like phage isolates highlights Crassvirales genetic heterogeneity and worldwide distribution. Nat. Commun. 14 (1), 4295.

Rockey, N., Bischel, H.N., Kohn, T., Pecson, B., Wigginton, K.R., 2019. The utility of flow cytometry for potable reuse. Curr. Opin. Biotechnol. 57, 42–49.

Rubio, E., Zboromyrska, Y., Bosch, J., Fernandez-Pittol, M.J., Fidalgo, B.I., Fasanella, A., Mons, A., Román, A., Casals-Pascual, C., Vila, J., 2019. Evaluation of flow cytometry for the detection of bacteria in biological fluids. PLoS. One 14 (8), e0220307.

Sahin, E.K., 2020. Assessing the predictive capability of ensemble tree methods for landslide susceptibility mapping using XGBoost, gradient boosting machine, and random forest. SN Appl. Sci. 2 (7), 1308.

Shamsudin, H., Sabudin, M., Yusof, U., 2019. Hybridisation of RF(Xgb) to improve the tree-based algorithms in learning style prediction. IAES Int. J. Artif. Intell. (IJ-AI) 8, 422.

Steiger, M.G., 2021. Flow cytometry for filamentous fungi. Trichoderma Reesei: Methods Protoc. 147–155.

Stephanopoulos, N., Francis, M., 2012. 9.14-making new materials from viral capsids. Polym. Sci.: Compr. Ref. 1-10, 247–266. Volume.

Tang, V.A., Renner, T.M., Varette, O., Le Boeuf, F., Wang, J., Diallo, J.-S., Bell, J.C., Langlois, M.-A., 2016. Single-particle characterization of oncolytic vaccinia virus by flow virometry. Vaccine 34 (42), 5082–5089.

United Nations Educational, S.a.C.O., New York, United States, 2018. The United Nations World Water Development Report 2018: Nature-Based Solutions For Water.

Watzinger, F., Suda, M., Preuner, S., Baumgartinger, R., Ebner, K., Baskova, L., Niesters, H.G., Lawitschka, A., Lion, T., 2004. Real-time quantitative PCR assays for detection and monitoring of pathogenic human viruses in immunosuppressed pediatric patients. J. Clin. Microbiol 42 (11), 5189–5198.

Zhang, J., Wu, B., Zhang, J., Zhai, X., Liu, Z., Yang, Q., Liu, H., Hou, Z., Sano, D., Chen, R., 2022. Virus removal during sewage treatment by anaerobic membrane bioreactor (AnMBR): the role of membrane fouling. Water Res. 211, 118055.

Zhang, W., Wu, C., Zhong, H., Li, Y., Wang, L., 2021. Prediction of undrained shear strength using extreme gradient boosting and random forest based on Bayesian optimization. Geosci. Front. 12 (1), 469–477.