enrichreg {iChip} | R Documentation

## Call and merge enriched probes to enriched regions.

### Description

A function used to call and merge enriched probes to enriched regions using the posterior probability calculated by iChip2 or iChip1 functions at certain posterior probability and false discovery rate (FDR) cutoffs.

### Usage

    enrichreg(pos,enrich,pp,cutoff,method=c("ppcut","fdrcut"),maxgap=500)

### Arguments

`pos` | A n by 2 matrix or data frame. Rows correspond to probes. The first column of the matrix contains chromosome IDs; the second column contains the genomic positions.
`enrich` | A vector containing the probe enrichment measurements.
`pp` | A vector containing the posterior probabilities returned by iChip2 or iChip1.
`cutoff` | The cutoff value (a scalar) used to call enriched probes. If use posterior probability as a criterion (method="ppcut"), a probe is said to be enriched if its pp is greater than the cutoff. If use FDR as a criterion (method="fdrcut"), probes are said to be enriched if the probe-based FDR is less than the cutoff. The FDR is calculated using a direct posterior probability approach (Newton et al., 2004).
`method` | 'ppcut' or 'fdrcut'.
`maxgap` | The criterion used to merge enriched probes. If the genomic distance of adjacent probes is less than maxgap, the probes will be merged into the same enriched regions.

### Value

A data frame with rows corresponding to enriched regions and columns corresponding to the following:

`chr` | Chromosome IDs. For human genome, 23 and 24 denote X and Y, respectively.
`gstart` | The start genomic position of the enriched region.
`gend` | The end genomic position of the enriched region.
`rstart` | The row number for gstart in the position matrix.
`rend` | The row number for gend in the position matrix.
`peakpos` | The peak genomic position of the enriched region where the probe has the largest enrichment value.
`meanpp` | The mean posterior probability of the probes in the enriched region.
`maxpp` | The maximum posterior probability of the probes in the enriched region.
`nprobe` | The number of probes in the enriched regions. nprobe = rend - rstart + 1

### Author(s)

Qianxing Mo qmo@bcm.edu

### References

Qianxing Mo, Faming Liang. (2010). Bayesian modeling of ChIP-chip data through a high-order Ising model. Biometrics, 66(4):1284-94.

Qianxing Mo, Faming Liang. (2010). A hidden Ising model for ChIP-chip data analysis. Bioinformatics 26(6), 777-783.

Newton, M., Noueiry, A., Sarkar, D., Ahlquist, P. (2004). Detecting differential gene expression with a semiparametric hierarchical mixture method. Biostatistics 5 , 155-176.

### See Also

`iChip2`, `iChip1`, `lmtstat`

### Examples

    library(iChip)
    library(limma)

    #Analyze the p53 data (average resolution is about 35 bps)
    #uncommenting the following code for running

    #data(p53)
    #p53lmt = lmtstat(p53[,9:14],p53[,3:8])
    #p53Y = cbind(p53[,1],p53lmt)
    #p53res=iChip2(Y=p53Y,burnin=2000,sampling=10000,winsize=2,sdcut=2,beta=2.5)
    #enrichreg(pos=p53[,1:2],enrich=p53lmt,pp=p53res$pp,cutoff=0.9,
    #          method="ppcut",maxgap=500)
    #enrichreg(pos=p53[,1:2],enrich=p53lmt,pp=p53res$pp,cutoff=0.01,
    #          method="fdrcut",maxgap=500)

[Package iChip version 1.34.0 Index]