ngram {EnvNJ} | R Documentation |
Computes the n-gram frequencies vector for a given protein.
ngram(prot, k = 4)
prot |
a character string corresponding to the primary structure of the protein. |
k |
a positive integer, between 1 and 5, indicating the k-mer of the words to be counted. |
The one letter code for amino acids is used (capital).
A dataframe with two columns, the first one given the peptides and the second one the corresponding absolute frequency.
Stuart et al. Bioinformatics 2002; 18:100-108.
ngraMatrix(), ffp(), svdgram()
ngram(bovids$Bos_taurus[1], k = 3)