estimateNRL: Estimate the nucleosome repeat length (NRL) from a phasogram.

View source: R/phasograms.R

estimateNRLR Documentation

Estimate the nucleosome repeat length (NRL) from a phasogram.

Description

Estimate the nucleosome repeat length (NRL) from the frequencies of same-strand alignment distances (phasogram), e.g. generated by calcPhasogram. The NRL is obtained from the slope of a linear fit to the modes in the phasogram.

Usage

estimateNRL(
  x,
  mind = 140L,
  usePeaks = 1:8,
  span1 = 100/length(x),
  span2 = 1500/length(x)
)

Arguments

x

numeric vector giving the counts of alignment distances (typically the output of calcPhasogram.

mind

integer(1) specifying the minimal distance to be used for NRL estimation. The default value (140) ignores any distance too short to span at least a single nucleosome.

usePeaks

integer vector selecting the modes (peaks) in the phasogram used in NRL estimation.

span1

numeric(1) giving the smoothing parameter for de-trending loess fit (high pass filter).

span2

numeric(1) giving the smoothing parameter for de-noising loess fit (low pass filter).

Value

A list with elements:

nrl

the estimated nucleosome repeat length

nrl.CI95

the 95% confidence interval

xs

smoothed (de-trended) phasogram

loessfit

the de-noising fit to the de-trended phasogram

lmfit

the linear fit to the phasogram peaks

peaks

the peak locations

mind

minimal distance included in the fit

span1

smoothing parameter for de-trending loess fit

span2

smoothing parameter for de-noising loess fit

usePeaks

the peaks used in the fit

Author(s)

Michael Stadler

See Also

calcPhasogram to calculate the phasogram from alignments, plotPhasogram to visualize an annotated phasogram

Examples

  # see the help for calcPhasogram() for a full example


fmicompbio/swissknife documentation built on June 11, 2025, 4:17 p.m.