Last data update: 2014.03.03

R: Filter peaks by IDR (irreproducible discovery rate)
IDRfilterR 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=0L, minoverlap=1L, singleEnd=TRUE,
          IDRcutoff=0.01, ...)

Arguments

peaksA, peaksB

peaklist, GRanges object.

bamfileA, bamfileB

file path of bam files.

maxgap

Non-negative integer. Peak intervals with a separation of maxgap or less are considered to be overlapped.

minoverlap

Non-negative integer. Peak intervals with an overlapping of minoverlap or more are considered to be overlapped.

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()){
    library(MMDiffBamSubset)
    peaksA=toGRanges(WT.AB2.Peaks(), format="MACS")
    peaksB=toGRanges(Resc.AB2.Peaks(), format="MACS")
    bamfileA=WT.AB2()
    bamfileB=Resc.AB2()
    IDRfilter(peaksA, peaksB,
              bamfileA, bamfileB)
  }

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ChIPpeakAnno)
Loading required package: grid
Loading required package: IRanges
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: Biostrings
Loading required package: XVector
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: VennDiagram
Loading required package: futile.logger

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ChIPpeakAnno/IDRfilter.Rd_%03d_medium.png", width=480, height=480)
> ### Name: IDRfilter
> ### Title: Filter peaks by IDR (irreproducible discovery rate)
> ### Aliases: IDRfilter
> ### Keywords: misc
> 
> ### ** Examples
> 
> #  if(interactive()){
>     library(MMDiffBamSubset)
>     peaksA=toGRanges(WT.AB2.Peaks(), format="MACS")
duplicated or NA names found. Rename all the names by numbers.
>     peaksB=toGRanges(Resc.AB2.Peaks(), format="MACS")
duplicated or NA names found. Rename all the names by numbers.
>     bamfileA=WT.AB2()
>     bamfileB=Resc.AB2()
>     IDRfilter(peaksA, peaksB,
+               bamfileA, bamfileB)
GRanges object with 3307 ranges and 1 metadata column:
          seqnames               ranges strand |
             <Rle>            <IRanges>  <Rle> |
  olp0001     chr1   [3140628, 3141907]      * |
  olp0002     chr1   [3143686, 3144714]      * |
  olp0003     chr1   [3334413, 3335494]      * |
  olp0004     chr1   [3471587, 3474399]      * |
  olp0005     chr1   [3659128, 3661641]      * |
      ...      ...                  ...    ... .
  olp3303    chr10 [26653593, 26654982]      * |
  olp3304    chr10 [26974273, 26975788]      * |
  olp3305    chr10 [27079188, 27080561]      * |
  olp3306    chr10 [27335950, 27337151]      * |
  olp3307    chr10 [27537860, 27546476]      * |
                                          peakNames
                                    <CharacterList>
  olp0001               peaksB__X0001,peaksA__X0003
  olp0002               peaksB__X0002,peaksA__X0004
  olp0003               peaksB__X0003,peaksA__X0006
  olp0004 peaksB__X0004,peaksA__X0007,peaksA__X0008
  olp0005               peaksA__X0010,peaksB__X0007
      ...                                       ...
  olp3303               peaksA__X4457,peaksB__X4970
  olp3304               peaksB__X4972,peaksA__X4458
  olp3305               peaksA__X4459,peaksB__X4973
  olp3306               peaksB__X4974,peaksA__X4460
  olp3307               peaksA__X4462,peaksB__X4976
  -------
  seqinfo: 2 sequences from an unspecified genome; no seqlengths
> #  }
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>