ProcessDBRs wraps several plotting functions to generate figures specifically for differentially bound regions in a given comparison.

ProcessDBRs(results, outpath, txdb, fdr.thresh = 0.05, fc.thresh = 1,
  method = NULL, promoters = c(-2000, 2000), breaks = c(seq(-3,
  -1.0001, length = 250), seq(-1, -0.1, length = 250), seq(-0.0999, 0.0999,
  length = 1), seq(0.1, 1, length = 250), seq(1.0001, 3, length = 250)),
  heatmap.colors = NULL, heatmap.preset = NULL, reverse = FALSE,
  plot.enrich = TRUE, enrich.libs = c("GO_Molecular_Function_2018",
  "GO_Cellular_Component_2018", "GO_Biological_Process_2018",
  "KEGG_2019_Human", "Reactome_2016", "BioCarta_2016", "Panther_2016"),
  flank.anno = TRUE, flank.dist = 5000)

Arguments

results

DBA object as returned by dba.analyze.

outpath

Path to directory to be used for output.

txdb

TxDb object to use for annotation.

fdr.thresh

Number or numeric scalar indicating the false discovery rate (FDR) cutoff(s) to be used for determining "significant" differential binding. If multiple are given, multiple tables/plots will be generated using all combinations of fdr.thresh and fc.thresh.

fc.thresh

Number or numeric scalar indicating the log2 fold-change cutoff(s) to be used for determining "significant" differential binding. If multiple are given, multiple tables/plots will be generated using all combinations of padj.thresh and fc.thresh.

method

Method used for differential binding e.g. DBA_DESEQ2.

Do not quote this parameter, it is a global variable from DiffBind. If a block was used, be sure to include that (e.g. DBA_DESEQ2_BLOCK).

promoters

Scalar vector containing how many basepairs up and downstream of the TSS should be used to define gene promoters.

breaks

Vector of sequences to be used as breaks for signal heatmaps.

heatmap.colors

Character vector containing custom colors to use for heatmaps in hex (e.g. c("#053061", "#f5f5f5", "#67001f")).

heatmap.preset

String indicating which of the color presets to use in heatmaps.

Available presets (low to high) are:

  • "BuRd" Blue to red.

  • "OrPu" Orange to purple.

  • "BrTe" Brown to teal.

  • "PuGr" Purple to green.

  • "BuOr" Sea blue to orange.

reverse

Boolean indicating whether to flip heatmap color scheme (high color will become low, etc).

plot.enrich

Boolean indicating whether enrichment analyses for DBRs should be run and plotted for each comparison.

enrich.libs

A vector of valid enrichR libraries to test the genes against.

flank.anno

Boolean indicating whether flanking gene information for each peak should be retrieved. Useful for broad peaks and super enhancers.

flank.distance

Integer for distance from edges of peak to search for flanking genes. Ignored if flank.anno = FALSE.

Available libraries can be viewed with listEnrichrDbs from the enrichR package.

Details

ProcessDBRs is called by RunDiffBind but can also be re-run with the RunDiffBind output if you want to save time and don't need to generate all of the EDA/consensus figures again.

This function will generate many figures in addition to saving the results as tables.

See also

RunDiffBind, for generating input for this function.