MOTIFBREAKR_calc_pvals: Calculate 'motifbreakR' p-values

View source: R/MOTIFBREAKR_calc_pvals.R

MOTIFBREAKR_calc_pvalsR Documentation

Calculate motifbreakR p-values

Description

Calculate p-values for each motifbreakR motif disruption result.

Usage

MOTIFBREAKR_calc_pvals(
  mb_res,
  background = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25),
  granularity = NULL,
  nThread = 1,
  results_dir = file.path(tempdir(), "results"),
  verbose = TRUE
)

Arguments

mb_res

Results generated by MOTIFBREAKR, in GRanges format.

background

Numeric Vector; the background probabilities of the nucleotides

granularity

Numeric Vector; the granularity to which to round the PWM, larger values compromise full accuracy for speed of calculation. A value of NULL does no rounding.

nThread

Number of threads to parallelize analyses across.

results_dir

Directory where results should be saved as a file named: <results_dir>/_genome_wide/motifbreakR/motifbreakR_results.rds. If NULL, results will not be saved to disk.

verbose

Print messages.

Value

Motif disruption predictions in GRanges format, with the p-value columns filled out.

Examples

 
mb_res <- MOTIFBREAKR(rsid_list = c("rs11175620"),
                      # limit the number of datasets tests 
                      # for demonstration purposes only
                      pwmList_max = 5)
mb_res_p <- MOTIFBREAKR_calc_pvals(mb_res = mb_res)                       

RajLabMSSM/echoannot documentation built on Oct. 26, 2023, 2:41 p.m.