#' consensus
#'
#' Takes the most common nucleotide in each position of a group motifs
#'
#' @param Motifs A vector of character string of the DNA Motifs.
#' @return A vector of the most common nucleotide in each position
#' @examples consensus(sampleMotifs)
#' @export
consensus <- function(Motifs){
profile <- muCount(Motifs)
conStrand <- vector(mode='character')
for (i in 1:nchar(Motifs[[1]])) {
conStrand <- c(conStrand,names(which.max(profile[,i])))
}
return(conStrand)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.