cherByThreshold {Ringo} | R Documentation

## Function to identify chers based on thresholds

### Description

Given a vector of probe positions on the chromosome, a vector of smoothed intensities on these positions, and a threshold for intensities to indicated enrichment, this function identifies Chers (ChIP-enriched regions) on this chromosome.

This function is called by the function `findChersOnSmoothed`.

### Usage

    cherByThreshold(positions, scores, threshold, distCutOff,
      minProbesInRow = 3)

### Arguments

`positions` | numeric vector of genomic positions of probes
`scores` | scores (intensities) of probes on those positions
`threshold` | threshold for scores to be called a cher
`distCutOff` | maximal positional distance between two probes to be part of the same cher
`minProbesInRow` | integer; minimum number of enriched probes required for a cher; see `details` for further explanation.

### Details

Specifying a minimum number of probes for a cher (argument `minProbesInRow`) guarantees that a cher is supported by a reasonable number of measurements in probe-sparse regions. For example, if there's only one enriched probe within a certain genomic 1kb region and no other probes can been mapped to that region, this single probe does arguably not provide enough evidence for calling this genomic region enriched.

### Value

A LIST with n components, where the first n components are the cher clusters, each one holding the scores and, as their names, the genomic positions of probes in that cluster.

### Author(s)

Joern Toedling toedling@ebi.ac.uk

### See Also

`findChersOnSmoothed`

### Examples

     ## example with random generated data:
     rpos <- cumsum(round(runif(200)*5))
     rsco <- rnorm(200)+0.2
     plot(rpos, rsco, type="l", col="seagreen3", lwd=2)
     rug(rpos, side=1, lwd=2); abline(h=0, lty=2)
     rchers <- cherByThreshold(rpos, rsco, threshold=0, distCutOff=2)
     sapply(rchers[-length(rchers)], function(thisClust){
      points(x=as.numeric(names(thisClust)), y=thisClust, type="h", lwd=2,
     col="gold")})

[Package Ringo version 1.8.0 Index]