R/get_repeated_from_sample.R

Defines functions get_repeated_from_sample

Documented in get_repeated_from_sample

#' Returns a character vector of 'Y' if the sample indicates it is a
#' repeat else 'N'
#'
#' @param sample character vector with one or more sample Ids
#' @import stringi
#' @export
get_repeated_from_sample <- function(sample) {
  ifelse(toupper(stri_sub(sample, -2)) == "-R", "Y", "N")
}
rmsharp/snprcspf documentation built on June 15, 2020, 11:21 a.m.