This is the new backend function for empirical P-values for either affinity or cutoff. The function only works on single sequences.
1 2 3 4 5 6 7 8 9 10 11  | empiricalPvalue(
  scores,
  seq.len,
  pwm.len,
  bg.fwd,
  bg.rev,
  cutoff = NULL,
  B = 10000,
  verbose = FALSE,
  exact.length = FALSE
)
 | 
scores | 
 the scores obtained for the sequence  | 
seq.len | 
 the length of the sequence, if a single value will take a single sequence of given length. If a vector of values, will take sequences of given lengths and joint them together  | 
pwm.len | 
 the lengths of PWMs  | 
bg.fwd | 
 raw odds scores for the forward strand of background  | 
bg.rev | 
 raw odds scores for the reverse strand of background  | 
cutoff | 
 if not NULL, will use hit count above this cutoff. The cutoff should be specified in log2.  | 
B | 
 the number of random replicates  | 
verbose | 
 if to give verbose progress reports  | 
exact.length | 
 if to take into consideration that the actual sequence lengths differ for different PWMs. For very long sequences (i.e. seq.len >> pwm.len) this make very little difference, however the run time with exact.length is much longer.  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.