MOTIFBREAKR: Run 'motifbreakR'

View source: R/MOTIFBREAKR.R

MOTIFBREAKRR Documentation

Run motifbreakR

Description

motifbreakR is a package to predict how much a SNP will disrupt a transcription factor binding motif (if it falls within one). Notes:

  • BSgenomeUsers must manually run library(BSgenome) before running any motifbreakR functions to successfully use this tool.

  • threshold= If filterp=TRUE, this argument indicates the p-value threshold. If filterp=FALSE, this argument instead indicates the pct threshold.

Usage

MOTIFBREAKR(
  rsid_list,
  results_dir = file.path(tempdir(), "results"),
  pwmList = NULL,
  pwmList_max = NULL,
  genome_build = NULL,
  organism = "Hsapiens",
  threshold = 0.85,
  show.neutral = FALSE,
  method = "default",
  calculate_pvals = TRUE,
  force_new = FALSE,
  background = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25),
  granularity = NULL,
  nThread = 1,
  verbose = TRUE
)

Arguments

rsid_list

RSIDs of SNPs to test for motif disruption between the reference and alternative alleles..

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.

pwmList

An object of class MotifList containing the motifs that you wish to interrogate

pwmList_max

Limit the maximum number of PWM datasets tested (e.g. 10). If NULL, no limit it set.

genome_build

Genome build to use.

organism

Only include datasets in the pwmList performed in a particular organism.

threshold

Numeric; the maximum p-value for a match to be called or a minimum score threshold

show.neutral

Logical; include neutral changes in the output

method

Character; one of default, log, ic, or notrans; see details.

calculate_pvals

Calculate p-values for all SNPs tested. WARNING: May take a long time if many SNPs and/or PWM are selected.

force_new

If results of the same name already exist, overwrite them with new analyses (TRUE). Otherwise, import the existing results and skip the analyses (default: FALSE).

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.

verbose

Print messages.

Value

Motif disruption predictions in GRanges format.

Source

Publication GitHub Vingette

See Also

Other motifbreakR: MOTIFBREAKR_filter_by_metadata(), MOTIFBREAKR_summarize()

Examples

library(BSgenome) ## <-- IMPORTANT!
#### Example fine-mapping results ####
merged_DT <- echodata::get_Nalls2019_merged()
#### Run motif analyses ####
mb_res <- MOTIFBREAKR(rsid_list = c("rs11175620"),
                      # limit the number of datasets tested 
                      # for demonstration purposes only
                      pwmList_max = 4,
                      calculate_pvals = FALSE)

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