Computes the community signatures (eigengenes) for an expression matrix given a particular community membership (kME) matrix
Arguments
- ex
 matrix of bulk RNA-seq or microarray gene expression data. This should be in log space and greater than or equal to 0.
- membership_matrix
 a community membership (kME) matrix with genes as rows and communities as columns. Often
community_membershiporfull_community_membershipoutput fromicwgcna()- cutoff
 number of top genes to use when computing community signatures
- pc_flag
 indicator. TRUE (default) means to use the 1st principal component (corrected for direction). FALSE uses the mean of scaled and centered top genes.
Details
This can be used to compute community signatures in a new expression dataset.
Note, community signatures are not corrected by icwgcna()
iterations so it will not match signatures output from icwgcna()
if it is run on the network construction dataset.
When using these community signatures for modeling it may be best to include interaction terms or use tree based methods since dependencies are not addressed in this output matrix.
Examples
if (FALSE) { # \dontrun{
library("UCSCXenaTools")
luad <- getTCGAdata(
  project = "LUAD", mRNASeq = TRUE, mRNASeqType = "normalized",
  clinical = FALSE, download = TRUE
)
ex <- as.matrix(data.table::fread(luad$destfiles), rownames = 1)
results <- icwgcna(ex)
compute_eigengene_matrix(ex, results$community_membership)
} # }