Compute the Reverse Hourglass Score for the Reverse Hourglass Test
Source:R/reversehourglassScore.R
reversehourglassScore.Rd
This function reduces the destruction of an hourglass shaped pattern to a single score value.
Based on a given TAI
or TDI
pattern the given vector is being
divided into three developmental modules: early, mid, and late. The corrisponding TAI
or TDI
values in each developmental module are accumulated using the scoringMethod argument ("max-min" or "mean-mean").
In more detail:
(1) for a given TAI
or TDI
vector tai_profile or tdi_profile, we classify each value of tai_profile or tdi_profile into its corresponding developmental module early, mid, or late.
(2) accumulate the tai_profile or tdi_profile values in each developmental module using the arithmetic mean (mean
) in case scoringMethod = "mean-mean", or accumulate the tai_profile or tdi_profile values in each developmental module using max
for the early and late module and min
for the mid module in case scoringMethod = "max-min".
(3) then reduce the three values for each developmental module by computing the difference between: mid - early, and mid - late.
(4) the two difference values are referred to as a_early and a_late.
Each developmental module now has an accumulated representation value which is being reduced to one value using the method argument ("max", "min", or "mean").
Given the two accumulated values for each hourglass module: a_early and a_late, we reduce the two given values by:
"max": \(S = max{a_early,a_late}\)
"min": \(S = min{a_early,a_late}\)
"mean": \(S = mean{a_early,a_late}\)
All together this results in a global score S. This global score S is being returned by this function.
Usage
reversehourglassScore(
age_vals,
early,
mid,
late,
method,
scoringMethod,
profile.warn = FALSE
)
Arguments
- age_vals
a numeric vector containing
TAI
orTDI
values for each developmental stage s.- early
a numeric vector including the numeric stage values that correspond to the early phase of development.
- mid
a numeric vector including the numeric stage values that correspond to the middle phase of development.
- late
a numeric vector including the numeric stage values that correspond to the late phase of development.
- method
to determine the two value reduction value, resulting in the global score S: "max", or "min", or "mean".
- scoringMethod
method to determine the module accumulation value: "max-min" or "mean-mean".
- profile.warn
a boolean value indicating whether a warning is printed when the low-high-low pattern isn't followed.
Details
The gpScore is a heuristic score enabling to construct a test statistic to determine the significance of a present (phylotranscriptomic) hourglass pattern.
References
Drost et al. (2015), Evidence for active maintenance of phylotranscriptomic hourglass patterns in animal and plant embryogenesis. Mol Bio Evol.
Examples
# read standard phylotranscriptomics data
data(PhyloExpressionSetExample)
data(DivergenceExpressionSetExample)
# example PhyloExpressionSet:
# compute the TAI profile
TAIs <- TAI(PhyloExpressionSetExample)
# compute the global reverse hourglass destruction score
# for the TAIs profile using reduction method: mean(mean-mean)
reversehourglass_score <- reversehourglassScore(age_vals = TAIs,early = 1:2,mid = 3:5,late = 6:7,
method = "mean",scoringMethod = "mean-mean")
# example DivergenceExpressionSet:
# compute the TDI profile
TDIs <- TDI(DivergenceExpressionSetExample)
# compute the global reverse hourglass destruction score for the TDIs profile
# using reduction method: mean(mean-mean)
reversehourglass_score <- reversehourglassScore(age_vals = TDIs,early = 1:2,mid = 3:5,late = 6:7,
method = "mean",scoringMethod = "mean-mean")
# get warning if the expected pattern isn't followed
reversehourglass_score <- reversehourglassScore(age_vals = TAIs,early = 1:2,mid = 3:5,late = 6:7,
method = "mean",scoringMethod = "mean-mean",profile.warn=TRUE)
#> The phylotranscriptomic pattern may not follow a reverse hourglass pattern (low-high-low).