Description Usage Arguments Value Author(s) Examples
Takes a class MDS object from limma::plotMDS and generates two plots: 1) fraction of variance for each dimension, 2) cumulative variance. By default, it plots the first 10 dimensions or the first N dimensions totaling 90 topN and cumVarLimit arguments to change the defaults.
1 2 3 4 5 6 7 8 9 10 | MDS_var_explained(
mds,
topN = 10,
cumVarLimit = 0.9,
barColor = "dodgerblue4",
barFill = "dodgerblue3",
barWidth = 0.65,
barSize = 0.1,
baseFontSize = 14
)
|
mds |
A class MDS object from limma::plotMDS or a data matrix to analyze (typically log2) (required) |
topN |
The number of dimensions to plot (Default = 10) |
cumVarLimit |
The maximum cumulative variance to plot. Range 0-1. (Default = 0.9) |
barColor |
Default = "dodgerblue4" |
barFill |
Default = "dodgerblue3" |
barWidth |
range 0-1. (Default = 0.65) |
barSize |
Thickness of the fill border (Default = 0.1) |
baseFontSize |
Base fontsize for the plot (Default = 14) |
A list with two ggplots and the variance explained data.frame.
John Thompson, jrt@thompsonclan.org
1 2 3 4 5 6 7 8 9 | #Plot the first two dimensions
MyMDS = ggplotMDS (MyDGEList)
MyMDS[[1]] #the MDS plot
#Then apply MDS_var_explained (the MDS object is MyMDS[[2]])
varResults <- MDS_var_explained(MyMDS[[2]])
varResults[[1]] #the Variance per dimension plot
varResults[[2]] #the cumulative variance plot
var_explained <- varResults[[3]] #data used for plotting (unfiltered)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.