calculatePvalue: 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 PWMUsage
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
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{'e}l{`e}ne Touzet and Jean-St{'e}phane Varr{'e} (2007) Efficient and accurate P-value computation for Position Weight Matrices.
Algorithms for Molecular Biology, 2: 15.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.See Also
See TFMsc2pv
from the TFMPvalue package for
information about how the p-values are calculated.Examples
Run this codedata(example.results)
rs2661839 <- example.results[names(example.results) %in% "rs2661839"]
rs2661839 <- calculatePvalue(rs2661839)
Run the code above in your browser using DataLab