#' The Markov chain simulation for point mutations on a list of sequences
#' @param sequences A list of nucleic acid sequences
#' @param num_jumps The number of steps to simulate the point mutations for
#' @param transition_matrix The transition matrix coressponding to the model we are using
#' for point mutations
#' @return A data frame with a list of times and the mutated sequences at each time
simulate_point_mutation_markov_expensive <- function(sequences, num_jumps, transition_matrix)
{
sequence_length <- length(sequences[[1]])
data <- data.frame(time = rep(NA_integer_, num_jumps),
sequences = rep(NA, num_jumps))
row_num <- 1
for(t in 1:num_jumps)
{
new_row <- c(t, list(list(sequences)))
data[t, ] <- new_row
sequences <- mutate_sequences(sequences, transition_matrix)
}
return(data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.