getScores {Chicago} | R Documentation

## Get CHiCAGO scores.

### Description

Converts p-values into a CHiCAGO score, using p-value weighting.

### Usage

    getScores(cd, method = "weightedRelative",
          includeTrans = TRUE, plot = TRUE, outfile = NULL)

### Arguments

`cd` | A `chicagoData` object.
`method` | Either "weightedRelative" (recommended), or "unweighted".
`includeTrans` | If `FALSE`, trans interactions are discounted.
`plot` | Plot a diagnostic plot.
`outfile` | A string containing a .pdf file location to write to.

### Details

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.

### Value

An object of class `chicagoData`.

### Warning

The object `intData(cd)` is updated by reference. Thus, `intData(cd)` will be altered. See vignette for further information.

### Author(s)

Jonathan Cairns

### References

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

### See Also

`chicagoPipeline`

### Examples

    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)

[Package Chicago version 1.15.0 Index]