calculatePvalue {motifbreakR} | R Documentation

## Calculate the significance of the matches for the reference and alternate alleles for the for their PWM

### Description

Calculate the significance of the matches for the reference and alternate alleles for the for their PWM

### Usage

    calculatePvalue(
      results,
      background = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25)
    )

### Arguments

`results` | The output of `motifbreakR` that was run with `filterp=TRUE`
`background` | Numeric Vector; the background probabilites of the nucleotides

### Details

This function is intended to be used on a selection of results produced by `motifbreakR`, and this can be (although not always) a very memory and time intensive process if the algorithm doesn't converge rapidly.

### Value

a GRanges object. The same Granges object that was input as `results`, but with `Refpvalue` and `Altpvalue` columns in the output modified from `NA` to the p-value calculated by `TFMsc2pv`.

### Source

H\'el\'ene Touzet and Jean-St\'ephane Varr\'e (2007) Efficient and accurate P-value computation for Position Weight Matrices. Algorithms for Molecular Biology, 2: 15.

### See Also

See `TFMsc2pv` from the TFMPvalue package for information about how the p-values are calculated.

### Examples

    data(example.results)
    rs2661839 <- example.results[names(example.results) %in% "rs2661839"]
    rs2661839 <- calculatePvalue(rs2661839)

[Package motifbreakR version 2.4.0 Index]