enrich.mix: Detection of enriched and differentially bound regions for...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/enrich.mix.R

Description

enrich.mix returns the enriched regions or differentially bound regions using the mix or the mix.joint model, by controlling a given FDR level. enrich.mix also calculates the IP efficiencies for each experiment.

Usage

1
2
enrich.mix(object, analysis = "joint", differential = FALSE, 
    diff.vec = NULL, cr = 0.05, crdiff = 0.05)

Arguments

object

The output of mix if analysis="separate" or of mix.joint if analysis="joint".

analysis

A character variable. Default value is "joint" and the object should be the output of mix.joint. If analysis="separate", then the object should be the output of mix.

differential

A logical variable. If TRUE, the function will compute the posterior probability of differential binding of any two experiments or two conditions, as specified by diff.vec. Default value is FALSE.

diff.vec

A numeric vector. If differential = TRUE, diff.vec must be given to show which experiments are to be used in the comparison. At the moment, this is restricted to two conditions (e.g. two proteins at the same time point), so the value for diff.vec should be only 0, 1, 2, where 0 indicates which experiments are not to be used in the analysis, 1 and 2 stand for conditions 1 and 2, respectively. diff.vec should be of the same length as the number of experiments in object.

cr

A numeric variable. The level of FDR for identifying the enriched regions.

crdiff

A numeric variable. The level of FDR for identifying the differentially bound regions.

Value

enrich

The list of enriched regions for each condition at the chosen FDR. Note that there is only one list of enriched regions for replicates, if a joint model is used.

diffenrich1

The list of regions bound only by condition 1.

diffenrich2

The list of regions bound only by condition 2.

ppx1

A n x p matrix of posterior probabilities of enrichment for each region and each condition. ppx0=1-ppx1.

X

A n x p matrix of enrichment for each region and each condition, at the given FDR cutoff (1: enriched, 0: not-enriched).

diffprob1

A n-dimensional vector of posterior probabilities of differential binding for the two conditions under study; diffprob0=1-diffprob1.

diffX1

A n-dimensional index of regions bound only by condition 1 (0: not bound, 1: bound).

diffX2

A n-dimensional index of regions bound only by condition 2.

IPE

A p-dimensional vector of estimated IP efficiency values for each experiment.

Author(s)

Yanchun Bao and Veronica Vinciotti

References

Bao et al. Accounting for immunoprecipitation efficiencies in the statistical analysis of ChIP-seq data. BMC Bioinformatics 2013, 14:169 DOI:10.1186/1471-2105-14-169.

See Also

See also mix, mix.joint

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
tempdir()
data(p300cbp.1000bp)
exp.label=c("CBPT0", "CBPT301", "CBPT302", "p300T0", 
    "p300T301", "p300T302", "WangCBP", "Wangp300")

## Simple examples -- only two experiments and first 5000 observations
CBPT30=list()
CBPT30$region=p300cbp.1000bp$region[1:5000,]
CBPT30$count=p300cbp.1000bp$count[1:5000,2:3]
Poisfit.simple<-mix(CBPT30, method="Poisson", exp.label=exp.label[c(2,3)])
enrich.mix.simple<-enrich.mix(Poisfit.simple, analysis="separate")

enRich documentation built on March 13, 2020, 2:46 a.m.