calculatePvalue {motifbreakR} | R Documentation |
Calculate the significance of the matches for the reference and alternate alleles for the for their PWM
calculatePvalue(results, background = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25))
results |
The output of |
background |
Numeric Vector; the background probabilites of the nucleotides |
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.
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
.
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 TFMsc2pv
from the TFMPvalue package for
information about how the p-values are calculated.
data(example.results) rs2661839 <- example.results[names(example.results) %in% "rs2661839"] rs2661839 <- calculatePvalue(rs2661839)