R/F4_translate_to_protein.R

Defines functions translation

Documented in translation

#' Translation of a vector of codons into their corresponding amino acids based on the genetic code
#'
#' @param codons a vector of strings, each of which are 3mers of the letters A, U, C and G
#'
#' @return a single string, with each letter symbolizing an amino acid
#' @export
translation <- function(codons){
  aa_code <- paste0(codon_table[codons], collapse = "")
  return(aa_code)
}
rforbiodatascience22/group_16_package documentation built on April 6, 2022, 11:19 a.m.