placeFeatures: Generating and reconciling a feature sequence

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

View source: R/nucSim.R

Description

This function provides an interface to makeFeatures and reconcileFeatures that combines both steps of the feature generation process.

Usage

1
2
placeFeatures(..., maxTail = 0.01, 
	compoundFeatures=list("StablePhasedFeature"))

Arguments

...

Arguments to makeFeatures.

maxTail

Maximum portion of total length of chromosome that may be left free of features (see Details).

compoundFeatures

List of feature classes that are produced by combining two features. This may happen during the call to reconcileFeatures and requires special handling when extending the feature list.

Details

This function (as well as makeFeatures which it calls) tries to fill as much of the genomic region with features as possible, i.e. an attempt is made to produce a feature sequence that covers length base pairs. In most cases the sequence will be slightly shorter. The maxTail argument determines how long a region without any features at the end of the genomic region is acceptable (as fraction of the total length). Note however that even maxTail = 0 does not guarantee a feature sequence of exactly the requested length.

Value

A list of simulated features. The class of the return value as well as the features generated depend on the arguments passed to makeFeatures.

Note

Using the reconcileFeatures mechanism it is possible to introduce dependence between neighbouring features that is not easily expressed in terms of a simple Markov model. In some cases the same effect can be achieved by introducing additional states into the model but it may be more convenient to simply post-process the feature sequence.

Author(s)

Peter Humburg

See Also

makeFeatures, reconcileFeatures

Examples

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

## check the total length of the features
sum(sapply(features, "[[", "length")) ## 990509

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