IDRfilter: Filter peaks by IDR (irreproducible discovery rate)

Description Usage Arguments Value Author(s) References Examples

View source: R/IDRfilter.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  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")
            library(idr)
            library(DelayedArray)
            IDRfilter(peaksA, peaksB,
                        bamfileA, bamfileB)
    }
  }

LihuaJulieZhu/ChIPpeakAnno documentation built on Aug. 5, 2020, 12:02 a.m.