markovModel: Markov model for generating Y_1Y_2_Y3 ...

Description Usage Arguments Details Value See Also Examples

View source: R/markovmodel.R

Description

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.

Usage

1
markovModel(overlap, nsteps = 1)

Arguments

overlap

An Overlap object.

nsteps

Number of state transitions to perform

Details

The R interface is only used for the purpose of testing the correctness of the model.

Value

List containing

dist

State probability distribution after the given number of steps

See Also

compoundPoissonDist

numMotifHits

probOverlapHit

Examples

 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)

motifcounter documentation built on Nov. 8, 2020, 5:44 p.m.