plotBedgraph {Sushi} | R Documentation

## plots data stored in bed file format

### Description

plots data stored in bed file format

### Usage

    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, colorbycol = NULL, ...)

### 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.
`colorbycol` | palette to use to shade the signal track plot. Only applicable when overlay is set to FALSE.
`...` | values to be passed to `plot`

### Examples

    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)
    labelgenome(chrom,chromstart,chromend,side=1,scipen=20,n=3,line=.18,chromline=.5,scaleline=0.5,scale="Mb")

    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)

[Package Sushi version 1.20.0 Index]