newCorrelationOptions {WGCNA} | R Documentation |
Creates a list of correlation options.
Description
Convenience function to create a re-usable list of correlation options.
Usage
newCorrelationOptions(
corType = c("pearson", "bicor"),
maxPOutliers = 0.05,
quickCor = 0,
pearsonFallback = "individual",
cosineCorrelation = FALSE,
nThreads = 0,
corFnc = if (corType=="bicor") "bicor" else "cor",
corOptions = c(
list(use = 'p',
cosine = cosineCorrelation,
quick = quickCor,
nThreads = nThreads),
if (corType=="bicor")
list(maxPOutliers = maxPOutliers,
pearsonFallback = pearsonFallback) else NULL))
Arguments
corType |
Character specifying the type of correlation function. Currently supported options are |
maxPOutliers |
Maximum proportion of outliers for biweight mid-correlation. See |
quickCor |
Real number between 0 and 1 that controls the handling of missing data in the
calculation of correlations. See |
pearsonFallback |
Specifies whether the bicor calculation should revert to Pearson when median
absolute deviation (mad) is zero. Recongnized values are (abbreviations of)
|
cosineCorrelation |
Logical: calculate cosine biweight midcorrelation? Cosine bicorrelation is similar to standard bicorrelation but the median subtraction is not performed. |
nThreads |
A non-negative integer specifying the number of parallel threads to be used by certain parts of correlation calculations. This option only has an effect on systems on which a POSIX thread library is available (which currently includes Linux and Mac OSX, but excludes Windows). If zero, the number of online processors will be used if it can be determined dynamically, otherwise correlation calculations will use 2 threads. |
corFnc |
Correlation function to be called in R code. Should correspoind to the value of |
corOptions |
A list of options to be supplied to the correlation function (in addition to appropriate arguments |
Value
A list containing a copy of the input arguments. The output has class CorrelationOptions
.
Author(s)
Peter Langfelder