# NOT RUN {
data(PhyloExpressionSetExample)
# Detection of DEGs using the fold-change measure
DEGs <- DiffGenes(ExpressionSet = PhyloExpressionSetExample[ ,1:8],
nrep = 2,
comparison = "below",
method = "foldchange",
stage.names = c("S1","S2","S3"))
head(DEGs)
# Detection of DEGs using the log-fold-change measure
# when choosing method = "log-foldchange" it is assumed that
# your input expression matrix stores log2 expression levels
log.DEGs <- DiffGenes(ExpressionSet = tf(PhyloExpressionSetExample[1:5,1:8],log2),
nrep = 2,
comparison = "below",
method = "log-foldchange",
stage.names = c("S1","S2","S3"))
head(log.DEGs)
# Remove fold-change values < 2 from the dataset:
## first have a look at the range of fold-change values of all genes
apply(DEGs[ , 3:8],2,range)
# now remove genes undercutting the alpha = 2 threshold
# hence, remove genes having p-values <= 0.05 in at
# least one sample comparison
DEGs.alpha <- DiffGenes(ExpressionSet = PhyloExpressionSetExample[1:250 ,1:8],
nrep = 2,
method = "t.test",
alpha = 0.05,
comparison = "above",
filter.method = "n-set",
n = 1,
stage.names = c("S1","S2","S3"))
# now again have a look at the range and find
# that fold-change values of 2 are the min value
apply(DEGs.alpha[ , 3:5],2,range)
# now check whether each example has at least one stage with a p-value <= 0.05
head(DEGs.alpha)
# }
Run the code above in your browser using DataLab