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

}
Legana/ampir documentation built on June 29, 2021, 10:46 a.m.