View source: R/count_n_mutations.R
count_n_mutations | R Documentation |
Count mutations
count_n_mutations(alignment, root_sequence, verbose = FALSE)
alignment |
a DNA alignment, of class DNAbin |
root_sequence |
the DNA sequence at the root of the phylogeny. By default, this will consist out of an equal amount of each letter Use check_root_sequence to check if a root sequence is valid. |
verbose |
if TRUE, show more output |
the number of mutations
Giovanni Laudanno, Richèl J.C. Bilderbeek
# Check cleanup by other functions
beastier::check_empty_beaustier_folders()
# Create an AAAA alignent
alignment <- ape::as.DNAbin(
x = list(species_1 = strsplit("aaaa", split = "")[[1]])
)
# Count the number of mutations from AAAA
# 0
count_n_mutations(alignment, "aaaa")
# 1
count_n_mutations(alignment, "acaa")
# 2
count_n_mutations(alignment, "acga")
# 3
count_n_mutations(alignment, "acgt")
# 4
count_n_mutations(alignment, "ccgt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.