pairScore | R Documentation |
This function computes the PairwiseTest score for a given TAI
or TDI
pattern.
The pair test is a permutation test based on the following test statistic.
- A PhyloExpressionSet is partitioned into contrast pairs - contrast1 and contrast2 - based on prior biological knowledge. This prior knowledge could include sexual, ecological and genetic backgrounds.
- The mean TAI
or TDI
value for each of the two contrasts contrast1 and contrast2 are computed.
- The pairwise differences D_constrast = contrast1 - contrast2 is calculated as final test statistic of the pair test,
when the altHypothesis
is specified as "greater". When the altHypothesis
is specified as "less", sign of D_constrast is reversed.
This function pairScore computes the D_contrast value for a given TAI
or TDI
stored in the age_vals
argument.
pairScore(age_vals, contrast1, contrast2, altHypothesis = NULL)
age_vals |
a numeric vector containing |
contrast1 |
a numeric vector storing the numeric stage values that correspond to the query contrast. |
contrast2 |
a numeric vector storing the numeric stage values that correspond to the subject contrast. |
altHypothesis |
a character string defining the alternative hypothesis used to quantify the statistical significance in the present phylotranscriptomics pattern. Possible values can be:
|
a numeric value representing the pair score.
Hajk-Georg Drost and Jaruwatana Sodai Lotharukpong
PairwiseTest
, TAI
, TDI
# read standard phylotranscriptomics data
data(PhyloExpressionSetExample)
data(DivergenceExpressionSetExample)
# Example PhyloExpressionSet:
# compute the TAI profile
TAIs <- TAI(PhyloExpressionSetExample)
# compute the pair score for the first two stages in the TAI profile
# we test whether TAI in contrast1 is greater than contrast 2.
pair_score <- pairScore(age_vals = TAIs,contrast1 = 1,contrast2 = 2,
altHypothesis="greater")
# Example DivergenceExpressionSet:
# compute the TDI profile
TDIs <- TDI(DivergenceExpressionSetExample)
# compute the pair score for the first two stages in the TDI profile
# we test whether TDI in contrast1 is greater than contrast 2.
pair_score <- pairScore(age_vals = TDIs,contrast1 = 1,contrast2 = 2,
altHypothesis="greater")
# compute pairScore() vector from bootMatrix()
apply(bootMatrix(PhyloExpressionSetExample,10),1,
pairScore,contrast1 = 1,contrast2 = 2, altHypothesis="greater")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.