R/get_mut_pos.R

get_mut_pos = function(x){
  if(!is.tibble(x)){
    stop("Input to clean_barracoda_data is not a tibble")
  }
  x %>% mutate(mut_pos = pep.number %>% str_match("-P(\\d{1,2})-") %>% .[,2] %>%
                 as.numeric) %>%
    return
}
leonjessen/Barracoda2viz documentation built on May 28, 2019, 12:59 p.m.