moduleEigengenes(expr,
colors,
impute = TRUE,
nPC = 1,
align = "along average",
excludeGrey = FALSE,
grey = ifelse(is.numeric(colors), 0, "grey"),
subHubs = TRUE,
trapErrors = FALSE,
returnValidOnly = trapErrors,
softPower = 6,
scale = TRUE,
verbose = 0, indent = 0)expr, giving module color
for all probes (genes). Color "grey" is reserved for unassigned genes.TRUE, expression data will be checked for the presence of NA entries and
if the latter are present, numerical data will be imputed, using function impute.knn and probes from
the same module as the missing datum. Talign = "along average", the default) or left as they are (align = "").
Any other value will trigger an error.colors designating the improper module. Note that if colors is a
factor of numbers, the default value will be incorrect.TRUE, each missing eigengene (i.e., eigengene whose calculation failed and the error
was trapped) will be replaced by a weighted average of the most connected hub genNA entries in expression data. If TRUE, errors from calling these functions will be
trapped without abnormal exit.
If FALSE, errors will cause TRUE), or whether
the data frame should have columns for each"ME" prepended, e.g., MEturquoise
etc. If returnValidOnly==FALSE, module eigengenes whose calculation failed have
all components set to NA.align == "along average", a dataframe containing average normalized
expression in each module. The columns are named by the corresponding color with an "AE"
prepended, e.g., AEturquoise etc.varExplained[PC, module] giving the variance of module module explained by the principal
component no. PC. The calculation is exact irrespective of the number of computed principal
components. At most 10 variance explained values are recorded in this dataframe.nPC.data)
is TRUE if the corresponding eigengene is valid, and FALSE
if it is invalid. Valid eigengenes include both principal components and their hubgene
approximations.
When returnValidOnly==FALSE, by definition all returned eigengenes are valid and the
entries of validMEs are all TRUE.grey if given, otherwise 0 if colors is numeric and "grey" otherwise.eigengenes) is
TRUE if the corresponding eigengene is the first principal component and FALSE if it
is the hubgene approximation or is invalid.eigengenes) is
TRUE if the corresponding eigengene is the hubgene approximation and FALSE if it
is the first principal component or is invalid.eigengenes) is
TRUE if the corresponding module average expression is valid.returnValidOnly==TRUE does not imply allAEOK==TRUE:
some invalid average expressions may be
returned if their corresponding eigengenes have been calculated correctly.subHubs and
trapErrors.
If subHubs==TRUE, errors in principal component calculation will be trapped and a substitute
calculation of hubgenes will be attempted. If this fails as well, behaviour depends on
trapErrors: if TRUE, the offending
module will be ignored and the return value will allow the user to remove the module from further
analysis; if FALSE, the function will stop. From the user's point of view, setting trapErrors=FALSE ensures that if the function returns
normally, there will be a valid eigengene (principal component or hubgene) for each of the input
colors. If the user sets trapErrors=TRUE, all calculational (but not input) errors will be
trapped, but the user should check the output (see below) to make sure all modules have a valid
returned eigengene.
While the principal component calculation can fail even on relatively sound data
(it does not take all that many "well-placed" NA to torpedo the
calculation),
it takes many more irregularities in the data for the hubgene calculation to
fail. In fact such a failure signals there likely is something seriously wrong with the data.
svd, impute.knn