Description Usage Arguments Details Value Author(s) See Also Examples
This function performs the split-apply-combine methodology on Phylostrata or Divergence Strata stored within the input ExpressionSet.
This function is very useful to perform any phylostratum or divergence-stratum specific analysis.
1 |
ExpressionSet |
a standard PhyloExpressionSet or DivergenceExpressionSet object. |
FUN |
a function to be performed on the corresponding expression matrix of each phylostratum or divergence-stratum. |
... |
additional arguments of FUN. |
as.list |
a boolean value specifying whether the output format shall be a matrix or a list object. |
This function uses the split
function to subset the expression matrix into
phylostratum specific sub-matrices. Internally using lapply
, any function can
be performed to the sub-matrices. The return value of this function is a numeric matrix storing
the return values by FUN
for each phylostratum and each developmental stage s.
Note that the input FUN
must be an function that can be applied to a matrix (e.g., colMeans
or RE
).
In case you use an an anymous function you coud use function(x) apply(x , 2 , var)
as an example to compute the variance of each phylostratum and each
developmental stage s.
Either a numeric matrix storing the return values of the applied function for each age class or a numeric list storing the return values of the applied function for each age class in a list.
Hajk-Georg Drost
split
, tapply
, lapply
, RE
, REMatrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# source the example dataset
data(PhyloExpressionSetExample)
# Example 1
# get the relative expression profiles for each phylostratum
age.apply(PhyloExpressionSetExample, RE)
# this is analogous to
REMatrix(PhyloExpressionSetExample)
# Example 2
# compute the mean expression profiles for each phylostratum
age.apply(PhyloExpressionSetExample, colMeans)
# Example 3
# compute the variance profiles for each phylostratum
age.apply(PhyloExpressionSetExample, function(x) apply(x , 2 , var))
# Example 4
# compute the range for each phylostratum
# Note: in this case, the range() function returns 2 values for each phylostratum
# and each developmental stage, hence one should use the argument 'as.list = TRUE'
# to make sure that the results are returned properly
age.apply(PhyloExpressionSetExample, function(x) apply(x , 2 , range), as.list = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.