Rate based water use efficiency (WUE) is the change in biomass per unit of water metabolized. Using image based phenotypes and watering data we can calculate pseudo-WUE (pwue) over time. Here area_pixels is used as a proxy for biomass and transpiration is approximated using watering data. The equation is then \( \frac{P_{t} - P_{t-1}}{W_{t_{end-1}}-W_{t_{start}} }\), where P is the phenotype and W is the weight before watering.
Absolute value based WUE is the amount of water used to sustain a plants biomass over a given period. The equation is then \(\frac{P_{t}}{W_{t_{end-1}}-W_{t_{start}} }\)
Usage
pwue(
df,
w = NULL,
pheno = "area_pixels",
time = "timestamp",
id = "barcode",
offset = 0,
pre_watering = "weight_before",
post_watering = "weight_after",
method = "rate"
)
Arguments
- df
Dataframe containing wide single-value phenotype data. This should already be aggregated to one row per plant per day (angles/rotations combined).
- w
Watering data as returned from bw.water.
- pheno
Phenotype column name, defaults to "area_pixels"
- time
Variable(s) that identify a plant on a given day. Defaults to
c("barcode", "DAS")
.- id
Variable(s) that identify a plant over time. Defaults to
"barcode"
.- offset
Optionally you can specify how long before imaging a watering should not be taken into account. This defaults to 0, meaning that if a plant were watered directly before being imaged then that water would be counted towards WUE between the current image and the prior one. This argument is taken to be in seconds.
- pre_watering
Column containing weight before watering in
w
, defaults to "weight_before".- post_watering
Column containing weight after watering in
w
, defaults to "weight_after".- method
Which method to use, options are "rate" and "abs". The "rate" method considers WUE as the change in a phenotype divided by the amount of water added. The "abs" method considers WUE as the amount of water used by a plant given its absolute size. The former is for questions more related to efficiency in using water to grow while the latter is more suited to questions about how efficient a plant is at maintaining size given some amount of water.
Value
A data frame containing the bellwether watering data joined to phenotype data with new columns for change in the phenotype, change in the pre-watering weight, and pseudo-water use efficiency (pWUE).
Examples
set.seed(123)
weight_before <- sort(round(rnorm(20, 100, 10), 0))
weight_after <- sort(round(rnorm(20, 120, 10), 0))
df <- data.frame(
time = seq_along(weight_before),
area_pixels = round(130 / (1 + exp( (12 - seq_along(weight_before))/3) ), 0),
weight_before,
weight_after,
barcode = 1
)
ex <- pwue(df, time = "time", method = "rate")
w <- df[, c("time", "weight_before", "weight_after", "barcode")]
ex2 <- pwue(df, w, time = c("time", "time"), method = "abs")