ssvSignalLineplot: construct line type plots where each region in each sample is...

Description Usage Arguments Value Examples

View source: R/functions_signal_plots.R

Description

construct line type plots where each region in each sample is represented

Usage

1
2
3
4
ssvSignalLineplot(bw_data, x_ = "x", y_ = "y", color_ = "sample",
  sample_ = "sample", region_ = "id", group_ = "auto_grp",
  line_alpha = 1, facet_ = "auto_facet", facet_method = facet_wrap,
  spline_n = NULL)

Arguments

bw_data

a GRanges or data.table of bigwig signal. As returned from ssvFetchBam and ssvFetchBigwig

x_

variable name mapped to x aesthetic, x by default.

y_

variable name mapped to y aesthetic, y by default.

color_

variable name mapped to color aesthetic, sample by default.

sample_

variable name, along with region_ used to group and facet by default, change group_ or facet_ to override.

region_

variable name, along with sample_ used to group and facet by default, change group_ or facet_ to override.

group_

group aesthetic keeps lines of geom_path from mis-connecting. auto_grp by default which combines sample_ and region_. probably shouldn't change.

line_alpha

alpha value for lines. default is 1.

facet_

facetting divides up plots. auto_facet by default which combines sample_ and region_. if overriding facet_method with facet_grid, make sure to include ~ between two variables, ie. "a~b", ".~b", "a~."

facet_method

ggplot2 facetting method or wrapper for same, facet_wrap by default.

spline_n

if not NULL, applySpline will be called with n = spline_n. default is NULL.

Value

ggplot of signal potentially facetted by region and sample

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bw_gr = CTCF_in_10a_profiles_gr
ssvSignalLineplot(subset(bw_gr, bw_gr$id %in% seq_len(3)), facet_ = "sample")
ssvSignalLineplot(subset(bw_gr, bw_gr$id %in% seq_len(3)),
    facet_ = "sample~.",
    facet_method = facet_grid)
ssvSignalLineplot(subset(bw_gr, bw_gr$id %in% seq_len(3)),
    facet_ = paste("sample", "~", "id"), facet_method = facet_grid)
ssvSignalLineplot(subset(bw_gr, bw_gr$id %in% seq_len(3)))
ssvSignalLineplot(subset(bw_gr, bw_gr$id %in% seq_len(3)), facet_ = "id")
ssvSignalLineplot(subset(bw_gr, bw_gr$id %in% seq_len(3)),
    facet_ = "id", spline_n = 10)

jrboyd/seqsetvis documentation built on Oct. 14, 2018, 3:04 p.m.