This function implements the Markov model for producing motif matches. The function takes a state probability vector and uses the transition probabilities in order to obtain the state probability at the next time point. This function is used used to determine the stationary distribution of the states.
markovModel(overlap, nsteps = 1)
An Overlap object.
Number of state transitions to perform
The R interface is only used for the purpose of testing the correctness of the model.
State probability distribution after the given number of steps
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Load sequences seqfile = system.file("extdata", "seq.fasta", package = "motifcounter") seqs = Biostrings::readDNAStringSet(seqfile) # Load motif motiffile = system.file("extdata", "x31.tab", package = "motifcounter") motif = t(as.matrix(read.table(motiffile))) # Load background model bg = readBackground(seqs, 1) # Compute overlap probabilities op = motifcounter:::probOverlapHit(motif, bg, singlestranded = FALSE) # Computes the state probabilities of the Markov model # (default: after one step) dist = motifcounter:::markovModel(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.