feat2dens: Convert a list of features into a feature density

Description Usage Arguments Value Author(s) See Also Examples

View source: R/nucSim.R

Description

Given a list of features (as produced by makeFeatures) computes the feature density for each and combines them into a chromosome wide density.

Usage

1
feat2dens(features, length, featureBgr = TRUE, ...)

Arguments

features

A list of features.

length

Total length of feature density vector (i.e. chromosome length). If this is missing the length is inferred from the feature parameters.

featureBgr

Logical indicating whether feature specific background should be added to the density. If this is TRUE the resulting density for each feature is a mixture of the feature density and a fuzzy, i.e. uniform, feature density. The weights of the components are determined by the feature weight.

...

Further arguments to featureDensity.

Value

A vector with the feature density for each position along the chromosome.

Author(s)

Peter Humburg

See Also

The majority of the work is done by calls to featureDensity and joinRegion.

Examples

1
2
3
4
5
6
set.seed(1)
## generate a (relatively short) sequence of nucleosome features
features <- placeFeatures(start=200, length=1e5)

## calculate density
featureDens <- feat2dens(features, length=1e5)

ChIPsim documentation built on Nov. 8, 2020, 8:09 p.m.