extractRegions {DEWSeq} | R Documentation

## extract significant regions

### Description

extract significant windows from output of `resultsDEWSeq` using the supplied padj and log2FoldChange cut-offs and merge these significant windows to regions and create the following columns for each significant region:

- `padj_min`: min. padj value in the region

- `padj_mean`: average padj value in the region

- `padj_max`: max. padj value in the region

- `log2FoldChange_min`: min. log 2 fold change in the region

- `log2FoldChange_mean`: average log 2 fold change in the region

- `log2FoldChange_max`: max. log 2 fold change in the region

### Usage

    extractRegions(windowRes, padjCol = "padj", padjThresh = 0.05,
      log2FoldChangeCol = "log2FoldChange", log2FoldChangeThresh = 1,
      start0based = TRUE)

### Arguments

`windowRes` | `data.frame`, output from `resultsDEWSeq`
`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)
`start0based` | `logical`, TRUE (default) or FALSE. If TRUE, then the start positions in `windowRes` is considered to be 0-based

### Details

The output data.frame from this function will have the following columns:

- `chromosome`: chromosome name

- `regionStartId`: `unique_id` of the left most window, where an enriched region begins

- `region_begin`: starting position of the enriched region

- `region_end`: ending position of the enriched region

- `strand`: strand info

- `windows_in_region`: total number of windows that make up the enriched region

- `region_length`: length of the enrched region

- `gene_id`: gene id

- `gene_name`: gene name

- `gene_type`: gene type annotation

- `gene_region`: gene region

- `Nr_of_region`: number of the current region

- `Total_nr_of_region`: total number of regions

- `window_number`: window number

- `padj_min`: min. padj value in the region

- `padj_mean`: average padj value in the region

- `padj_max`: max. padj value in the region

- `log2FoldChange_min`: min. log 2 fold change in the region

- `log2FoldChange_max`: max. log 2 fold change in the region

- `log2FoldChange_mean`: average log 2 fold change in the region

### Value

data.frame

### Examples

    data("slbpWindows")
    # using default cut-off thresholds,
    # 'pSlidingWindows.adj' padj value columns
    slbpRegions <- extractRegions(slbpWindows,
    padjCol = 'pSlidingWindows.adj')

[Package DEWSeq version 1.8.0 Index]