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.
Cet exercice fait partie du cours
Differential Expression Analysis with limma in R
Instructions
The fitted model object fit2 has been loaded in your workspace. The limma package is already loaded.
Use
topTableto 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
histto create a histogram of p-values for each of the three contrasts.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# 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[___])