Histogram of p-values
After performing the test, confirm that the model was properly specified by inspecting the distribution of p-values for each contrast. Recall that a uniform distribution of p-values is expected for a contrast with few differentially expressed genes, and a right skewed distribution is expected for a contrast with many differentially expressed genes.
Este exercício faz parte do curso
Differential Expression Analysis with limma in R
Instruções do exercício
The fitted model object fit2
has been loaded in your workspace. The limma package is already loaded.
Use
topTable
to obtain the summary statistics for every gene for the contrast"dox_wt"
. Set the number of genes to return equal the number of rows offit2
.Repeat for the contrasts
"dox_top2b"
and"interaction"
.Use
hist
to create a histogram of p-values for each of the three contrasts.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Obtain the summary statistics for the contrast dox_wt
stats_dox_wt <- ___(fit2, coef = ___, number = ___,
sort.by = "none")
# Obtain the summary statistics for the contrast dox_top2b
stats_dox_top2b <- ___(fit2, coef = ___, number = ___,
sort.by = "none")
# Obtain the summary statistics for the contrast interaction
stats_interaction <- ___(fit2, coef = ___, number = ___,
sort.by = "none")
# Create histograms of the p-values for each contrast
___(stats_dox_wt[___])
___(stats_dox_top2b[___])
___(stats_interaction[___])