R/remove_stop_codon.R

Defines functions remove_stop_codon

Documented in remove_stop_codon

#' Remove stop codon at end of sequence
#'
#' Stop codons at the end of the amino acid sequences are removed
#'
#'
#' @param faa_df A dataframe containing two columns: the sequence name and amino acid sequence
#'
#' @return The input dataframe without the stop codons at the end of sequences

remove_stop_codon <- function(faa_df) {
  seqs <- gsub("\\*$", "", faa_df[[2]])
  faa_df[[2]] <- seqs
  faa_df

}

Try the ampir package in your browser

Any scripts or data that you put into this service are public.

ampir documentation built on June 29, 2021, 9:09 a.m.