 S <- c('G','A','L','M','F','W','K','Q','E','S','P','V','I','C','Y','H','R','N','D','T')  allCombs <- function(x) c(x, lapply(seq_along(x)[-0L],                                      function(y) combn(x, y, paste0, collapse = "")),                           recursive = TRUE) 