Learn R Programming

drimmR (version 1.0.3)

lengthWord_probabilities: Probability of occurrence of the observed word of size m in a sequence at several positions

Description

Probability of occurrence of the observed word of size m in a sequence at several positions

Usage

lengthWord_probabilities(m, sequence, pos, x, output_file = NULL, plot = FALSE)

Value

A dataframe of probability by position

Arguments

m

An integer, the length word

sequence

A vector of characters

pos

A vector of integer positions

x

An object of class dmm

output_file

(Optional) A file containing the vector of probabilities (e.g,"C:/.../PROB.txt")

plot

FALSE (default); TRUE (display figure plots of probabilities of occurrence of the observed word of size m by position)

Author

Victor Mataigne, Alexandre Seiller

References

BaVe2018drimmR Ver08drimmR

See Also

fitdmm, getTransitionMatrix, word_probability

Examples

Run this code
data(lambda, package = "drimmR")
length(lambda) <- 1000
dmm <- fitdmm(lambda, 1, 1, c('a','c','g','t'), init.estim = "freq", fit.method="sum")
m <- 2
lengthWord_probabilities(m, lambda, c(1,length(lambda)-m), dmm, plot=TRUE)

Run the code above in your browser using DataLab