getScores {Chicago} | R Documentation |
Converts p-values into a CHiCAGO score, using p-value weighting.
getScores(cd, method = "weightedRelative", includeTrans = TRUE, plot = TRUE, outfile = NULL)
cd |
A |
method |
Either "weightedRelative" (recommended), or "unweighted". |
includeTrans |
If |
plot |
Plot a diagnostic plot. |
outfile |
A string containing a .pdf file location to write to. |
Weighting is performed using the parameters weightAlpha
, weightBeta
, weightGamma
, weightDelta
. Briefly, this function calculates weights w
that decrease with increasing distance. Then, we construct weighted p-values p/w
. As a result, the significance of long-range interactions is upweighted, and the significance of short-range interactions is downweighted.
Finally, the output score is calculated as -log(p/w) - log(w_max)
, where w_max
is the highest attainable weight, and provided the score is positive (otherwise it is set to 0).
Please see the CHiCAGO paper and its supplementary for full details.
An object of class chicagoData
.
The object intData(cd)
is updated by reference. Thus, intData(cd)
will be altered. See vignette for further information.
Jonathan Cairns
Genovese, C. R., Roeder, K., and Wasserman, L. (2006). False discovery control with p-value weighting. Biometrika, 93, 509-524. doi:10.1093/biomet/93.3.509
data(cdUnitTest) ##modifications to cdUnitTest, ensuring it uses correct design directory designDir <- file.path(system.file("extdata", package="Chicago"), "unitTestDesign") cdUnitTest <- modifySettings(cd=cdUnitTest, designDir=designDir) cdUnitTest <- getScores(cdUnitTest)