tfStability aims to statistically evaluate the
stability of ReductiveHourglassTest
, FlatLineTest
,
ReverseHourglassTest
, EarlyConservationTest
, or
LateConservationTest
(all based on TAI
or TDI
computations) against different
data transformations.
The corresponding p-value quantifies the probability that a given TAI or TDI pattern (or any phylotranscriptomics pattern)
does not support the chosen test. A p-value < 0.05 indicates that the corresponding phylotranscriptomics pattern does
indeed support the chosen test.
tfStability(
ExpressionSet,
TestStatistic = "FlatLineTest",
transforms = c("none", "sqrt", "log2", "rank", "squared"),
modules = NULL,
permutations = 1000,
pseudocount = 1
)
a standard PhyloExpressionSet or DivergenceExpressionSet object.
a string defining the type of test statistics to be used to quantify the statistical significance the present phylotranscriptomics pattern. Possible values can be:
TestStatistic
= "FlatLineTest"
: Statistical test for the deviation from a flat line
TestStatistic
= "ReductiveHourglassTest"
: Statistical test for the existence of a hourglass shape (high-low-high pattern)
TestStatistic
= "ReverseHourglassTest"
: Statistical test for the existence of a reverse hourglass pattern (low-high-low pattern)
TestStatistic
= "EarlyConservationTest"
: Statistical test for the existence of a early conservation pattern (low-high-high pattern)
TestStatistic
= "LateConservationTest"
: Statistical test for the existence of a late conservation pattern (high-high-low pattern)
a character vector of any valid function that transforms gene expression levels.
a list storing three elements: early, mid, and late. Each element expects a numeric
vector specifying the developmental stages or experiments that correspond to each module.
For example, module
= list(early = 1:2, mid = 3:5, late = 6:7) divides a dataset
storing seven developmental stages into 3 modules.
a numeric value specifying the number of permutations to be performed for the FlatLineTest
, EarlyConservationTest
, LateConservationTest
, ReductiveHourglassTest
or ReverseHourglassTest
.
any valid number to add to the expression matrix prior to log transformations.
a vector object containing the vector elements:
p.value
: the p-value quantifying the statistical significance (depending on the chosen test) of the given phylotranscriptomics pattern under the given data transformation(s).
An assessment for the stability of data transforms on the permutation test of choice.
For details, please consult tf
, ReductiveHourglassTest
,
FlatLineTest
, ReverseHourglassTest
,
LateConservationTest
or EarlyConservationTest
Lotharukpong JS et al. (2023) (unpublished)
data(PhyloExpressionSetExample)
# perform the reductive hourglass test for a PhyloExpressionSet
# here the prior biological knowledge is that stages 1-2 correspond to module 1 = early,
# stages 3-5 to module 2 = mid (phylotypic module), and stages 6-7 correspond to
# module 3 = late
tfStability(ExpressionSet = PhyloExpressionSetExample,
TestStatistic = "ReductiveHourglassTest",
permutations = 100,
transforms = c("log2", "sqrt", "none"),
modules = list(early = 1:2, mid = 3:5, late = 6:7))
#> Proceeding with the ReductiveHourglassTest
#> log2 sqrt none
#> 8.441084e-02 1.324692e-07 3.194564e-08
# it is also possible to test the phylotranscriptomic pattern using rlog
# and vst transforms from DESeq2
library(DESeq2)
#> Error in library(DESeq2): there is no package called ‘DESeq2’
tfStability(ExpressionSet = PhyloExpressionSetExample,
TestStatistic = "ReductiveHourglassTest",
permutations = 100,
transforms = c("log2", "sqrt", "none", "vst"),
modules = list(early = 1:2, mid = 3:5, late = 6:7))
#> Proceeding with the ReductiveHourglassTest
#> Error in get(as.character(FUN), mode = "function", envir = envir): object 'vst' of mode 'function' was not found