toBED {DEWSeq} | R Documentation

## windows/regions to BED

### Description

given output of `extractRegions`, `resultsDEWSeq` and significance thresholds, extract significant windows, create regions by merging adjacent significant windows. Finally, write the output as a BED file for visualization.

### Usage

    toBED(windowRes, regionRes, fileName, padjCol = "padj",
      padjThresh = 0.05, log2FoldChangeCol = "log2FoldChange",
      log2FoldChangeThresh = 1, trackName = "sliding windows",
      description = "sliding windows")

### Arguments

`windowRes` | `data.frame`, output from `resultsDEWSeq`
`regionRes` | `data.frame`, output from `extractRegions`
`fileName` | `character`, filename to save BED output
`padjCol` | `character`, name of the adjusted pvalue column (default: padj)
`padjThresh` | `numeric`, threshold for p-adjusted value (default: 0.05)
`log2FoldChangeCol` | `character`, name of the log2foldchange column (default: log2FoldChange)
`log2FoldChangeThresh` | `numeric`, threshold for log2foldchange value (default:1)
`trackName` | `character`, name of this track, for visualization
`description` | `character`, description of this track, for visualization

### Value

write to file

### Examples

    data(slbpRegions)
    data(slbpWindows)
    outFile <- tempfile('SLBP_visualization.bed')
    # the results are written to a temp file in this example
    toBED(slbpWindows,slbpRegions,outFile,padjCol='pSlidingWindows.adj')

[Package DEWSeq version 1.8.0 Index]