IDRfilter {ChIPpeakAnno} | R Documentation

## Filter peaks by IDR (irreproducible discovery rate)

### Description

Using IDR to assess the consistency of replicate experiments and obtain a high-confidence single set of peaks

### Usage

    IDRfilter(peaksA, peaksB, bamfileA, bamfileB,
              maxgap=-1L, minoverlap=0L, singleEnd=TRUE,
              IDRcutoff=0.01, ...)

### Arguments

`peaksA, peaksB` | peaklist, GRanges object.
`bamfileA, bamfileB` | file path of bam files.
`maxgap,minoverlap` | Used in the internal call to `findOverlaps()` to detect overlaps. See `?findOverlaps` in the IRanges package for a description of these arguments.
`singleEnd` | (Default TRUE) A logical indicating if reads are single or paired-end.
`IDRcutoff` | If the IDR no less than IDRcutoff, the peak will be removed.
`...` | Not used.

### Value

An object GRanges

### Author(s)

Jianhong Ou

### References

Li, Qunhua, et al. "Measuring reproducibility of high-throughput experiments." The annals of applied statistics (2011): 1752-1779.

### Examples

      if(interactive()){
        path <- system.file("extdata", "reads", package="MMDiffBamSubset")
        if(file.exists(path)){
                bamfileA <- file.path(path, "reads", "WT_2.bam")
                bamfileB <- file.path(path, "reads", "Resc_2.bam")
                WT.AB2.Peaks <- file.path(path, "peaks", "WT_2_Macs_peaks.xls")
                Resc.AB2.Peaks <- file.path(path, "peaks", "Resc_2_Macs_peaks.xls")
                peaksA=toGRanges(WT.AB2.Peaks, format="MACS")
                peaksB=toGRanges(Resc.AB2.Peaks, format="MACS")
                IDRfilter(peaksA, peaksB,
                            bamfileA, bamfileB)
        }
      }

[Package ChIPpeakAnno version 3.18.2 Index]