Description Usage Arguments Details Value Author(s) Examples
Compute a transition matrix from a list of k-mer occurrences.
1 | kmerFrequenciesToMarkov(kmer.seq, kmer.occ, alphabet = c("A", "C", "G", "T"))
|
kmer.seq |
A vector of k-mer sequences. |
kmer.occ |
A vector of the same length as seq. |
alphabet |
Exhaustive list of residues to take in consideration as suffixes for the transition matrix. |
First version: 2003-09 Last modification: 2015-02
A list with the parameters of the model (k, m) + the transition matrix.
Jacques van Helden (Jacques.van-Helden@univ-amu.fr)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Compute Markov model from dinucleotide occurrences measures in Escherichia coli genome
org <- "Escherichia_coli_K12"
k <- 3
freq.file.path <- file.path("markov_models", org, paste(sep="", k, "nt_genomic_",org,"-1str-ovlp.freq.gz"))
freq.file <- system.file("extdata", freq.file.path, package = "stats4bioinfo")
message("Loading k-mer frequency file", freq.file)
freq.table <- read.delim(freq.file, row.names = 1, comment.char=";")
head(freq.table)
tail(freq.table)
markov.model <- kmerFrequenciesToMarkov(
kmer.seq = freq.table$id,
kmer.occ = freq.table$occ)
transitions <- markov.model[["transition"]]
heatmap.simple(round(digits=3, as.matrix(transitions)),main=org, zlim=c(0,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.