[Solved] frequency of letters at position in string [closed]


For the record, for

x = "TGAGGTAGTAGTTTGTGCTGTTAT
TAGTAGTTTGTGCTGTTA
TGAGGTAGTAGTTTGTAC
TGAGAACTGAATTCCATAGG"

a Biostrings solution is

library(Biostrings)
consensusMatrix(DNAStringSet(strsplit(x, "\n")[[1]]))

which will be fast for millions of sequences.

solved frequency of letters at position in string [closed]