plotTFBSdb: Plot TFBS in window

Description Usage Arguments Value Examples

View source: R/tfbsDB_parse_and_plot.R

Description

Produce ggbio plot that ca be combined with others

Usage

1
2
3
4
plotTFBSdb(gr, xlim = c(min(start(gr)), max(end(gr))),
  tf_text_size = 6, merge_tfbs = TRUE, merge_min_frac = 0.05,
  segmentColor = "lightblue", textColor = "black", colorByP = FALSE,
  gradientRange = c(4, 10))

Arguments

gr

GRange object of TFBS

xlim

range of window in genome coordinates

tf_text_size

size of TF text label

merge_tfbs

should overlapping TFBS from same TF be combined?

merge_min_frac

minimum overlap between to windows to merge TFBS's

segmentColor

color of TFBS segments

textColor

color of TFBS text labels

colorByP

color segments by -log10(p) of motif match

gradientRange

ranges of values for colors when colorByP is TRUE

Value

plot as ggbio object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(GenomicRanges)
library(tfbsDB)

# range of TFBS to be loaded from file
grQuery = GRanges("chr1", IRanges(10280, 10410))

# example data from package
bedFile = file.path(system.file("extdata/", package = "tfbsDB"), "hocomocov11_hg19_example.bed.gz")

# read from file
gr = readTFBSdb( grQuery, bedFile )

# show TFBS locations
plotTFBSdb( gr )

# color locations by p-value of motif match
plotTFBSdb( gr, colorByP=TRUE)

GabrielHoffman/tfbsDB documentation built on June 23, 2020, 5:29 a.m.