plotBedgraph: plots data stored in bed file format

Description Usage Arguments Examples

Description

plots data stored in bed file format

Usage

1
2
3
4
5
6
plotBedgraph(signal, chrom, chromstart, chromend, range = NULL,
  color = SushiColors(2)(2)[1], lwd = 1, linecolor = NA,
  addscale = FALSE, overlay = FALSE, rescaleoverlay = FALSE,
  transparency = 1, flip = FALSE, xaxt = "none", yaxt = "none",
  xlab = "", ylab = "", xaxs = "i", yaxs = "i", bty = "n",
  ymax = 1.04, binSize = NA, binCap = TRUE, ...)

Arguments

signal

signal track data to be plotted (in bedgraph format)

chrom

chromosome of region to be plotted

chromstart

start position

chromend

end position

range

y-range to plpt ( c(min,max) )

color

color of signal track

lwd

color of line outlining signal track. (only valid if linecol is not NA)

linecolor

color of line outlining signal track. use NA for no outline

addscale

TRUE/FALSE whether to add a y-axis

overlay

TRUE / FALSE whether this data should be plotted on top of an existing plot

rescaleoverlay

TRUE/FALSE whether the new plot shold be rescaled based on the maximum value to match the existing plot (only valid when overlay is set to 'TRUE')

transparency

Value between 0 and 1 indication the degree of transparency of the plot

flip

TRUE/FALSE whether the plot should be flipped over the x-axis

xaxt

A character which specifies the x axis type. See par

yaxt

A character which specifies the y axis type. See par

xlab

Label for the x-axis

ylab

Label for the y-axis

xaxs

Must be set to 'i' for appropriate integration into Sushi plots. See par

yaxs

Must be set to 'i' for appropriate integration into Sushi plots. See par plottype

bty

A character string which determined the type of box which is drawn about plots. See par

ymax

fraction of max y value to set as height of plot.

binSize

the length of each bin in bp

binCap

TRUE/FALSE whether the function will limit the number of bins to 8,000

...

values to be passed to plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(Sushi_ChIPSeq_CTCF.bedgraph)
data(Sushi_DNaseI.bedgraph)

chrom            = "chr11"
chromstart       = 1955000
chromend         = 1965000

plotBedgraph(Sushi_ChIPSeq_CTCF.bedgraph,chrom,chromstart,chromend,transparency=.50,flip=FALSE,color="blue",linecol="blue")
plotBedgraph(Sushi_DNaseI.bedgraph,chrom,chromstart,chromend,transparency=.50,flip=FALSE,color="#E5001B",linecol="#E5001B",overlay=TRUE,rescaleoverlay=TRUE)

transparency = 0.5
col1 = col2rgb("blue")
finalcolor1 = rgb(col1[1],col1[2],col1[3],alpha=transparency * 255,maxColorValue = 255)
col2 = col2rgb("#E5001B")
finalcolor2 = rgb(col2[1],col2[2],col2[3],alpha=transparency * 255,maxColorValue = 255)

legend("topright",inset=0.025,legend=c("DnaseI","ChIP-seq (CTCF)"),fill=c(finalcolor1,finalcolor2),border=c("blue","#E5001B"),text.font=2,cex=0.75)

PhanstielLab/Sushi2 documentation built on May 16, 2019, 4:03 a.m.