plotAvgViewpoint: Plot coverage around a set of virtual 4C viewpoints

View source: R/viewPoints.R

plotAvgViewpointR Documentation

Plot coverage around a set of virtual 4C viewpoints

Description

Plots summarised coverage of interactions around a set of viewpoints, e.g. promoters. This function requires the output of 'viewPoint()' as input.

Usage

plotAvgViewpoint(
  x,
  left_dist = 1e+05,
  right_dist = 1e+05,
  ylab = "Average signal",
  xlab = "Relative position",
  fix = "center",
  ...
)

Arguments

x

A GInteractions object which is output from viewPoint

left_dist

Distance 'left' of interactions to consider, in bp.

right_dist

Distance 'right' of interactions to consider, in bp.

ylab

Y axis label.

xlab

X axis label.

fix

One of 'center', 'start', 'end'. Passed to 'resize'. Interaction distances are calculated relative to this part of the bait.

...

additional arguments to plot

Value

Coverage that is plotted (invisibly)

Examples

data(hic_example_data)
library(GenomicRanges)
pos <- GRanges(seqnames='chr15', ranges=IRanges(start=59477709, end=59482708))
region <- GRanges(seqnames='chr15', ranges=IRanges(start=58980209, end=59980208))
vp <- viewPoint(hic_example_data, pos, region)
plotAvgViewpoint(vp, left_dist = 1000000, right_dist = 100000)

ComputationalRegulatoryGenomicsICL/GenomicInteractions-new documentation built on April 10, 2022, 5:39 p.m.