| defaultGenerator {ChIPsim} | R Documentation |
Functions to generate defaults for makeFeatures.
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"))
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. |
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.
Return values are suitable as arguments generator, transition, init and lastFeat of
makeFeatures. See the documentation of makeFeatures for more detail.
Peter Humburg
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)