Last data update: 2014.03.03

R: Combined predictions from (presumably) biological replicates.
combineRIPR Documentation

Combined predictions from (presumably) biological replicates.

Description

A simple helper function that combines multiple prediction lists from biological replicates into a single list.

Usage

combineRIP(ripPath, pattern="gff3$", 
	combineOption="intersect", 
	pvalCutoff=1, pvalAdjCutoff=1, eFDRCutoff=1, 
	logOddCutoff=-Inf, maxgap=1e3, minIntersect, genomeBuild)

Arguments

ripPath

Path to predictions list in a select format as indicated by the file extension.

pattern

Pattern for the names of the prediction files to combine. The file names are expected to have a common extension such as "bed", "gff3", "gtf", but this is not enforced. Default: "gff3$" (i.e. the default output RIPregions.gff3 from ripSeek).

combineOption

Options on how to combine the peaks including:

"intersect": is selected (default), only peaks in each biological replicate list that overlap with or are adjacent within maxgap nucleotides to at least minIntersect other replicates will be kept. If minIntersect is unspecified, then only the peaks that consistently predicted in all replicates are kept.

"merge": All overlapping peaks from the replicates will be merged into one peak.

"union": All overlapping peaks from the replicates will be merged into one peak.

pvalCutoff

Threshold for the p-value cutoff. Only peaks with p-value less than the logOddCutoff will be reported. Default: 1 (i.e. no cutoff).

pvalAdjCutoff

Threshold for the adjusted p-value cutoff. Only peaks with adjusted p-value less than the logOddCutoff will be reported. Default: 1 (i.e. no cutoff).

eFDRCutoff

Threshold for the empirical false discovery rate (eFDR). Only peaks with eFDR less than the eFDRCutoff will be reported. Default: 1 (i.e. no cutoff).

logOddCutoff

Threshold for the log odd ratio of posterior for the RIP over the background states (See seekRIP). Only peaks with logOdd score greater than the logOddCutoff will be reported. Default: -Inf (i.e. no cutoff).

maxgap

Maximum gap allowed to determine two peaks agree with each other.

minIntersect

Mininum number of replicates required to have peaks either intersect or are adjacent to the peak in other replciate.

genomeBuild

Genome build used to obtain the chromosome information from online UCSC database to assign chromosome length to the GRanges object created as the combined peak list.

Value

gr

GRanges object containning chromosome locations of the combined peaks.

Note

Please run ripSeek first on all biological replicates and renamed each "RIPregions.gff3" output to correspond to different biological replicates and place all of the files into a single folder. The path of this folder can then be used as the input argument for ripPath.

Author(s)

Yue Li

References

P. Aboyoun, H. Pages and M. Lawrence. GenomicRanges: Representation and manipulation of genomic intervals. R package version 1.8.9.

Michael Lawrence, Vince Carey and Robert Gentleman. rtracklayer: R interface to genome browsers and their annotation tracks. R package version 1.16.3.

See Also

combineAlignGals, ripSeek, import, import, reduce, countOverlaps

Examples


# Retrieve system files
ripPath <- system.file("extdata/RIPregions", package="RIPSeeker")

gr1 <- combineRIP(ripPath, combineOption="intersect", genomeBuild="mm9")

gr2 <- combineRIP(ripPath, combineOption="merge", genomeBuild="mm9")

gr3 <- combineRIP(ripPath, combineOption="union", genomeBuild="mm9")

length(gr1)

length(gr2)

length(gr3)

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(RIPSeeker)
Loading required package: S4Vectors
Loading required package: stats4
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


Attaching package: 'S4Vectors'

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: Rsamtools
Loading required package: Biostrings
Loading required package: XVector
Loading required package: GenomicAlignments
Loading required package: rtracklayer
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RIPSeeker/combineRIP.Rd_%03d_medium.png", width=480, height=480)
> ### Name: combineRIP
> ### Title: Combined predictions from (presumably) biological replicates.
> ### Aliases: combineRIP
> 
> ### ** Examples
> 
> 
> # Retrieve system files
> ripPath <- system.file("extdata/RIPregions", package="RIPSeeker")
> 
> gr1 <- combineRIP(ripPath, combineOption="intersect", genomeBuild="mm9")
Error in .normargSeqlengths(value, seqnames(x)) : 
  supplied 'seqlengths' must be a vector
Calls: combineRIP ... seqlengths<- -> seqlengths<- -> seqlengths<- -> .normargSeqlengths
Execution halted