TITLE: Data normalisation of RT-qPCR data for detection of SARS-CoV-2 in wastewater 
AUTHORS: Adrian Roberts, Zhou Fang, Claus-Dieter Mayer, Anastasia Frantsuzova, Graeme J Cameron, Livia C T Scorza

[DESCRIPTION]
After obtaining the raw measurements as gene copies per litre using RT-qPCR, a normalisation process is required prior to reporting the data as RNA copies per person. 
This is because the concentration of viral RNA in wastewater is affected by both the population of the catchment area at each waterworks, as well as the amount of flow into the works. For example, an area with heavy rainfall will have high volumes of fluid flow, which will dilute RNA values. 

Therefore, parameters such as the flow volume of wastewater and population size are used to overcome this bias. 

Unfortunately, the flow data are not always accessible for all sites. Three methods were developed by Biomathematics and Statistics Scotland (BioSS) to estimate the flow for the normalization process, depending on data availability: 

1. Normalisation using ammonia concentration to estimate flow; 
2. Normalisation using flow historical average (when data for method 1 are not available);
3. Normalisation using predicted ammonia to estimate flow (when data for methods 1 and 2 are not available). 

For all methods, the normalised outputs were reported as a daily value of RNA copies per person.

These methods are described separately in this protocol.


For other methodologies involving SARS-CoV-2 quantification in wastewater, such as viral RNA isolation and RT-qPCR, please refer to:

dx.doi.org/10.17504/protocols.io.bzv5p686 (RNA extraction from wastewater for detection of SARS-CoV-2 )
dx.doi.org/10.17504/protocols.io.bzwap7ae (RT-qPCR for detection of SARS-CoV-2 in wastewater)


[STEPS]
SECTION: Decision tree
1. Normalisation requires population size and water flow at the collection site. 

Depending on the level of information available for particular site and date (such as ammonia content in wastewater or historical flow) different processing paths are available, as described below in the step by step algorithm.

The decision process is also described in the following figure 

 
  
 


SECTION: Code example
9. For illustration purposes we present the extract of the code for prediction of ammonia and flow which is used in the BioSS processing pipeline in R.
 

SECTION: Decision tree
2. If flow data exist for a specific site and date (Flow[site, date]) GO TO normalisation step 8,
otherwise continue.
SECTION: Decision tree
3. If flow data is not available, but measurements of ammonia concentration exist for a specific site and date (Am[site, date]) GO TO prediction step 7,
otherwise continue.
SECTION: Using historical data to estimate ammonia
5. 
The missing amonia values can be infered from a generalized additive (GAM) spline model which fits seasonal ammonia data.



 

Observations: 
- the smoothing parameter k=90 was chosen by preliminary analysis
- the predicted value is prevented from being lower than ever observed


GO TO to flow prediction step 7
SECTION: Using only population data to estimate flow
6. If a site has no flow/ammonia data at all, use a national linear model based on population to predict flow

    
 

Observations:
- One has to take into account that by using flow historical average, the seasonal aspects are not considered, such as heavier rain fall in particular sites and seasons. 

GO TO to normalisation step 8
SECTION: Using ammonia data to estimate flow
7. When flow measurements are unavailable, but ammonia concentration in wastewater is available (directly or by estimation), a linear mixed statistical model can be used to estimate flow. 


More specifically,  a random coefficients model is used combining data from ammonia content and the population of each specific site. In this model the log of the flow is regressed on the log of the population and log of ammonia, which are used as fixed effects. 

This model is used to calculate site specific coeficients, for those sites which have at least 25 dates with both ammonia and flow data availables. For the remaining sites the "fixed" effects are used.


 
The precomputed parameters are used to predict the flow (a table wth site specif coeficients is attached to this protocol).

 


Observations:
- The coefficients parameters were update only every so often, with a degree of care like identifying outliers in the data.

  

GO TO to normalisation step 8
SECTION: Normalisation using flow and population data
8. To produce a daily value of RNA copies per person, the raw RNA measurement is multiplied by the daily flow total, and divided by the population served at each site.
The flow for a specific site (waterworks location) is either measured directly or estimated using one of the methods from above. 


 

SECTION: Decision tree
4. If there are no measurements for flow or ammonia concentration for a site on any dates GO TO step 5, or, alternatively, go to step 6 if historical flow is available.
SECTION: Code example
10.