annotate spp/man/get.conservative.fold.enrichment.profile.Rd @ 6:ce08b0efa3fd draft

Uploaded
author zzhou
date Tue, 27 Nov 2012 16:11:40 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
1 \name{get.conservative.fold.enrichment.profile}
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
2 \alias{get.conservative.fold.enrichment.profile}
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
3 %- Also NEED an '\alias' for EACH other topic documented here.
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
4 \title{ Estimate minimal fold enrichment/depletion along the chromosomes }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
5 \description{
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
6 The method provides a statistical assessment of enrichment/depletion
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
7 along the chromosomes. To assess tag density enrichment/depletion, a
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
8 sliding window of a specified size (\code{fws}) is used to calculate
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
9 the density of the foreground tags (\code{ftl}). Multiple, typically
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
10 larger windows are used to estimate background tag (\code{btl}) density around the
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
11 same location. The densities are compared as ratios of two Poisson
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
12 processes to estimate lower bound of foreground enrichment, or upper
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
13 bound of foreground depletion. If multiple window sizes were used to
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
14 estimate the background tag density, the most conservative one is
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
15 chosen for each point.
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
16 }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
17 \usage{
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
18 get.conservative.fold.enrichment.profile(ftl, btl, fws, bwsl = c(1, 5, 25, 50) * fws, step = 50, tag.shift = 146/2, alpha = 0.05, use.most.informative.scale = F, quick.calculation = T)
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
19 }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
20 %- maybe also 'usage' for other objects documented here.
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
21 \arguments{
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
22 \item{ftl}{ foreground tag vector list }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
23 \item{btl}{ background tag vector list }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
24 \item{fws}{ foreground window size }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
25 \item{bwsl}{ background window scales. The size(s) of background windows
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
26 will be \code{fws*bwsl}. }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
27 \item{step}{ spacing between positions at which the
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
28 enrichment/depletion is evaluated }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
29 \item{tag.shift}{ number of basepairs by which positive and negative
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
30 tag coordinates should be shifted towards eachother (half of binding
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
31 peak separation distance)}
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
32 \item{alpha}{ desired level of statistical significance }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
33 \item{use.most.informative.scale}{ for each position, instead of
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
34 evaluating enrichment ratio bounds for all background window scales,
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
35 choose the one with the highest observed density to speed up the calculations}
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
36 \item{quick.calculation}{ Use square root transformation method
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
37 instead of a Bayesian method. This speeds up the caclulation
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
38 considerably and is turned on by default. }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
39 \item{background.density.scaling}{ If TRUE, regions of significant tag
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
40 enrichment will be masked out when calculating size ratio of the
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
41 signal to control datasets (to estimate ratio of the background tag
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
42 density). If FALSE, the dataset ratio will be equal to the ratio of
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
43 the number of tags in each dataset.}
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
44 }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
45 \value{
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
46 A list of elements corresponding to chromosomes, with each element
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
47 being an $x/$y data.frame giving the position and the log2
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
48 conservative estimate of enrichment/depletion fold ratios around that
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
49 position.
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
50 Use \code{\link{writewig}} to output the structure to a WIG
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
51 file.
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
52 }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
53 \references{ R.M.Price, D.G. Bonett "Estimating the ratio fo two Poisson
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
54 rates", Comp. Stat & Data Anal. 32(2000) 345}
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
55 \seealso{ \code{\link{get.smoothed.tag.density}} }
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
56 \examples{
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
57 enrichment.estimates <- get.conservative.fold.enrichment.profile(chip.data,input.data,fws=2*binding.characteristics$whs,step=100,alpha=0.01);
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
58 writewig(enrichment.estimates,"example.enrichment.estimates.wig","Example conservative fold-enrichment/depletion estimates shown on log2 scale");
ce08b0efa3fd Uploaded
zzhou
parents:
diff changeset
59 }