Description Usage Arguments Author(s) Examples
extract module pca component
1 2 |
data |
protein quantification data. column is sample. row is protein ID. |
colors |
protein and module information. which is calculated in WGCNA package. |
nPC |
how many PCA component will saved. |
plot |
a logical value indicating whether draw PCA plot. This function is based on https://github.com/vqv/ggbiplot
which had to be copied to DHMDA because |
filename |
The filename of plot. The default value is |
group |
sample group information. |
Kefu Liu
1 2 3 4 5 6 7 8 9 10 11 12 13 | rm(list = ls())
library(DDPNA)
data(net)
data(imputedData)
data <- imputedData
logD <- data$log2_value
rownames(logD) <- data$inf$ori.ID
Module_PCA <- modpcomp(logD, net$colors)
# if plot PCA and plot module 6 PCA
group <- gsub("[0-9]+", "", colnames(logD))
pos <- which(net$colors == 6)
Module_PCA <- modpcomp(logD[pos,], net$colors[pos], plot = TRUE, group = group)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.