countHitsWindow {htSeqTools} | R Documentation

## Compute number of hits in a moving window along the chromosome.

### Description

Computes a smoothed number of hits along the chromosome by using moving windows of user specified size.

### Usage

    countHitsWindow(x, chrLength, windowSize = 10^4 - 1)

### Arguments

`x` | Object containing hits (start, end and chromosome). Currently only `RangedData` objects are accepted.
`chrLength` | Named vector indicating the length of each chromosome in base pairs.
`windowSize` | Size of the window used to smooth the hit count.

### Methods

`signature(x = "RangedData")`

  `x` contains chromosome, start and end positions for each hit.

### Examples

    set.seed(1)
    st <- round(rnorm(1000,500,100))
    st[st>=10000] <- 10000
    strand <- rep(c('+','-'),each=500)
    space <- rep('chr1',length(st))
    x <- RangedData(IRanges(st,st+38),strand=strand,space=space)
    countHitsWindow(x, chrLength=c(chr1=10000), windowSize=99)

[Package htSeqTools version 1.28.3 Index]