fit.peak.profile: Iteratively learn deconvolution kernel (peak profile) from...

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

Description

Learn the peak profile from ChIP-chip data, to be used for data deconvolution via 'chip.deconv' or 'deconv.entire.genome'.

Usage

1
2
3
4
5
6
7
8
fit.peak.profile(data, tile.size, n.peaks = 30, n.skip = 10, in.kernel =
NA, fits = NULL, method = "Nelder-Mead", positions=c( 0, 25, 50, 100,
150, seq( 200, (mini.window*1.5)+1, by=100 ) ), re.fit = 25, start.pars
= c(shape = 7, scale = 50, bs.size = 20, h.cutoff = 15), to.be.fit=c(
"shape", "scale", "bs.size", "h.cutoff" ), rnd = F, mini.window = max(5
* tile.size, 1300), plot = T, name = "", no.multicore=T, ...)

plot.fit.peak.profile(x, n.peak.plot = 7, plot.spline = F, ...)

Arguments

data

Input data matrix, connection, or file name. See 'chip.deconv' for details.

tile.size

Probe length (bp) for use in kernel generation. See 'generate.binding.profile' for details.

n.peaks

Number of (biggest) peaks to learn from

n.skip

Skip this many worst-fitting of the 'n.peaks'. Enables filtering out of peaks that don't agree with the majority of isolated peaks.

in.kernel

Input seed kernel to start with (guessed if 'NA').

fits

Input preliminary fits (via 'deconv.entire.genome'; generated from input data if 'NULL').

method

Optimization method, see 'optim'

positions

Passed directly to 'generate.binding.profile'

re.fit

Re-run 'deconv.entire.genome' on input data using current best-fit profile, every 're.fit' iterations

start.pars

Starting parameters for model profile. See Details.

to.be.fit

Names of parameters to be learned. See Details.

rnd

Add some 'jitter' to the starting parameters

plot

Plot the fit as it progresses (including data and fit to several bright peaks in the data)

mini.window

Size of window to be plotted around each of the bright peaks, if 'plot' is TRUE

no.multicore

Prevent use of multiple cores, even if 'multicore' is installed.

name

Ignored

...

Further parameters for 'deconv.entire.genome' and 'generate.binding.profile'

x

Object output from 'fit.peak.profile'

n.peak.plot

Number of bright peaks (and their fits) to include in the plot

plot.spline

Plot a 'smooth.spline' fit to the data for reference

Details

'fit.peak.profile' iteratively runs 'deconv.entire.genome' on a data set, isolates the 'n.peaks' brightest peaks, and fits parameters to the model profile use by 'generate.binding.profile', then re-fits the data using 'deconv.entire.genome'. Currently, the parameters that are fit include the shape and scale of the Gamma function used for the fragment length distribution, the binding site footprint, and the "cutoff" for hybridization. All parameters listed in 'to.be.fit' will be optimized. Parameters not listed in 'start.pars' will be set to the defaults.

Value

A list of class 'fit.peak.profile, for which a 'plot' function exists, and containing the following elements:

score

The log of the RSS of the final peak profile to the 'n.peaks - 'n.skip' brightest isolated peaks in the data (this is the measure that was optimized).

kernel

The final peak profile, generated by 'generate.binding.profile'.

new.fits

The deconvolution fits of the final peak profile to the 'n.peaks' brightest peaks in the data, generated by 'chip.deconv'.

is.bad

Logical vector telling which of the 30 'n.peaks' brightest peaks were not among the 'n.skip' poorly-fitting peaks.

par

Final best-fit model parameters for the peak profile.

peaks

Two-column matrix listing the centers and intensities of the 'n.peaks' brightest peaks in the data, that were used for the fitting.

args

All parameters input to 'fit.peak.profile', for future reference.

Author(s)

David J Reiss, Institute for Systems Biology

Maintainer: <dreiss@systemsbiology.org>

References

Reiss, DJ and Facciotti, MT and Baliga, NS. (2007). "Model-based deconvolution of genome-wide DNA binding", Bioinformatics; doi: 10.1093/bioinformatics/btm592.

http://baliga.systemsbiology.net/medichi

See Also

chip.deconv, deconv.entire.genome, generate.fake.data, generate.binding.profile, MeDiChI-data, lars, quadprog, Matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  ## Fit the peak profile to the high-resolution Nimblegen data,
  ## plotting progress. Note this will take some time.
  data( "halo.hires", package="MeDiChI" )

## Not run: 
   params <- fit.peak.profile( data.halo.hires, tile.size=50, 
                             quant.cutoff="q0.99", chrom="Chr",
                             fit.res=30, max.steps=100, plot=TRUE )
   plot( params )

  ## Use the output kernel for deconvolution (see 'deconv.entire.genome'):
   fits <- deconv.entire.genome( data.halo.lowres, fit.res=10,
                n.boot=1, kernel=params\$kernel, verbose=TRUE, trace=FALSE )

## End(Not run)

MeDiChI documentation built on May 2, 2019, 5:32 p.m.