rhScore {myTAI} | R Documentation |
Compute the Hourglass Score for the Reductive Hourglass Test
Description
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: early - mid, and late - mid.
(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 rhScore
.
Usage
rhScore(age_vals, early, mid, late, method, scoringMethod)
Arguments
age_vals |
a numeric vector containing |
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". |
Details
The gpScore is a heuristic score enabling to construct a test statistic to determine the significance of a present (phylotranscriptomic) hourglass pattern.
Value
a numeric value representing the hourglass destruction score.
Author(s)
Hajk-Georg Drost
References
Drost HG et al. (2015) Mol Biol Evol. 32 (5): 1221-1231 doi:10.1093/molbev/msv012
See Also
ReductiveHourglassTest
, TAI
, TDI
Examples
# read standard phylotranscriptomics data
data(PhyloExpressionSetExample)
data(DivergenceExpressionSetExample)
# example PhyloExpressionSet:
# compute the TAI profile
TAIs <- TAI(PhyloExpressionSetExample)
# compute the global hourglass destruction score
# for the TAIs profile using reduction method: mean(mean-mean)
rh_score <- rhScore(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 hourglass destruction score for the TDIs profile
# using reduction method: mean(mean-mean)
rh_score <- rhScore(age_vals = TDIs,early = 1:2,mid = 3:5,late = 6:7,
method = "mean",scoringMethod = "mean-mean")