defaultGenerator: Defaults for Feature Generator

Description Usage Arguments Details Value Author(s) Examples

View source: R/nucSim.R

Description

Functions to generate defaults for makeFeatures.

Usage

1
2
3
4
5
6
7
8
defaultGenerator()
defaultTransition()
defaultInit(prob=c(0.2, 0.05, 0, 0.25, 0.5), 
	states=c("ReversePhasedFeature", "StableFeature", 
		"PhasedFeature", "NFRFeature", "FuzzyFeature"))
defaultLastFeat(isEnd = c(FALSE, rep(TRUE, 4)), 
	states = c("ReversePhasedFeature", "StableFeature", 
		"PhasedFeature", "NFRFeature", "FuzzyFeature"))

Arguments

prob

Numeric vector giving the initial state distribution. This will be normalised if the probabilities do not add up to 1.

isEnd

Logical vector indicating which states, i.e. features, are allowed to be last in the sequence.

states

Character vector of state names.

Details

These functions generate data structures that can be passed as arguments to makeFeatures. Using this set of functions will create a nucleosome positioning simulation. Some of the defaults can be modified by passing different values to defaultInit and defaultLastFeat.

Value

Return values are suitable as arguments generator, transition, init and lastFeat of makeFeatures. See the documentation of makeFeatures for more detail.

Author(s)

Peter Humburg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	set.seed(1)
	## generate defaults
	generator <- defaultGenerator()
	transition <- defaultTransition()
	lastFeat <- defaultLastFeat()
	
	## change the initial state distribution such that it 
	## always starts with a fuzzy feature
	init <- defaultInit(c(0, 0, 0, 0, 1))
	
	## now generate some features for a stretch of 1 million base pairs 
	features <- makeFeatures(generator=generator, transition=transition, 
		lastFeat=lastFeat, init=init, length=1e6)

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