DefineBestPC | R Documentation |
Defines the best principle component to use for downstream analysis.
DefineBestPC(mat, IDs, filter_thresh, return.plot)
mat |
Bismark2Matrix.R output file, or data frame object |
IDs |
A character vector of IDs containing the common names for compared conditions. E.g., for samples trt1, trt2 vs. ctl1, ctl2, IDs=c("trt", "ctl") |
filter_thresh |
A coverage threshold for filtering, where CpG coverage of all samples must be larger than this value |
return.plot |
T/F, whether to return a PCA plot or a numeric representing the best principle component for downstream analysis |
If return.plot=T
, a grob
plotting a PCA of percent methylation of all samples is returned. Otherwise, a numeric
representing the best principal component to use for PCBS analysis is returned.
DefineBestPC(eigen, IDs = c("trt", "ctl"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.