# NOT RUN {
data(PhyloExpressionSetExample)
# a simple example is to transform the gene expression levels
# of a given PhyloExpressionSet using a sqrt or log2 transformation
PES.sqrt <- tf(PhyloExpressionSetExample, sqrt)
PES.log2 <- tf(PhyloExpressionSetExample, log2)
# in case a given PhyloExpressionSet already stores gene expression levels
# that are log2 transformed and need to be re-transformed to absolute
# expression levels, to perform subsequent phylotranscriptomics analyses
# (that are defined for absolute expression levels), one can re-transform
# a PhyloExpressionSet like this:
PES.absolute <- tf(PES.log2 , function(x) 2^x)
# which should be the same as PhyloExpressionSetExample :
head(PhyloExpressionSetExample)
head(PES.absolute)
# plotting the TAI using log2 transformed expression levels
# and performing the Flat Line Test to obtain the p-value
PlotPattern(ExpressionSet = tf(PhyloExpressionSetExample, log2),
type = "l",
lwd = 5,
TestStatistic = "FlatLineTest")
# }
Run the code above in your browser using DataLab