metaWindow {ORFik} | R Documentation

## Calculate metaplot coverage of reads around input GRangesList object.

### Description

Sums up coverage over set of GRanges objects that.

### Usage

    metaWindow(x, windows)

### Arguments

`x` | GRanges object of your reads. You should resize them beforehand to width of 1 to focus on 5' ends of footprints.
`windows` | GRanges object of your CDSs start or stop postions. Its width has to be even number as we will assume in the middle is position zero which is included in the downstream window.

### Value

A data.frame with average counts (avg_counts) of reads mapped to positions (position) specified in windows along with frame (frame).

### Examples

    windows <- GenomicRanges::GRangesList(
      GenomicRanges::GRanges(seqnames = "chr1",
                             ranges = IRanges::IRanges(c(50, 100), c(80, 200)),
                             strand = "-"))
    x <- GenomicRanges::GRanges(
      seqnames = "chr1",
      ranges =  IRanges::IRanges(c(100, 180), c(200, 300)),
      strand = "-")
    metaWindow(x, windows)

[Package ORFik version 1.2.1 Index]